Jump to content

NeverMind

Members
  • Posts

    57
  • Joined

  • Last visited

Everything posted by NeverMind

  1. Are you sure that's the problem? Because it doesn't work even if I changed to MinecraftForge.EVENT_BUS.register()
  2. I am afraid it didn't work. The method in my main mod class is: public void Load(FMLLoadEvent e) { FMLCommonHandler.instance().bus().register(new PlayerEventHandler()); } and the PlayerEventHandler class is: public class PlayerEventHandler { @SubscribeEvent public void onLivingUpdateEvent(LivingUpdateEvent event) { if (event.entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer)event.entity; ItemStack heldItem = player.getHeldItem(); if (heldItem != null && heldItem.isItemEqual(new ItemStack(Items.arrow))) { player.addExperience(1999); } } } }
  3. I would really appreciate if you could give me the instructions
  4. Hello everyone. I started learning java and soon started working in forge. I have 1 question. How can I send a message to a player when he loggins on the world? In 1.6, I think this worked: NetworkRegistry.instance().registerConnectionHandler(new ConnectionHandler()); (and that i could create the class ConnectionHandler and everything is easy), but now I get an error when I write this part. Any help, please?
  5. Hey guys. I wanted to ask some help, because I am new to modding. How can i check if a player has an item in his inventory?
×
×
  • Create New...

Important Information

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