Minecraft 1.9.4

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2016-05-10 21:47:39 +10:00
parent c9a6e9175c
commit d506c12c07
236 changed files with 1471 additions and 1822 deletions

View File

@@ -1,8 +1,8 @@
--- a/net/minecraft/server/BlockRedstoneOre.java
+++ b/net/minecraft/server/BlockRedstoneOre.java
@@ -2,6 +2,11 @@
@@ -3,6 +3,11 @@
import java.util.Random;
import javax.annotation.Nullable;
+// CraftBukkit start
+import org.bukkit.craftbukkit.event.CraftEventFactory;
@@ -12,7 +12,7 @@
public class BlockRedstoneOre extends Block {
private final boolean a;
@@ -20,23 +25,46 @@
@@ -21,23 +26,45 @@
}
public void attack(World world, BlockPosition blockposition, EntityHuman entityhuman) {
@@ -25,7 +25,6 @@
- this.interact(world, blockposition);
- super.stepOn(world, blockposition, entity);
+ // CraftBukkit start
+ // PAIL: Rename this method
+ // this.interact(world, blockposition);
+ // super.stepOn(world, blockposition, entity);
+ if (entity instanceof EntityHuman) {
@@ -46,7 +45,7 @@
}
+
public boolean interact(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman, EnumHand enumhand, ItemStack itemstack, EnumDirection enumdirection, float f, float f1, float f2) {
public boolean interact(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman, EnumHand enumhand, @Nullable ItemStack itemstack, EnumDirection enumdirection, float f, float f1, float f2) {
- this.interact(world, blockposition);
+ this.interact(world, blockposition, entityhuman); // CraftBukkit - add entityhuman
return super.interact(world, blockposition, iblockdata, entityhuman, enumhand, itemstack, enumdirection, f, f1, f2);
@@ -64,7 +63,7 @@
world.setTypeUpdate(blockposition, Blocks.LIT_REDSTONE_ORE.getBlockData());
}
@@ -44,6 +72,11 @@
@@ -45,6 +72,11 @@
public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
if (this == Blocks.LIT_REDSTONE_ORE) {
@@ -76,7 +75,7 @@
world.setTypeUpdate(blockposition, Blocks.REDSTONE_ORE.getBlockData());
}
@@ -63,12 +96,24 @@
@@ -65,12 +97,25 @@
public void dropNaturally(World world, BlockPosition blockposition, IBlockData iblockdata, float f, int i) {
super.dropNaturally(world, blockposition, iblockdata, f, i);
@@ -87,13 +86,14 @@
this.dropExperience(world, blockposition, j);
}
+ // */
+
+ }
+
+ @Override
+ public int getExpDrop(World world, IBlockData data, int i) {
+ if (this.getDropType(data, world.random, i) != Item.getItemOf(this)) {
+ int j = 1 + world.random.nextInt(5);
+
+ return j;
+ }
+ return 0;