diff options
| author | Foghrye4 <foghrye4@gmail.com> | 2016-04-11 19:44:54 +0300 |
|---|---|---|
| committer | Foghrye4 <foghrye4@gmail.com> | 2016-04-11 19:44:54 +0300 |
| commit | 05c78126859231a68e199dc34613689bd0978e2f (patch) | |
| tree | 050bea104a18c72905095d29f31bec2935a27a24 /ihl/i_hate_liquids/IHLBucketHandler.java | |
Initial commit
Diffstat (limited to 'ihl/i_hate_liquids/IHLBucketHandler.java')
| -rw-r--r-- | ihl/i_hate_liquids/IHLBucketHandler.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ihl/i_hate_liquids/IHLBucketHandler.java b/ihl/i_hate_liquids/IHLBucketHandler.java new file mode 100644 index 0000000..d8a9943 --- /dev/null +++ b/ihl/i_hate_liquids/IHLBucketHandler.java @@ -0,0 +1,21 @@ +package ihl.i_hate_liquids;
+
+import ihl.items_blocks.IHLFluidBlock;
+import net.minecraft.block.Block;
+import net.minecraftforge.event.entity.player.FillBucketEvent;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+
+public class IHLBucketHandler
+{
+ public IHLBucketHandler() {}
+ @SubscribeEvent
+ public void onBucketFill(FillBucketEvent event)
+ {
+ Block block = event.world.getBlock(event.target.blockX, event.target.blockY, event.target.blockZ);
+ if (block instanceof IHLFluidBlock && event.isCancelable())
+ {
+ event.setCanceled(true);
+ }
+ }
+
+}
|
