blob: d8a99434653ca1f75d3663d3d805f2b4843aa572 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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);
}
}
}
|