Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-25 07:40:06 +01:00
SPIGOT-5965: BlockRedstoneEvent.setNewCurrent(0) crashes server
Dieser Commit ist enthalten in:
Ursprung
60f8a29d12
Commit
72f3689092
@ -9,7 +9,7 @@
|
|||||||
public class BlockRedstoneWire extends Block {
|
public class BlockRedstoneWire extends Block {
|
||||||
|
|
||||||
public static final BlockStateEnum<BlockPropertyRedstoneSide> NORTH = BlockProperties.X;
|
public static final BlockStateEnum<BlockPropertyRedstoneSide> NORTH = BlockProperties.X;
|
||||||
@@ -213,7 +215,14 @@
|
@@ -213,7 +215,16 @@
|
||||||
private void a(World world, BlockPosition blockposition, IBlockData iblockdata) {
|
private void a(World world, BlockPosition blockposition, IBlockData iblockdata) {
|
||||||
int i = this.a(world, blockposition);
|
int i = this.a(world, blockposition);
|
||||||
|
|
||||||
@ -21,6 +21,8 @@
|
|||||||
+ world.getServer().getPluginManager().callEvent(event);
|
+ world.getServer().getPluginManager().callEvent(event);
|
||||||
+
|
+
|
||||||
+ i = event.getNewCurrent();
|
+ i = event.getNewCurrent();
|
||||||
|
+ }
|
||||||
|
+ if (oldPower != i) {
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
if (world.getType(blockposition) == iblockdata) {
|
if (world.getType(blockposition) == iblockdata) {
|
||||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockRedstoneWire.POWER, i), 2);
|
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockRedstoneWire.POWER, i), 2);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren