Search in sources :

Example 1 with IFireBlock

use of stevekung.mods.moreplanets.util.blocks.IFireBlock in project MorePlanets by SteveKunG.

the class GeneralEventHandler method onLeftClickBlock.

@SubscribeEvent
public void onLeftClickBlock(PlayerInteractEvent.LeftClickBlock event) {
    BlockPos firePos = event.getPos().offset(event.getFace());
    if (event.getWorld().getBlockState(firePos).getBlock() instanceof IFireBlock) {
        GalacticraftCore.packetPipeline.sendToServer(new PacketSimpleMP(EnumSimplePacketMP.S_FIRE_EXTINGUISH, GCCoreUtil.getDimensionID(event.getWorld()), firePos));
        event.setCanceled(true);
    }
}
Also used : IFireBlock(stevekung.mods.moreplanets.util.blocks.IFireBlock) BlockPos(net.minecraft.util.math.BlockPos) PacketSimpleMP(stevekung.mods.moreplanets.network.PacketSimpleMP) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent)

Aggregations

BlockPos (net.minecraft.util.math.BlockPos)1 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1 PacketSimpleMP (stevekung.mods.moreplanets.network.PacketSimpleMP)1 IFireBlock (stevekung.mods.moreplanets.util.blocks.IFireBlock)1