3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-21 05:50:05 +01:00
Paper/nms-patches/EntityAnimal.patch
2019-06-21 20:00:00 +10:00

37 Zeilen
1.1 KiB
Diff

--- a/net/minecraft/server/EntityAnimal.java
+++ b/net/minecraft/server/EntityAnimal.java
@@ -8,6 +8,7 @@
public int loveTicks;
public UUID breedCause;
+ public ItemStack breedItem; // CraftBukkit - Add breedItem variable
protected EntityAnimal(EntityTypes<? extends EntityAnimal> entitytypes, World world) {
super(entitytypes, world);
@@ -42,6 +43,9 @@
}
+ /* CraftBukkit start
+ // Function disabled as it has no special function anymore after
+ // setSitting is disabled.
@Override
public boolean damageEntity(DamageSource damagesource, float f) {
if (this.isInvulnerable(damagesource)) {
@@ -51,6 +55,7 @@
return super.damageEntity(damagesource, f);
}
}
+ // CraftBukkit end */
@Override
public float a(BlockPosition blockposition, IWorldReader iworldreader) {
@@ -139,6 +144,7 @@
if (entityhuman != null) {
this.breedCause = entityhuman.getUniqueID();
}
+ this.breedItem = entityhuman.inventory.getItemInHand(); // CraftBukkit
this.world.broadcastEntityEffect(this, (byte) 18);
}