@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityHorseAbstract.java
|
||||
+++ b/net/minecraft/server/EntityHorseAbstract.java
|
||||
@@ -6,6 +6,7 @@
|
||||
@@ -5,6 +5,7 @@
|
||||
import java.util.UUID;
|
||||
import java.util.function.Predicate;
|
||||
import javax.annotation.Nullable;
|
||||
@@ -9,23 +9,23 @@
|
||||
public abstract class EntityHorseAbstract extends EntityAnimal implements IInventoryListener, IJumpable {
|
||||
|
||||
@@ -33,6 +34,7 @@
|
||||
private float bY;
|
||||
protected boolean bK = true;
|
||||
protected int bL;
|
||||
private float bW;
|
||||
protected boolean bH = true;
|
||||
protected int bI;
|
||||
+ public int maxDomestication = 100; // CraftBukkit - store max domestication value
|
||||
|
||||
protected EntityHorseAbstract(EntityTypes<?> entitytypes, World world) {
|
||||
protected EntityHorseAbstract(EntityTypes<? extends EntityHorseAbstract> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -212,7 +214,7 @@
|
||||
@@ -209,7 +211,7 @@
|
||||
public void loadChest() {
|
||||
InventoryHorseChest inventoryhorsechest = this.inventoryChest;
|
||||
InventorySubcontainer inventorysubcontainer = this.inventoryChest;
|
||||
|
||||
- this.inventoryChest = new InventoryHorseChest(this.getDisplayName(), this.dA());
|
||||
+ this.inventoryChest = new InventoryHorseChest(this.getDisplayName(), this.dA(), this); // CraftBukkit
|
||||
this.inventoryChest.a(this.getCustomName());
|
||||
if (inventoryhorsechest != null) {
|
||||
inventoryhorsechest.b(this);
|
||||
@@ -348,7 +350,7 @@
|
||||
- this.inventoryChest = new InventorySubcontainer(this.getChestSlots());
|
||||
+ this.inventoryChest = new InventorySubcontainer(this.getChestSlots(), (org.bukkit.entity.AbstractHorse) this.getBukkitEntity()); // CraftBukkit
|
||||
if (inventorysubcontainer != null) {
|
||||
inventorysubcontainer.b(this);
|
||||
int i = Math.min(inventorysubcontainer.getSize(), this.inventoryChest.getSize());
|
||||
@@ -332,7 +334,7 @@
|
||||
}
|
||||
|
||||
public int getMaxDomestication() {
|
||||
@@ -33,8 +33,8 @@
|
||||
+ return this.maxDomestication; // CraftBukkit - return stored max domestication instead of 100
|
||||
}
|
||||
|
||||
protected float cD() {
|
||||
@@ -408,7 +410,7 @@
|
||||
@Override
|
||||
@@ -393,7 +395,7 @@
|
||||
}
|
||||
|
||||
if (this.getHealth() < this.getMaxHealth() && f > 0.0F) {
|
||||
@@ -43,33 +43,16 @@
|
||||
flag = true;
|
||||
}
|
||||
|
||||
@@ -459,7 +461,7 @@
|
||||
}
|
||||
|
||||
public void die(DamageSource damagesource) {
|
||||
- super.die(damagesource);
|
||||
+ // super.die(damagesource); // Moved down
|
||||
if (!this.world.isClientSide && this.inventoryChest != null) {
|
||||
for (int i = 0; i < this.inventoryChest.getSize(); ++i) {
|
||||
ItemStack itemstack = this.inventoryChest.getItem(i);
|
||||
@@ -470,6 +472,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
+ super.die(damagesource); // CraftBukkit
|
||||
}
|
||||
|
||||
public void movementTick() {
|
||||
@@ -480,7 +483,7 @@
|
||||
@@ -469,7 +471,7 @@
|
||||
super.movementTick();
|
||||
if (!this.world.isClientSide) {
|
||||
if (!this.world.isClientSide && this.isAlive()) {
|
||||
if (this.random.nextInt(900) == 0 && this.deathTicks == 0) {
|
||||
- this.heal(1.0F);
|
||||
+ this.heal(1.0F, RegainReason.REGEN); // CraftBukkit
|
||||
}
|
||||
|
||||
if (this.dY()) {
|
||||
@@ -716,6 +719,7 @@
|
||||
if (this.et()) {
|
||||
@@ -716,6 +718,7 @@
|
||||
if (this.getOwnerUUID() != null) {
|
||||
nbttagcompound.setString("OwnerUUID", this.getOwnerUUID().toString());
|
||||
}
|
||||
@@ -77,7 +60,7 @@
|
||||
|
||||
if (!this.inventoryChest.getItem(0).isEmpty()) {
|
||||
nbttagcompound.set("SaddleItem", this.inventoryChest.getItem(0).save(new NBTTagCompound()));
|
||||
@@ -742,6 +746,11 @@
|
||||
@@ -743,6 +746,11 @@
|
||||
if (!s.isEmpty()) {
|
||||
this.setOwnerUUID(UUID.fromString(s));
|
||||
}
|
||||
@@ -89,9 +72,9 @@
|
||||
|
||||
AttributeInstance attributeinstance = this.getAttributeMap().a("Speed");
|
||||
|
||||
@@ -794,6 +803,18 @@
|
||||
}
|
||||
@@ -800,6 +808,18 @@
|
||||
|
||||
@Override
|
||||
public void b(int i) {
|
||||
+ // CraftBukkit start
|
||||
+ float power;
|
||||
@@ -106,5 +89,5 @@
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
this.canSlide = true;
|
||||
this.dH();
|
||||
this.eB();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user