#1164, MC-227255, MC-253819: Fix rotation of beehives and bells

By: Jishuna <joshl5324@gmail.com>
This commit is contained in:
CraftBukkit/Spigot 2023-04-04 07:01:54 +10:00
parent d161541732
commit 7b627056c1
2 changed files with 34 additions and 0 deletions

View file

@ -9,3 +9,20 @@
}
}
}
@@ -331,4 +331,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
}

View file

@ -12,3 +12,20 @@
((TileEntityBell) tileentity).onHit(enumdirection);
world.playSound((EntityHuman) null, blockposition, SoundEffects.BELL_BLOCK, SoundCategory.BLOCKS, 2.0F, 1.0F);
@@ -268,4 +273,16 @@
public boolean isPathfindable(IBlockData iblockdata, IBlockAccess iblockaccess, BlockPosition blockposition, PathMode pathmode) {
return false;
}
+
+ // CraftBukkit start - fix MC-253819
+ @Override
+ public IBlockData rotate(IBlockData iblockdata, EnumBlockRotation enumblockrotation) {
+ return iblockdata.setValue(BlockBell.FACING, enumblockrotation.rotate(iblockdata.getValue(BlockBell.FACING)));
+ }
+
+ @Override
+ public IBlockData mirror(IBlockData iblockdata, EnumBlockMirror enumblockmirror) {
+ return iblockdata.rotate(enumblockmirror.getRotation(iblockdata.getValue(BlockBell.FACING)));
+ }
+ // CraftBukkit end
}