Update to Minecraft 1.14-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-04-23 12:00:00 +10:00
parent 0e98365784
commit a0f2b74c8d
560 changed files with 10642 additions and 10867 deletions

View File

@@ -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);
}
}