Advertisement
Guest User

Untitled

a guest
Dec 31st, 2015
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. i decided to compile everything into one pastebin in order to not spam the chat as much
  2. i am having a problem with this item. here is my preinit:
  3.  
  4. public static Item es;
  5. @EventHandler
  6. public void preInit(FMLInitializationEvent event) {
  7. //Emerald sword
  8. es = new EmeraldSword();
  9. GameRegistry.registerItem(es, "emerald_sword");
  10. }
  11.  
  12. and here is my item class:
  13.  
  14. import net.minecraft.creativetab.CreativeTabs;
  15. import net.minecraft.item.Item;
  16.  
  17. public class EmeraldSword extends Item
  18. {
  19. public EmeraldSword() {
  20. setMaxStackSize(64);
  21. setCreativeTab(CreativeTabs.tabMisc);
  22. setUnlocalizedName("emerald_sword");
  23. }
  24. }
  25.  
  26. however, everytime i try to make a recipe for it, the item won't show up. basically, when i type ItemStacks(Items.emerald_sword) it doesn't work because emerald_sword isn't recognized. what's the problem here?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement