mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 04:02:06 -07:00
Stackable Buckets
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user