mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-24 22:14:32 +00:00
Once the old folder is done, then patches are done. Want to know whats still to do? Look in that folder. Now stop asking.
29 lines
1.1 KiB
Diff
29 lines
1.1 KiB
Diff
--- ../src-base/minecraft/net/minecraft/item/ItemBucket.java
|
|
+++ ../src-work/minecraft/net/minecraft/item/ItemBucket.java
|
|
@@ -40,6 +40,8 @@
|
|
boolean flag = this.field_77876_a == Blocks.field_150350_a;
|
|
ItemStack itemstack = p_77659_2_.func_184586_b(p_77659_3_);
|
|
RayTraceResult raytraceresult = this.func_77621_a(p_77659_1_, p_77659_2_, flag);
|
|
+ ActionResult<ItemStack> ret = net.minecraftforge.event.ForgeEventFactory.onBucketUse(p_77659_2_, p_77659_1_, itemstack, raytraceresult);
|
|
+ if (ret != null) return ret;
|
|
|
|
if (raytraceresult == null)
|
|
{
|
|
@@ -188,4 +190,16 @@
|
|
}
|
|
}
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public net.minecraftforge.common.capabilities.ICapabilityProvider initCapabilities(ItemStack stack, @Nullable net.minecraft.nbt.NBTTagCompound nbt) {
|
|
+ if (this.getClass() == ItemBucket.class)
|
|
+ {
|
|
+ return new net.minecraftforge.fluids.capability.wrappers.FluidBucketWrapper(stack);
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+ return super.initCapabilities(stack, nbt);
|
|
+ }
|
|
+ }
|
|
}
|