mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 01:39:52 +03:00
29 lines
1.1 KiB
Diff
29 lines
1.1 KiB
Diff
--- ../src-base/minecraft/net/minecraft/block/BlockBasePressurePlate.java
|
|
+++ ../src-work/minecraft/net/minecraft/block/BlockBasePressurePlate.java
|
|
@@ -14,6 +14,7 @@
|
|
import net.minecraft.util.math.BlockPos;
|
|
import net.minecraft.world.IBlockAccess;
|
|
import net.minecraft.world.World;
|
|
+import org.bukkit.event.block.BlockRedstoneEvent;
|
|
|
|
public abstract class BlockBasePressurePlate extends Block
|
|
{
|
|
@@ -125,6 +126,17 @@
|
|
boolean flag = oldRedstoneStrength > 0;
|
|
boolean flag1 = i > 0;
|
|
|
|
+ org.bukkit.World bworld = worldIn.getWorld();
|
|
+ org.bukkit.plugin.PluginManager manager = worldIn.getServer().getPluginManager();
|
|
+
|
|
+ if (flag != flag1) {
|
|
+ BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(bworld.getBlockAt(pos.getX(), pos.getY(), pos.getZ()), oldRedstoneStrength, i);
|
|
+ manager.callEvent(eventRedstone);
|
|
+
|
|
+ flag1 = eventRedstone.getNewCurrent() > 0;
|
|
+ i = eventRedstone.getNewCurrent();
|
|
+ }
|
|
+
|
|
if (oldRedstoneStrength != i)
|
|
{
|
|
state = this.setRedstoneStrength(state, i);
|