Skip to content

Commit

Permalink
Fixed wooden buckets so they post the FillBucketEvent.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kittychanley committed Nov 18, 2015
1 parent 5a90a29 commit 5220067
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Common/com/bioxx/tfc/Items/Tools/ItemCustomBucket.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import net.minecraft.util.MovingObjectPosition.MovingObjectType;
import net.minecraft.world.World;

import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.FillBucketEvent;

import cpw.mods.fml.common.eventhandler.Event;
Expand Down Expand Up @@ -78,7 +79,7 @@ public ItemStack onItemRightClick(ItemStack is, World world, EntityPlayer player
return is;

FillBucketEvent event = new FillBucketEvent(player, is, world, mop);
if (event.isCanceled())
if (MinecraftForge.EVENT_BUS.post(event) || event.isCanceled())
return is;

if (event.getResult() == Event.Result.ALLOW)
Expand Down

0 comments on commit 5220067

Please sign in to comment.