Jump to content

xDethDealerx

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by xDethDealerx

  1. Item.itemRegistry was exactly what I was looking for. Thank you.
  2. First, thank you all for all your help. Hmmm.. I guess I just see the localized name as being "more friendly". Users would only need to put the name they see in game in the config to get it working, without having to dig around for what it's named in code. But you do bring up a good point about it making the mod breakable. I went ahead and set it up to use GameRegistry.findItem but findItem requires the modid. I added modid to the table in the config but now my nice clean config is looking less and less user friendly. But it works. I there no way to build a HashMap of all the available items in game? I was using Item.itemlist in 1.6.4 but I need to find an alternative for 1.7.10
  3. 1) I would like to use the localized name to keep the config user friendly. 2) No it wouldn't always be "Baked Patato". It was just a simple example of what I would put into the variable itemname.
  4. I want a creature to drop an item specified by name in the config. In 1.6.4 I was I was looking up the name in a HashMap I created using Item.itemlist. itemlist is no longer used in 1.7.10 so I'm looking of another way to do this. At it's most basic, this is what I'm trying to do... public CPDropItem(LivingDropsEvent event) { String itemname = "Baked Patato"; Item drop = Item.?; // How do I get the Item from the itemname? event.entity.dropItem(drop, 1); } It's looking like the Registry utilities might be the way to go but I haven't had any luck find examples or tutorials.
  5. This one should be simple but I just don't see it. I'm updating one of my mods from 1.6 to 1.7 and have run into a snag. I was getting the Entity's name from the LivingDropsEvent basically like this: public class GetName{ public GetNam(LivingDropsEvent event) { String entName = event.entity.getEntityName(); } } In 1.7 I get "The method getEntityName() is undefined for the type Entity". How would I go about getting the Entity's displayed name?
  6. I'm trying to get the base entityID of a spawned creature. For instance, I want the entityID for Wolf which is 95 not the ID of the wolf spawned in the world.
×
×
  • Create New...

Important Information

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