Stackable Buckets

This commit is contained in:
Byteflux
2015-06-01 22:27:22 -07:00
parent 45fc70b6fc
commit 257119a254
2 changed files with 218 additions and 1 deletions

View File

@@ -191,6 +191,47 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ return this.b(s);
+ }
+}
diff --git a/src/main/java/net/minecraft/server/ItemMilkBucket.java b/src/main/java/net/minecraft/server/ItemMilkBucket.java
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
--- /dev/null
+++ b/src/main/java/net/minecraft/server/ItemMilkBucket.java
@@ -0,0 +0,0 @@
+package net.minecraft.server;
+
+public class ItemMilkBucket extends Item {
+
+ public ItemMilkBucket() {
+ this.c(1);
+ this.a(CreativeModeTab.f);
+ }
+
+ public ItemStack b(ItemStack itemstack, World world, EntityHuman entityhuman) {
+ if (!entityhuman.abilities.canInstantlyBuild) {
+ --itemstack.count;
+ }
+
+ if (!world.isClientSide) {
+ entityhuman.removeAllEffects();
+ }
+
+ entityhuman.b(StatisticList.USE_ITEM_COUNT[Item.getId(this)]);
+ return itemstack.count <= 0 ? new ItemStack(Items.BUCKET) : itemstack;
+ }
+
+ public int d(ItemStack itemstack) {
+ return 32;
+ }
+
+ public EnumAnimation e(ItemStack itemstack) {
+ return EnumAnimation.DRINK;
+ }
+
+ public ItemStack a(ItemStack itemstack, World world, EntityHuman entityhuman) {
+ entityhuman.a(itemstack, this.d(itemstack));
+ return itemstack;
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MobEffectAttackDamage.java b/src/main/java/net/minecraft/server/MobEffectAttackDamage.java
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
@@ -324,4 +365,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ }
+}
--
--
1.9.5.msysgit.1