Update to Minecraft 1.16.1

This commit is contained in:
md_5
2020-06-25 10:00:00 +10:00
parent be6aaf046e
commit 7ea3c040bc
424 changed files with 5960 additions and 5636 deletions

View File

@@ -8,10 +8,10 @@
+import org.bukkit.craftbukkit.event.CraftEventFactory;
+// CraftBukkit end
public class EntitySnowman extends EntityGolem implements IRangedEntity {
public class EntitySnowman extends EntityGolem implements IShearable, IRangedEntity {
@@ -62,7 +65,7 @@
}
@@ -60,7 +63,7 @@
int k = MathHelper.floor(this.locZ());
if (this.world.getBiome(new BlockPosition(i, 0, k)).getAdjustedTemperature(new BlockPosition(i, j, k)) > 1.0F) {
- this.damageEntity(DamageSource.BURN, 1.0F);
@@ -19,7 +19,7 @@
}
if (!this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
@@ -78,7 +81,7 @@
@@ -76,7 +79,7 @@
BlockPosition blockposition = new BlockPosition(i, j, k);
if (this.world.getType(blockposition).isAir() && this.world.getBiome(blockposition).getAdjustedTemperature(blockposition) < 0.8F && iblockdata.canPlace(this.world, blockposition)) {
@@ -28,15 +28,15 @@
}
}
}
@@ -110,6 +113,11 @@
@@ -107,6 +110,11 @@
ItemStack itemstack = entityhuman.b(enumhand);
if (itemstack.getItem() == Items.SHEARS && this.hasPumpkin()) {
if (itemstack.getItem() == Items.SHEARS && this.canShear()) {
+ // CraftBukkit start
+ if (!CraftEventFactory.handlePlayerShearEntityEvent(entityhuman, this, itemstack, enumhand)) {
+ return EnumInteractionResult.PASS;
+ }
+ // CraftBukkit end
this.shear(SoundCategory.PLAYERS);
if (!this.world.isClientSide) {
+ // CraftBukkit start
+ if (!CraftEventFactory.handlePlayerShearEntityEvent(entityhuman, this, itemstack, enumhand)) {
+ return false;
+ }
+ // CraftBukkit end
this.setHasPumpkin(false);
itemstack.damage(1, entityhuman, (entityhuman1) -> {
entityhuman1.broadcastItemBreak(enumhand);