Update to Minecraft 1.12-pre2

This commit is contained in:
md_5
2017-05-14 12:00:00 +10:00
parent 6e3cec8bc7
commit 5195487ec6
210 changed files with 2280 additions and 1974 deletions

View File

@@ -60,25 +60,25 @@
@@ -266,7 +288,7 @@
this.goalSit.setSitting(!this.isSitting());
this.bd = false;
this.navigation.o();
this.navigation.p();
- this.setGoalTarget((EntityLiving) null);
+ this.setGoalTarget((EntityLiving) null, TargetReason.FORGOT_TARGET, true); // CraftBukkit - reason
}
} else if (itemstack.getItem() == Items.BONE && !this.isAngry()) {
if (!entityhuman.abilities.canInstantlyBuild) {
@@ -274,12 +296,14 @@
@@ -274,12 +296,13 @@
}
if (!this.world.isClientSide) {
- if (this.random.nextInt(3) == 0) {
+ // CraftBukkit - added event call and isCancelled check.
+ if (this.random.nextInt(3) == 0 && !CraftEventFactory.callEntityTameEvent(this, entityhuman).isCancelled()) {
this.setTamed(true);
this.navigation.o();
this.c(entityhuman);
this.navigation.p();
this.setGoalTarget((EntityLiving) null);
this.goalSit.setSitting(true);
this.setHealth(20.0F);
- this.setHealth(20.0F);
+ this.setHealth(this.getMaxHealth()); // CraftBukkit - 20.0 -> getMaxHealth()
this.setOwnerUUID(entityhuman.getUniqueID());
this.p(true);
this.world.broadcastEntityEffect(this, (byte) 7);
} else {