summaryrefslogtreecommitdiffstats
path: root/nms-patches/Block.patch
blob: 6631e445f3c88e2ba32d9210815e1e2d2467d7d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- /home/matt/mc-dev-private//net/minecraft/server/Block.java	2015-02-26 22:40:22.155608144 +0000
+++ src/main/java/net/minecraft/server/Block.java	2015-02-26 22:40:22.159608144 +0000
@@ -336,7 +336,8 @@
             int j = this.getDropCount(i, world.random);
 
             for (int k = 0; k < j; ++k) {
-                if (world.random.nextFloat() <= f) {
+                // CraftBukkit - <= to < to allow for plugins to completely disable block drops from explosions
+                if (world.random.nextFloat() < f) {
                     Item item = this.getDropType(iblockdata, world.random, i);
 
                     if (item != null) {
@@ -1002,4 +1003,10 @@
             return this.getBreakSound();
         }
     }
+
+    // CraftBukkit start
+    public int getExpDrop(World world, IBlockData data, int enchantmentLevel) {
+        return 0;
+    }
+    // CraftBukkit end
 }