@@ -1,45 +1,32 @@
|
||||
--- a/net/minecraft/server/BlockOre.java
|
||||
+++ b/net/minecraft/server/BlockOre.java
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
public void dropNaturally(IBlockData iblockdata, World world, BlockPosition blockposition, float f, int i) {
|
||||
super.dropNaturally(iblockdata, world, blockposition, f, i);
|
||||
@@ -15,6 +15,7 @@
|
||||
@Override
|
||||
public void dropNaturally(IBlockData iblockdata, World world, BlockPosition blockposition, ItemStack itemstack) {
|
||||
super.dropNaturally(iblockdata, world, blockposition, itemstack);
|
||||
+ /* CraftBukkit start - Delegated to getExpDrop
|
||||
if (this.getDropType(iblockdata, world, blockposition, i) != this) {
|
||||
int j = 0;
|
||||
if (EnchantmentManager.getEnchantmentLevel(Enchantments.SILK_TOUCH, itemstack) == 0) {
|
||||
int i = this.a(world.random);
|
||||
|
||||
@@ -49,9 +50,34 @@
|
||||
|
||||
this.dropExperience(world, blockposition, j);
|
||||
@@ -22,6 +23,21 @@
|
||||
this.dropExperience(world, blockposition, i);
|
||||
}
|
||||
}
|
||||
+ // */
|
||||
|
||||
}
|
||||
|
||||
+
|
||||
+ @Override
|
||||
+ public int getExpDrop(IBlockData iblockdata, World world, BlockPosition blockposition, int enchantmentLevel) {
|
||||
+ if (this.getDropType(iblockdata, world, blockposition, enchantmentLevel) != this) {
|
||||
+ int j = 0;
|
||||
+ public int getExpDrop(IBlockData iblockdata, World world, BlockPosition blockposition, ItemStack itemstack) {
|
||||
+ if (EnchantmentManager.getEnchantmentLevel(Enchantments.SILK_TOUCH, itemstack) == 0) {
|
||||
+ int i = this.a(world.random);
|
||||
+
|
||||
+ if (this == Blocks.COAL_ORE) {
|
||||
+ j = MathHelper.nextInt(world.random, 0, 2);
|
||||
+ } else if (this == Blocks.DIAMOND_ORE) {
|
||||
+ j = MathHelper.nextInt(world.random, 3, 7);
|
||||
+ } else if (this == Blocks.EMERALD_ORE) {
|
||||
+ j = MathHelper.nextInt(world.random, 3, 7);
|
||||
+ } else if (this == Blocks.LAPIS_ORE) {
|
||||
+ j = MathHelper.nextInt(world.random, 2, 5);
|
||||
+ } else if (this == Blocks.NETHER_QUARTZ_ORE) {
|
||||
+ j = MathHelper.nextInt(world.random, 2, 5);
|
||||
+ if (i > 0) {
|
||||
+ return i;
|
||||
+ }
|
||||
+
|
||||
+ return j;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+ // CraftBukkit end
|
||||
+ }
|
||||
+
|
||||
public ItemStack a(IBlockAccess iblockaccess, BlockPosition blockposition, IBlockData iblockdata) {
|
||||
return new ItemStack(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user