mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-19 14:23:48 -07:00
Update to Minecraft 1.13-pre7
This commit is contained in:
@@ -1,31 +1,31 @@
|
||||
--- a/net/minecraft/server/EntityHorseAbstract.java
|
||||
+++ b/net/minecraft/server/EntityHorseAbstract.java
|
||||
@@ -6,6 +6,7 @@
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.function.Predicate;
|
||||
import javax.annotation.Nullable;
|
||||
+import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; // CraftBukkit
|
||||
|
||||
public abstract class EntityHorseAbstract extends EntityAnimal implements IInventoryListener, IJumpable {
|
||||
|
||||
@@ -39,6 +40,7 @@
|
||||
private float bT;
|
||||
protected boolean bF = true;
|
||||
protected int bG;
|
||||
@@ -33,6 +34,7 @@
|
||||
private float bY;
|
||||
protected boolean bK = true;
|
||||
protected int bL;
|
||||
+ public int maxDomestication = 100; // CraftBukkit - store max domestication value
|
||||
|
||||
public EntityHorseAbstract(World world) {
|
||||
super(world);
|
||||
@@ -214,7 +216,7 @@
|
||||
protected EntityHorseAbstract(EntityTypes<?> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -212,7 +214,7 @@
|
||||
public void loadChest() {
|
||||
InventoryHorseChest inventoryhorsechest = this.inventoryChest;
|
||||
|
||||
- this.inventoryChest = new InventoryHorseChest("HorseChest", this.dn());
|
||||
+ this.inventoryChest = new InventoryHorseChest("HorseChest", this.dn(), this); // CraftBukkit
|
||||
this.inventoryChest.a(this.getName());
|
||||
- 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);
|
||||
@@ -354,7 +356,7 @@
|
||||
@@ -348,7 +350,7 @@
|
||||
}
|
||||
|
||||
public int getMaxDomestication() {
|
||||
@@ -33,8 +33,8 @@
|
||||
+ return this.maxDomestication; // CraftBukkit - return stored max domestication instead of 100
|
||||
}
|
||||
|
||||
protected float cq() {
|
||||
@@ -414,7 +416,7 @@
|
||||
protected float cC() {
|
||||
@@ -408,7 +410,7 @@
|
||||
}
|
||||
|
||||
if (this.getHealth() < this.getMaxHealth() && f > 0.0F) {
|
||||
@@ -43,7 +43,7 @@
|
||||
flag = true;
|
||||
}
|
||||
|
||||
@@ -465,7 +467,7 @@
|
||||
@@ -459,7 +461,7 @@
|
||||
}
|
||||
|
||||
public void die(DamageSource damagesource) {
|
||||
@@ -52,24 +52,24 @@
|
||||
if (!this.world.isClientSide && this.inventoryChest != null) {
|
||||
for (int i = 0; i < this.inventoryChest.getSize(); ++i) {
|
||||
ItemStack itemstack = this.inventoryChest.getItem(i);
|
||||
@@ -476,6 +478,7 @@
|
||||
@@ -470,6 +472,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
+ super.die(damagesource); // CraftBukkit
|
||||
}
|
||||
|
||||
public void n() {
|
||||
@@ -486,7 +489,7 @@
|
||||
super.n();
|
||||
public void k() {
|
||||
@@ -480,7 +483,7 @@
|
||||
super.k();
|
||||
if (!this.world.isClientSide) {
|
||||
if (this.random.nextInt(900) == 0 && this.deathTicks == 0) {
|
||||
- this.heal(1.0F);
|
||||
+ this.heal(1.0F, RegainReason.REGEN); // CraftBukkit
|
||||
}
|
||||
|
||||
if (this.dJ()) {
|
||||
@@ -723,6 +726,7 @@
|
||||
if (this.dY()) {
|
||||
@@ -716,6 +719,7 @@
|
||||
if (this.getOwnerUUID() != null) {
|
||||
nbttagcompound.setString("OwnerUUID", this.getOwnerUUID().toString());
|
||||
}
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
if (!this.inventoryChest.getItem(0).isEmpty()) {
|
||||
nbttagcompound.set("SaddleItem", this.inventoryChest.getItem(0).save(new NBTTagCompound()));
|
||||
@@ -749,6 +753,11 @@
|
||||
@@ -742,6 +746,11 @@
|
||||
if (!s.isEmpty()) {
|
||||
this.setOwnerUUID(UUID.fromString(s));
|
||||
}
|
||||
@@ -89,10 +89,10 @@
|
||||
|
||||
AttributeInstance attributeinstance = this.getAttributeMap().a("Speed");
|
||||
|
||||
@@ -801,6 +810,18 @@
|
||||
@@ -794,6 +803,18 @@
|
||||
}
|
||||
|
||||
public void b_(int i) {
|
||||
public void b(int i) {
|
||||
+ // CraftBukkit start
|
||||
+ float power;
|
||||
+ if (i >= 90) {
|
||||
@@ -106,5 +106,5 @@
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
this.canSlide = true;
|
||||
this.dt();
|
||||
this.dH();
|
||||
}
|
||||
|
Reference in New Issue
Block a user