3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-27 08:30:06 +01:00
Paper/nms-patches/EntityAnimal.patch

37 Zeilen
1.1 KiB
Diff

2015-05-25 12:37:24 +02:00
--- a/net/minecraft/server/EntityAnimal.java
+++ b/net/minecraft/server/EntityAnimal.java
2019-04-23 04:00:00 +02:00
@@ -8,6 +8,7 @@
2019-06-21 12:00:00 +02:00
2019-04-23 04:00:00 +02:00
public int loveTicks;
2018-10-22 21:00:00 +02:00
public UUID breedCause;
2016-06-19 07:00:39 +02:00
+ public ItemStack breedItem; // CraftBukkit - Add breedItem variable
2019-04-23 04:00:00 +02:00
protected EntityAnimal(EntityTypes<? extends EntityAnimal> entitytypes, World world) {
2018-07-15 02:00:00 +02:00
super(entitytypes, world);
2019-06-21 12:00:00 +02:00
@@ -42,6 +43,9 @@
}
+ /* CraftBukkit start
+ // Function disabled as it has no special function anymore after
+ // setSitting is disabled.
2019-04-23 04:00:00 +02:00
@Override
public boolean damageEntity(DamageSource damagesource, float f) {
if (this.isInvulnerable(damagesource)) {
2019-06-21 12:00:00 +02:00
@@ -51,6 +55,7 @@
return super.damageEntity(damagesource, f);
}
}
+ // CraftBukkit end */
2019-04-23 04:00:00 +02:00
@Override
2018-07-15 02:00:00 +02:00
public float a(BlockPosition blockposition, IWorldReader iworldreader) {
2019-06-21 12:00:00 +02:00
@@ -139,6 +144,7 @@
2017-05-14 04:00:00 +02:00
if (entityhuman != null) {
2018-10-22 21:00:00 +02:00
this.breedCause = entityhuman.getUniqueID();
2017-05-14 04:00:00 +02:00
}
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);
}