PaperMC/paper-server/nms-patches/net/minecraft/world/level/block/BlockBeehive.patch
CraftBukkit/Spigot 8a3c8cfcd4 Update to Minecraft 1.20.2
By: md_5 <git@md-5.net>
2023-09-22 02:40:00 +10:00

28 lines
1.2 KiB
Diff

--- a/net/minecraft/world/level/block/BlockBeehive.java
+++ b/net/minecraft/world/level/block/BlockBeehive.java
@@ -112,7 +112,7 @@
if (entitybee.getTarget() == null) {
EntityHuman entityhuman = (EntityHuman) SystemUtils.getRandom(list1, world.random);
- entitybee.setTarget(entityhuman);
+ entitybee.setTarget(entityhuman, org.bukkit.event.entity.EntityTargetEvent.TargetReason.CLOSEST_PLAYER, true); // CraftBukkit
}
}
}
@@ -338,4 +338,16 @@
return super.updateShape(iblockdata, enumdirection, iblockdata1, generatoraccess, blockposition, blockposition1);
}
+
+ // CraftBukkit start - fix MC-227255
+ @Override
+ public IBlockData rotate(IBlockData iblockdata, EnumBlockRotation enumblockrotation) {
+ return iblockdata.setValue(BlockBeehive.FACING, enumblockrotation.rotate(iblockdata.getValue(BlockBeehive.FACING)));
+ }
+
+ @Override
+ public IBlockData mirror(IBlockData iblockdata, EnumBlockMirror enumblockmirror) {
+ return iblockdata.rotate(enumblockmirror.getRotation(iblockdata.getValue(BlockBeehive.FACING)));
+ }
+ // CraftBukkit end
}