Search in sources :

Example 1 with RenderBlockOverlayEvent

use of net.minecraftforge.client.event.RenderBlockOverlayEvent in project NetherEx by LogicTechCorp.

the class EventHandler method onRenderBlockOverlay.

@SubscribeEvent
@SideOnly(Side.CLIENT)
public static void onRenderBlockOverlay(RenderBlockOverlayEvent event) {
    RenderBlockOverlayEvent.OverlayType type = event.getOverlayType();
    EntityPlayer player = event.getPlayer();
    World world = player.getEntityWorld();
    if (type == RenderBlockOverlayEvent.OverlayType.FIRE) {
        if (player.isRiding() && player.getRidingEntity() instanceof EntityObsidianBoat || ArmorUtil.isWearingFullArmorSet(player, NetherExMaterials.ARMOR_HIDE_SALAMANDER)) {
            event.setCanceled(true);
        }
    }
}
Also used : EntityObsidianBoat(nex.entity.item.EntityObsidianBoat) EntityPlayer(net.minecraft.entity.player.EntityPlayer) World(net.minecraft.world.World) RenderBlockOverlayEvent(net.minecraftforge.client.event.RenderBlockOverlayEvent) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Aggregations

EntityPlayer (net.minecraft.entity.player.EntityPlayer)1 World (net.minecraft.world.World)1 RenderBlockOverlayEvent (net.minecraftforge.client.event.RenderBlockOverlayEvent)1 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)1 EntityObsidianBoat (nex.entity.item.EntityObsidianBoat)1