mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 20:50:41 +01:00
SPIGOT-3031: Pigs are not dropping their saddle
This commit is contained in:
parent
4d3bf20155
commit
46226d6a03
1 changed files with 18 additions and 2 deletions
|
@ -9,7 +9,23 @@
|
||||||
public class EntityPig extends EntityAnimal {
|
public class EntityPig extends EntityAnimal {
|
||||||
|
|
||||||
private static final DataWatcherObject<Boolean> bw = DataWatcher.a(EntityPig.class, DataWatcherRegistry.h);
|
private static final DataWatcherObject<Boolean> bw = DataWatcher.a(EntityPig.class, DataWatcherRegistry.h);
|
||||||
@@ -156,6 +158,12 @@
|
@@ -125,13 +127,14 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
public void die(DamageSource damagesource) {
|
||||||
|
- super.die(damagesource);
|
||||||
|
+ // super.die(damagesource); // CraftBukkit - Moved to end
|
||||||
|
if (!this.world.isClientSide) {
|
||||||
|
if (this.hasSaddle()) {
|
||||||
|
this.a(Items.SADDLE, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
+ super.die(damagesource); // CraftBukkit - Moved from above
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@@ -156,6 +159,12 @@
|
||||||
if (!this.world.isClientSide && !this.dead) {
|
if (!this.world.isClientSide && !this.dead) {
|
||||||
EntityPigZombie entitypigzombie = new EntityPigZombie(this.world);
|
EntityPigZombie entitypigzombie = new EntityPigZombie(this.world);
|
||||||
|
|
||||||
|
@ -22,7 +38,7 @@
|
||||||
entitypigzombie.setSlot(EnumItemSlot.MAINHAND, new ItemStack(Items.GOLDEN_SWORD));
|
entitypigzombie.setSlot(EnumItemSlot.MAINHAND, new ItemStack(Items.GOLDEN_SWORD));
|
||||||
entitypigzombie.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, this.pitch);
|
entitypigzombie.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, this.pitch);
|
||||||
entitypigzombie.setAI(this.hasAI());
|
entitypigzombie.setAI(this.hasAI());
|
||||||
@@ -164,7 +172,8 @@
|
@@ -164,7 +173,8 @@
|
||||||
entitypigzombie.setCustomNameVisible(this.getCustomNameVisible());
|
entitypigzombie.setCustomNameVisible(this.getCustomNameVisible());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue