Jump to content

Recommended Posts

Posted

Code:

package com.slack43.mofloors.item;

import com.slack43.mofloors.Main;
import com.sun.xml.internal.stream.Entity;

import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.PlayerEvent;
import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent;
import ibxm.Player;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ChatComponentText;
import net.minecraftforge.event.entity.EntityEvent;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
import net.minecraftforge.event.entity.player.UseHoeEvent;

public class EventHandler {
    @SubscribeEvent
    public void welcomePlayer(PlayerEvent.PlayerLoggedInEvent event){
    event.player.addChatMessage(new ChatComponentText("Thank you, "+ event.player.getDisplayName() + " for downloading AnlMod 1.7.10(" + Main.VERSION +")"));
    
    }
    @SubscribeEvent
    public void livingHurtEvent(LivingHurtEvent event){
    if(event.source.getEntity() instanceof EntityPlayer){
        if(THERE I WANT TO CHECK PLAYER HELD ITEM IF IS AN BLAZE ROD){
            event.entity.setFire(10);
        }
    }
    }

    
        
    
    
  
    

}

  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.