mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 12:13:54 -07:00
Update to Minecraft 1.13-pre7
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user