summaryrefslogtreecommitdiff
path: root/ihl/items_blocks/IHLBucketHandler.java
blob: c0a23b63c89531a5a7b58cb48a779f513eecd844 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package ihl.items_blocks;

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);
        }
    }

}