mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 18:27:41 +01:00
9d740b84b0
By: md_5 <git@md-5.net>
32 lines
1.4 KiB
Diff
32 lines
1.4 KiB
Diff
--- a/net/minecraft/world/level/block/BlockBell.java
|
|
+++ b/net/minecraft/world/level/block/BlockBell.java
|
|
@@ -136,6 +136,11 @@
|
|
if (enumdirection == null) {
|
|
enumdirection = (EnumDirection) world.getBlockState(blockposition).getValue(BlockBell.FACING);
|
|
}
|
|
+ // CraftBukkit start
|
|
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBellRingEvent(world, blockposition, enumdirection, entity)) {
|
|
+ return false;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
|
|
((TileEntityBell) tileentity).onHit(enumdirection);
|
|
world.playSound((EntityHuman) null, blockposition, SoundEffects.BELL_BLOCK, SoundCategory.BLOCKS, 2.0F, 1.0F);
|
|
@@ -262,4 +267,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
|
|
}
|