Commits
md_5 authored a8a4bedd2a9
1 1 | --- a/net/minecraft/server/Block.java |
2 2 | +++ b/net/minecraft/server/Block.java |
3 3 | |
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 - | |
12 + | |
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 - | |
22 + | |
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 - | |
31 + | |
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 - | |
40 + | |
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) { |