13
0
geforkt von Mirrors/Paper
Paper/nms-patches/EntityAnimal.patch

37 Zeilen
1.2 KiB
Diff

2015-05-25 12:37:24 +02:00
--- a/net/minecraft/server/EntityAnimal.java
+++ b/net/minecraft/server/EntityAnimal.java
2017-05-14 04:00:00 +02:00
@@ -8,6 +8,7 @@
protected Block bA;
private int bx;
private UUID by;
2016-06-19 07:00:39 +02:00
+ public ItemStack breedItem; // CraftBukkit - Add breedItem variable
public EntityAnimal(World world) {
super(world);
2017-05-14 04:00:00 +02:00
@@ -41,6 +42,9 @@
}
+ /* 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 04:00:00 +02:00
@@ -49,6 +53,7 @@
return super.damageEntity(damagesource, f);
}
}
+ // CraftBukkit end */
public float a(BlockPosition blockposition) {
2017-05-14 04:00:00 +02:00
return this.world.getType(blockposition.down()).getBlock() == this.bA ? 10.0F : this.world.n(blockposition) - 0.5F;
@@ -130,6 +135,7 @@
if (entityhuman != null) {
this.by = entityhuman.getUniqueID();
}
2016-06-19 07:00:39 +02:00
+ this.breedItem = entityhuman.inventory.getItemInHand(); // CraftBukkit
2017-05-14 04:00:00 +02:00
2016-06-19 07:00:39 +02:00
this.world.broadcastEntityEffect(this, (byte) 18);
}