Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/nms-patches/EntityAnimal.patch

40 Zeilen
1.4 KiB
Diff

2015-05-25 12:37:24 +02:00
--- a/net/minecraft/server/EntityAnimal.java
+++ b/net/minecraft/server/EntityAnimal.java
2019-02-27 22:56:25 +01:00
@@ -6,8 +6,9 @@
public abstract class EntityAnimal extends EntityAgeable implements IAnimal {
2018-07-15 02:00:00 +02:00
protected Block bF;
2019-02-27 22:56:25 +01:00
- private int bC;
+ public int bC; // CraftBukkit - private -> public
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
2018-07-15 02:00:00 +02:00
protected EntityAnimal(EntityTypes<?> entitytypes, World world) {
super(entitytypes, 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 */
2018-07-15 02:00:00 +02: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 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);
}