summaryrefslogtreecommitdiffstats
path: root/nms-patches/BlockBloodStone.patch
blob: f6dfde8794c87d1d0af415b6713df5adf0ab70bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- /home/matt/mc-dev-private//net/minecraft/server/BlockBloodStone.java	2015-02-26 22:40:22.031608145 +0000
+++ src/main/java/net/minecraft/server/BlockBloodStone.java	2015-02-26 22:40:22.031608145 +0000
@@ -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
 }