mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
76326aa5f8
By: Doc <nachito94@msn.com>
15 lines
823 B
Diff
15 lines
823 B
Diff
--- a/net/minecraft/world/entity/monster/Bogged.java
|
|
+++ b/net/minecraft/world/entity/monster/Bogged.java
|
|
@@ -79,6 +79,12 @@
|
|
ItemStack itemstack = entityhuman.getItemInHand(enumhand);
|
|
|
|
if (itemstack.is(Items.SHEARS) && this.readyForShearing()) {
|
|
+ // CraftBukkit start
|
|
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.handlePlayerShearEntityEvent(entityhuman, this, itemstack, enumhand)) {
|
|
+ this.getEntityData().markDirty(Bogged.DATA_SHEARED); // CraftBukkit - mark dirty to restore sheared state to clients
|
|
+ return EnumInteractionResult.PASS;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
this.shear(SoundCategory.PLAYERS);
|
|
this.gameEvent(GameEvent.SHEAR, entityhuman);
|
|
if (!this.level().isClientSide) {
|