diff options
Diffstat (limited to 'patch-remap/og/net/minecraft/world/level/block/BlockRedstoneLamp.patch')
-rw-r--r-- | patch-remap/og/net/minecraft/world/level/block/BlockRedstoneLamp.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/world/level/block/BlockRedstoneLamp.patch b/patch-remap/og/net/minecraft/world/level/block/BlockRedstoneLamp.patch new file mode 100644 index 0000000000..57cd0c7351 --- /dev/null +++ b/patch-remap/og/net/minecraft/world/level/block/BlockRedstoneLamp.patch @@ -0,0 +1,35 @@ +--- a/net/minecraft/world/level/block/BlockRedstoneLamp.java ++++ b/net/minecraft/world/level/block/BlockRedstoneLamp.java +@@ -12,6 +12,8 @@ + import net.minecraft.world.level.block.state.IBlockData; + import net.minecraft.world.level.block.state.properties.BlockStateBoolean; + ++import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit ++ + public class BlockRedstoneLamp extends Block { + + public static final MapCodec<BlockRedstoneLamp> CODEC = simpleCodec(BlockRedstoneLamp::new); +@@ -42,6 +44,11 @@ + if (flag1) { + world.scheduleTick(blockposition, (Block) this, 4); + } else { ++ // CraftBukkit start ++ if (CraftEventFactory.callRedstoneChange(world, blockposition, 0, 15).getNewCurrent() != 15) { ++ return; ++ } ++ // CraftBukkit end + world.setBlock(blockposition, (IBlockData) iblockdata.cycle(BlockRedstoneLamp.LIT), 2); + } + } +@@ -52,6 +59,11 @@ + @Override + public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, RandomSource randomsource) { + if ((Boolean) iblockdata.getValue(BlockRedstoneLamp.LIT) && !worldserver.hasNeighborSignal(blockposition)) { ++ // CraftBukkit start ++ if (CraftEventFactory.callRedstoneChange(worldserver, blockposition, 15, 0).getNewCurrent() != 0) { ++ return; ++ } ++ // CraftBukkit end + worldserver.setBlock(blockposition, (IBlockData) iblockdata.cycle(BlockRedstoneLamp.LIT), 2); + } + |