Commits

md_5 authored c5e9a169fa5
Minecraft 1.9.4
No tags

nms-patches/Block.patch

Modified
1 1 --- a/net/minecraft/server/Block.java
2 2 +++ b/net/minecraft/server/Block.java
3 -@@ -34,7 +34,7 @@
3 +@@ -35,7 +35,7 @@
4 4 private String name;
5 5
6 6 public static int getId(Block block) {
7 7 - return Block.REGISTRY.a((Object) block);
8 8 + return Block.REGISTRY.a(block); // CraftBukkit - decompile error
9 9 }
10 10
11 11 public static int getCombinedId(IBlockData iblockdata) {
12 -@@ -301,7 +301,8 @@
12 +@@ -327,7 +327,8 @@
13 13 int j = this.getDropCount(i, world.random);
14 14
15 15 for (int k = 0; k < j; ++k) {
16 16 - if (world.random.nextFloat() <= f) {
17 17 + // CraftBukkit - <= to < to allow for plugins to completely disable block drops from explosions
18 18 + if (world.random.nextFloat() < f) {
19 19 Item item = this.getDropType(iblockdata, world.random, i);
20 20
21 21 if (item != null) {
22 -@@ -825,7 +826,7 @@
22 +@@ -863,7 +864,7 @@
23 23
24 24 if (hashset.contains(block16)) {
25 25 for (int i = 0; i < 15; ++i) {
26 26 - int j = Block.REGISTRY.a((Object) block16) << 4 | i;
27 27 + int j = Block.REGISTRY.a(block16) << 4 | i; // CraftBukkit - decompile error
28 28
29 29 Block.REGISTRY_ID.a(block16.fromLegacyData(i), j);
30 30 }
31 -@@ -834,7 +835,7 @@
31 +@@ -872,7 +873,7 @@
32 32
33 33 while (iterator2.hasNext()) {
34 34 IBlockData iblockdata = (IBlockData) iterator2.next();
35 35 - int k = Block.REGISTRY.a((Object) block16) << 4 | block16.toLegacyData(iblockdata);
36 36 + int k = Block.REGISTRY.a(block16) << 4 | block16.toLegacyData(iblockdata); // CraftBukkit - decompile error
37 37
38 38 Block.REGISTRY_ID.a(iblockdata, k);
39 39 }
40 -@@ -843,6 +844,12 @@
40 +@@ -881,6 +882,12 @@
41 41
42 42 }
43 43
44 44 + // CraftBukkit start
45 45 + public int getExpDrop(World world, IBlockData data, int enchantmentLevel) {
46 46 + return 0;
47 47 + }
48 48 + // CraftBukkit end
49 49 +
50 50 private static void a(int i, MinecraftKey minecraftkey, Block block) {

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut