mirror of
https://github.com/PaperMC/Paper.git
synced 2024-09-12 15:08:27 +02:00
Fix missing event call for BlockRedstoneLamp
This commit is contained in:
parent
cfd6933002
commit
d063cd0d3b
@ -9,8 +9,15 @@
|
||||
public class BlockRedstoneLamp extends Block {
|
||||
|
||||
private final boolean a;
|
||||
@@ -20,6 +22,11 @@
|
||||
@@ -18,8 +20,18 @@
|
||||
public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) {
|
||||
if (!world.isClientSide) {
|
||||
if (this.a && !world.isBlockIndirectlyPowered(blockposition)) {
|
||||
+ // CraftBukkit start
|
||||
+ if (CraftEventFactory.callRedstoneChange(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), 15, 0).getNewCurrent() != 0) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
world.setTypeAndData(blockposition, Blocks.REDSTONE_LAMP.getBlockData(), 2);
|
||||
} else if (!this.a && world.isBlockIndirectlyPowered(blockposition)) {
|
||||
+ // CraftBukkit start
|
||||
@ -21,7 +28,7 @@
|
||||
world.setTypeAndData(blockposition, Blocks.LIT_REDSTONE_LAMP.getBlockData(), 2);
|
||||
}
|
||||
|
||||
@@ -31,6 +38,11 @@
|
||||
@@ -31,6 +43,11 @@
|
||||
if (this.a && !world.isBlockIndirectlyPowered(blockposition)) {
|
||||
world.a(blockposition, (Block) this, 4);
|
||||
} else if (!this.a && world.isBlockIndirectlyPowered(blockposition)) {
|
||||
@ -33,7 +40,7 @@
|
||||
world.setTypeAndData(blockposition, Blocks.LIT_REDSTONE_LAMP.getBlockData(), 2);
|
||||
}
|
||||
|
||||
@@ -40,6 +52,11 @@
|
||||
@@ -40,6 +57,11 @@
|
||||
public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
|
||||
if (!world.isClientSide) {
|
||||
if (this.a && !world.isBlockIndirectlyPowered(blockposition)) {
|
||||
|
Loading…
Reference in New Issue
Block a user