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,19 +1,19 @@
--- a/net/minecraft/server/ItemBucket.java
+++ b/net/minecraft/server/ItemBucket.java
@@ -1,5 +1,12 @@
@@ -1,6 +1,12 @@
package net.minecraft.server;
import javax.annotation.Nullable;
+// CraftBukkit start
+import org.bukkit.craftbukkit.event.CraftEventFactory;
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
+import org.bukkit.event.player.PlayerBucketEmptyEvent;
+import org.bukkit.event.player.PlayerBucketFillEvent;
+// CraftBukkit end
+
public class ItemBucket extends Item {
private Block a;
@@ -31,15 +38,29 @@
@@ -33,15 +39,29 @@
Material material = iblockdata.getMaterial();
if (material == Material.WATER && ((Integer) iblockdata.get(BlockFluids.LEVEL)).intValue() == 0) {
@@ -45,7 +45,7 @@
} else {
return new InteractionResultWrapper(EnumInteractionResult.FAIL, itemstack);
}
@@ -50,7 +71,7 @@
@@ -52,7 +72,7 @@
if (!entityhuman.a(blockposition1, movingobjectposition.direction, itemstack)) {
return new InteractionResultWrapper(EnumInteractionResult.FAIL, itemstack);
@@ -54,7 +54,7 @@
entityhuman.b(StatisticList.b((Item) this));
return !entityhuman.abilities.canInstantlyBuild ? new InteractionResultWrapper(EnumInteractionResult.SUCCESS, new ItemStack(Items.BUCKET)) : new InteractionResultWrapper(EnumInteractionResult.SUCCESS, itemstack);
} else {
@@ -60,21 +81,28 @@
@@ -62,21 +82,28 @@
}
}
@@ -78,7 +78,7 @@
}
+ // CraftBukkit start
public boolean a(EntityHuman entityhuman, World world, BlockPosition blockposition) {
public boolean a(@Nullable EntityHuman entityhuman, World world, BlockPosition blockposition) {
+ return a(entityhuman, world, blockposition, null, blockposition, null);
+ }
+
@@ -87,7 +87,7 @@
if (this.a == Blocks.AIR) {
return false;
} else {
@@ -86,6 +114,15 @@
@@ -88,6 +115,15 @@
if (!world.isEmpty(blockposition) && !flag && !flag1) {
return false;
} else {