Jump to content

Jedispencer21

Forge Modder
  • Posts

    262
  • Joined

  • Last visited

Everything posted by Jedispencer21

  1. I would say just look at the RecipesArmorDyes to see how they make leather armor dyeable. Also check in ItemArmor.
  2. You have a NullPointerException on line 298 in your ExampleMod class, (that you should have deleted and created your own since it was only there for an example), from you adding a shapeless recipe.
  3. What version are you using? 1.7.10 or 1.8?
  4. Why don't you start your class with a capital letter? its sort of a convention to do so, and what he meant is that every time getEntityTexture() was being called, it was selecting a random number and changing your mobs skin to that
  5. So basically you did: OreDictionary.registerOre("nameofyourblock", BLOCKCLASS.nameofblock); -- Don't put nameofyourblock, or BLOCKCLASS.nameofblock, replace these with your arguments. for glass: GameRegistry.addSmelting(BLOCKCLASS.nameofblock, new ItemStack(Blocks.glass), amountofxp); -- Same down here, replace with your arguments. and for TNT: GameRegistry.addRecipe(new ItemStack(Blocks.tnt), new Object[] {"X#X", "#X#", "X#X", 'X', Items.gunpowder, '#', BLOCKCLASS.nameofblock};
  6. So you want to make your sand be able to be smelted to make vanilla glass?
  7. Instead of using FurnaceRecipes.smelting().func_151394_a(), why don't you just use GameRegistry.addSmelting(); and what are you trying to do with the item in the oredictionary?
  8. Here is an example of what I did. public static ITEMCLASS nameofitem; public static void initItems() { nameofitem = new Item().setUnlocalizedName("nameofitem").setContainerItem(nameofOTHERitem); } The reason it is null is because you are initializing it on the same line you are trying to use it. So therefore when it tries to access it during initialization, it returns null, So you could either initialized the item then on the next line set its container item like so: nameofitem = new Item().setUnlocalizedName("nameofitem"); nameofitem.setContainerItem(nameofitem); or a bit of a better way is to use two separate items, one is the one used in crafting the other is the container item, like a milk bucket and bucket nameofanitem = new Item().setUnlocalizedName("nameofanitem").setContainerItem(nameofitem);
  9. All I did for my container item was: nameofitem = new Item().setUnlocalizedName("nameofitem").setContainerItem(NameOfContainerItem); This should work, and if not just do what diesieben07 said
  10. Well I would assume I am handling it being null because if (stack == null) continue; and if (this.mc.thePlayer.inventory.getCurrentItem() != null) should handle it, correct?
  11. So I did that and it appears to go null on the .getIconName() method
  12. So before I changed this method and to the latest version of forge, this was working, but not I am having a ton of repetitive crashes and I have NO idea what is causing them, I get a NullPointerException even when the items are not null. This is the crash: These are the methods:
  13. If Item#onBlockDestroyed doesn't allow preventing then using BlockEvent.HarvestDropsEvent would be best to use
  14. why don't you try using BlockEvent.HarvestDropsEvent and check if the player is using your tool then get the smelting result and drop that instead of the normal block
  15. I have done this in my mod and I believe my fix was just if (stack == null) return;
  16. In a resource pack, but not through modding I would assume
  17. Caused by: java.lang.IllegalArgumentException: Cannot get property PropertyInteger{name=level, clazz=class java.lang.Integer, values=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]} as it does not exist in BlockState{block=mw:underwater_plant, properties=[variant]} If you read that is says that the PropertyInterger doesn't exist in the block mw:underwater_plant
  18. Have you created the REFERENCE class? And really... (block, block).getUnlocalizedName().substring(5) I think you can figure out what you have done there...
  19. If you haven't found that persons tutorial yet, this is the one that he creates the registerhelper class --> https://docs.google.com/document/d/1-MxdZ4hYRkxz_PkqwsGDEgQTK4wVqO8FLBPbXwbjgd0/edit?pli=1 and this is his main tutorial links page --> https://github.com/TheXFactor117/TheXFactor117s-Forge-Tutorials/blob/master/OldTutorials.md
  20. Firstly, have you created the RegisterHelper class, secondly, have you created the ItemEXTS class?
  21. Because there is no LOCAL VARIABLE called sharpness, you have to call the class with Enchantment.whateverEnchantmentYouWant. If you want to know "no such variable" then try learning some basic java, then go back to modding.
  22. I am scaling it so the items are not so large on the screen, and also I found the correct method, it was RenderItem#renderItemIntoGUI
  23. The one is not required when your output is only one item, thats what ItemStack defaults to, secondly don't create a new ItemStack when you have an ItemStack already created, where new ItemStack(Items.diamond_sword) is should just be stack
  24. Show the errors, don't just say you have errors. No one will know how to help if you don't show the errors
  25. renderItemModel creates a very weird effect with scaled HUD everywhere across my screen, and I have tried RenderItem#renderEffect but that requires about 6 or 7 different methods to work. I have tried adding all of the methods, but it still doesn't render the enchantment glow
×
×
  • Create New...

Important Information

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