mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
Update to Minecraft 1.16.1
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user