Update to Minecraft 1.13-pre7

This commit is contained in:
md_5
2018-07-15 10:00:00 +10:00
parent 57ab4cfc6f
commit 421c1728c8
608 changed files with 17788 additions and 9378 deletions

View File

@@ -14,13 +14,13 @@
public int a;
@@ -34,6 +40,7 @@
public void B_() {
super.B_();
public void tick() {
super.tick();
+ EntityHuman prevTarget = this.targetPlayer;// CraftBukkit - store old target
if (this.c > 0) {
--this.c;
}
@@ -68,6 +75,16 @@
@@ -70,6 +77,16 @@
}
if (this.targetPlayer != null) {
@@ -37,7 +37,7 @@
double d1 = (this.targetPlayer.locX - this.locX) / 8.0D;
double d2 = (this.targetPlayer.locY + (double) this.targetPlayer.getHeadHeight() / 2.0D - this.locY) / 8.0D;
double d3 = (this.targetPlayer.locZ - this.locZ) / 8.0D;
@@ -80,6 +97,8 @@
@@ -82,6 +99,8 @@
this.motY += d2 / d4 * d5 * 0.1D;
this.motZ += d3 / d4 * d5 * 0.1D;
}
@@ -46,22 +46,21 @@
}
this.move(EnumMoveType.SELF, this.motX, this.motY, this.motZ);
@@ -148,12 +167,18 @@
if (!itemstack.isEmpty() && itemstack.h()) {
int i = Math.min(this.d(this.value), itemstack.i());
@@ -155,12 +174,18 @@
if (!itemstack.isEmpty() && itemstack.f()) {
int i = Math.min(this.c(this.value), itemstack.getDamage());
- this.value -= this.c(i);
- itemstack.setData(itemstack.i() - i);
- }
- this.value -= this.b(i);
- itemstack.setDamage(itemstack.getDamage() - i);
+ // CraftBukkit start
+ org.bukkit.event.player.PlayerItemMendEvent event = CraftEventFactory.callPlayerItemMendEvent(entityhuman, this, itemstack, i);
+ i = event.getRepairAmount();
+ if (!event.isCancelled()) {
+ this.value -= this.c(i);
+ itemstack.setData(itemstack.i() - i);
+ this.value -= this.b(i);
+ itemstack.setDamage(itemstack.getDamage() - i);
+ }
+ // CraftBukkit end
+ }
}
if (this.value > 0) {
- entityhuman.giveExp(this.value);
@@ -69,7 +68,7 @@
}
this.die();
@@ -175,6 +200,24 @@
@@ -182,6 +207,24 @@
}
public static int getOrbValue(int i) {