3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-22 14:28:09 +01:00
Paper/nms-patches/BlockBloodStone.patch

29 Zeilen
974 B
Diff

2015-05-25 12:37:24 +02:00
--- a/net/minecraft/server/BlockBloodStone.java
+++ b/net/minecraft/server/BlockBloodStone.java
@@ -1,5 +1,7 @@
package net.minecraft.server;
+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
+
public class BlockBloodStone extends Block {
public BlockBloodStone() {
@@ -10,4 +12,17 @@
public MaterialMapColor g(IBlockData iblockdata) {
return MaterialMapColor.K;
}
+
+ // CraftBukkit start
+ @Override
+ public void doPhysics(World world, BlockPosition position, IBlockData iblockdata, Block block) {
+ if (block != null && block.isPowerSource()) {
+ org.bukkit.block.Block bl = world.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ());
+ int power = bl.getBlockPower();
+
+ BlockRedstoneEvent event = new BlockRedstoneEvent(bl, power, power);
+ world.getServer().getPluginManager().callEvent(event);
+ }
+ }
+ // CraftBukkit end
}