2015-05-25 18:37:24 +08:00
|
|
|
--- a/net/minecraft/server/EntityAnimal.java
|
|
|
|
+++ b/net/minecraft/server/EntityAnimal.java
|
2018-09-01 17:28:12 +08:00
|
|
|
@@ -7,7 +7,8 @@
|
|
|
|
|
2018-07-15 08:00:00 +08:00
|
|
|
protected Block bF;
|
|
|
|
private int bC;
|
2018-09-01 17:28:12 +08:00
|
|
|
- private UUID bD;
|
|
|
|
+ public UUID bD; // PAIL
|
2016-06-19 13:00:39 +08:00
|
|
|
+ public ItemStack breedItem; // CraftBukkit - Add breedItem variable
|
|
|
|
|
2018-07-15 08:00:00 +08:00
|
|
|
protected EntityAnimal(EntityTypes<?> entitytypes, World world) {
|
|
|
|
super(entitytypes, world);
|
2017-05-14 10:00:00 +08:00
|
|
|
@@ -41,6 +42,9 @@
|
2014-12-09 22:40:38 +08:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+ /* CraftBukkit start
|
|
|
|
+ // Function disabled as it has no special function anymore after
|
|
|
|
+ // setSitting is disabled.
|
|
|
|
public boolean damageEntity(DamageSource damagesource, float f) {
|
|
|
|
if (this.isInvulnerable(damagesource)) {
|
|
|
|
return false;
|
2017-05-14 10:00:00 +08:00
|
|
|
@@ -49,6 +53,7 @@
|
2014-12-09 22:40:38 +08:00
|
|
|
return super.damageEntity(damagesource, f);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
+ // CraftBukkit end */
|
|
|
|
|
2018-07-15 08:00:00 +08:00
|
|
|
public float a(BlockPosition blockposition, IWorldReader iworldreader) {
|
|
|
|
return iworldreader.getType(blockposition.down()).getBlock() == this.bF ? 10.0F : iworldreader.A(blockposition) - 0.5F;
|
|
|
|
@@ -134,6 +139,7 @@
|
2017-05-14 10:00:00 +08:00
|
|
|
if (entityhuman != null) {
|
2018-07-15 08:00:00 +08:00
|
|
|
this.bD = entityhuman.getUniqueID();
|
2017-05-14 10:00:00 +08:00
|
|
|
}
|
2016-06-19 13:00:39 +08:00
|
|
|
+ this.breedItem = entityhuman.inventory.getItemInHand(); // CraftBukkit
|
2017-05-14 10:00:00 +08:00
|
|
|
|
2016-06-19 13:00:39 +08:00
|
|
|
this.world.broadcastEntityEffect(this, (byte) 18);
|
|
|
|
}
|