Jump to content

kitsushadow

Members
  • Posts

    134
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

kitsushadow's Achievements

Creeper Killer

Creeper Killer (4/8)

1

Reputation

  1. @LogicTechCorp Can you link your source code? I'm looking for examples of creating custom enchantments
  2. Shit, I know how to override a fkng method. My previous question wasn't about the method override it was about the content of the override. Thanks for the help thus far mate, I know it's like pulling teeth dealing with some people but you should consider that the feeling is mutual. I stay patient and ask the simple stupid questions to progress the resolution of the issue. Please share the same patience as those whose whom your helping.
  3. I added the ClientSide Annotation and the server crash is gone, i'll add the enum object tomorrow and try again. Thanks for your patience guys =)
  4. He's frustrated i dont understand the basics of the Forge Framework... I'm actually pretty frustrated myself with it. Tons of not so great tutorials and it kinda lands you right where we are now. Regardless, yes ur right at @Draco18s i setup a ServerStart and it did crash exactly how u said it would. Thanks for the source code example, that makes our lives a little easier.
  5. Yes.... I'm asking what the contents of the method should be. Or am i not adding anything to the method? I say that because I overrode the method in the ItemBlock class but nothing changed. I remember vaguely about needing to make an Enum with the subTypes in it or something. I can't remember. And i still don't feel like the itemSubtypes are being registered.
  6. I'm not registering the rendering in common code. What do I override getSubItems with? I'm asking so many questions cuz i really dont have a good example to study and figure it out from. Sorry
  7. So i registered renders for the different subtypes and it picked up on when the meta is 0 but i still see no item in the creative tab for the other subtype. I feel like i haven't registered the subTypes of the itemBlock. This is the new rendering method i used. public class ModBlocks { public static Block firebox; public static Block bloomery; public static Block pistonbellowsoak; public static Block pistonbellowsjungle; public static Block pistonbellowsbirch; public static Block pistonbellowsspruce; public static Block pistonbellowsdarkoak; public static Block pistonbellowsacacia; public static Block emptycrucible; public static Block emptycruciblehot; public static Block emptycruciblecracked; public static Block emptycruciblecrackedhot; public static Block rawironcrucible; public static Block hotironcrucible; public static Block hotcookedironcrucible; public static Block coolironcrucible; public static Block failedironcrucible; public static Block failedironcruciblehot; public static Block ironball; public static ItemBlock ironballitem; public static void init() { firebox = new Forge(Material.ROCK); bloomery = new Bloomery(Material.ROCK, "bloomery"); pistonbellowsoak = new PistonBellows(Material.WOOD, "pistonbellowsoak"); pistonbellowsjungle = new PistonBellows(Material.WOOD, "pistonbellowsjungle"); pistonbellowsbirch = new PistonBellows(Material.WOOD, "pistonbellowsbirch"); pistonbellowsspruce = new PistonBellows(Material.WOOD, "pistonbellowsspruce"); pistonbellowsdarkoak = new PistonBellows(Material.WOOD, "pistonbellowsdarkoak"); pistonbellowsacacia = new PistonBellows(Material.WOOD, "pistonbellowsacacia"); emptycrucible = new Crucible(Material.ROCK, "emptycrucible"); emptycruciblehot = new CrucibleHot(Material.ROCK, "emptycruciblehot"); emptycruciblecracked = new Crucible(Material.ROCK, "emptycruciblecracked"); emptycruciblecrackedhot = new CrucibleHot(Material.ROCK, "emptycruciblecrackedhot"); rawironcrucible = new Crucible(Material.ROCK, "rawironcrucible"); hotironcrucible = new CrucibleHot(Material.ROCK, "hotironcrucible"); hotcookedironcrucible = new CrucibleHot(Material.ROCK, "hotcookedironcrucible"); coolironcrucible = new Crucible(Material.ROCK, "coolironcrucible"); failedironcrucible = new Crucible(Material.ROCK, "failedironcrucible"); failedironcruciblehot = new CrucibleHot(Material.ROCK, "failedironcruciblehot"); ironball = new IngotBall(Material.IRON, "ironball", 5.0F); ironballitem = new ItemBlockIngotBall(ironball); } public static void register() { registerBlock(firebox); registerBlock(bloomery); registerBlock(pistonbellowsoak); registerBlock(pistonbellowsjungle); registerBlock(pistonbellowsbirch); registerBlock(pistonbellowsspruce); registerBlock(pistonbellowsdarkoak); registerBlock(pistonbellowsacacia); registerBlock(emptycrucible); registerBlock(emptycruciblehot); registerBlock(emptycruciblecracked); registerBlock(emptycruciblecrackedhot); registerBlock(rawironcrucible); registerBlock(hotironcrucible); registerBlock(hotcookedironcrucible); registerBlock(coolironcrucible); registerBlock(failedironcrucible); registerBlock(failedironcruciblehot); registerBlockSubType(ironball, ironballitem); } public static void registerRenders() { registerRender(firebox); registerRender(pistonbellowsoak); registerRender(pistonbellowsjungle); registerRender(pistonbellowsbirch); registerRender(pistonbellowsspruce); registerRender(pistonbellowsdarkoak); registerRender(pistonbellowsacacia); registerRender(bloomery); registerRender(emptycrucible); registerRender(emptycruciblehot); registerRender(emptycruciblecracked); registerRender(emptycruciblecrackedhot); registerRender(rawironcrucible); registerRender(hotironcrucible); registerRender(hotcookedironcrucible); registerRender(coolironcrucible); registerRender(failedironcrucible); registerRender(failedironcruciblehot); registerRender(ironball); registerRenderCustom(ironballitem, 0, new ModelResourceLocation(ironballitem.getUnlocalizedName() + "_0")); registerRenderCustom(ironballitem, 1, new ModelResourceLocation(ironballitem.getUnlocalizedName() + "_1")); } private static void registerBlock(Block block) { GameRegistry.register(block); ItemBlock item = new ItemBlock(block); item.setRegistryName(block.getRegistryName()); GameRegistry.register(item); } private static void registerBlockSubType(Block block, ItemBlock itemBlock){ GameRegistry.register(block); ItemBlock item = itemBlock; item.setRegistryName(block.getRegistryName()); GameRegistry.register(item); } private static void registerRender(Block block) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory")); } private static void registerRenderCustom(ItemBlock item, Integer meta, ModelResourceLocation model){ ModelLoader.setCustomModelResourceLocation(item, meta, model); } }
  8. Just for this instance of the itemSubtypes or in general for registering renderers?
  9. Is it just the rendering at this point??? private static void registerRender(Block block) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory")); } } That probably is not enough to register the itemSubtypes but if that was the case wouldn't the itemSubtype at least show up in the creative tab?
  10. Ok, so now i was able to launch successfully and no registration warnings in the console so thats good but I see only the defaults state of the Item in the UI https://github.com/kitsushadow/forgecraft/blob/master/1.11/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java
  11. @Draco18s sorry thought i had included it Caused by: java.lang.NullPointerException at nmd.primal.forgecraft.init.ModBlocks.registerBlockSubType(ModBlocks.java:131) at nmd.primal.forgecraft.init.ModBlocks.register(ModBlocks.java:93) at nmd.primal.forgecraft.ForgeCraft.preInit(ForgeCraft.java:47) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) Line 131 item.setRegistryName(block.getRegistryName()); Line 93 registerBlockSubType(ironball, ironballitem);
  12. @Animefan8888 I think i see what u mean i updated my Block class but getting a null pointer again package nmd.primal.forgecraft.init; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraftforge.fml.common.registry.GameRegistry; import nmd.primal.forgecraft.blocks.*; /** * Created by kitsu on 11/26/2016. */ public class ModBlocks { public static Block firebox; public static Block bloomery; public static Block pistonbellowsoak; public static Block pistonbellowsjungle; public static Block pistonbellowsbirch; public static Block pistonbellowsspruce; public static Block pistonbellowsdarkoak; public static Block pistonbellowsacacia; public static Block emptycrucible; public static Block emptycruciblehot; public static Block emptycruciblecracked; public static Block emptycruciblecrackedhot; public static Block rawironcrucible; public static Block hotironcrucible; public static Block hotcookedironcrucible; public static Block coolironcrucible; public static Block failedironcrucible; public static Block failedironcruciblehot; public static Block ironball; public static ItemBlock ironballitem; public static void init() { firebox = new Forge(Material.ROCK); bloomery = new Bloomery(Material.ROCK, "bloomery"); pistonbellowsoak = new PistonBellows(Material.WOOD, "pistonbellowsoak"); pistonbellowsjungle = new PistonBellows(Material.WOOD, "pistonbellowsjungle"); pistonbellowsbirch = new PistonBellows(Material.WOOD, "pistonbellowsbirch"); pistonbellowsspruce = new PistonBellows(Material.WOOD, "pistonbellowsspruce"); pistonbellowsdarkoak = new PistonBellows(Material.WOOD, "pistonbellowsdarkoak"); pistonbellowsacacia = new PistonBellows(Material.WOOD, "pistonbellowsacacia"); emptycrucible = new Crucible(Material.ROCK, "emptycrucible"); emptycruciblehot = new CrucibleHot(Material.ROCK, "emptycruciblehot"); emptycruciblecracked = new Crucible(Material.ROCK, "emptycruciblecracked"); emptycruciblecrackedhot = new CrucibleHot(Material.ROCK, "emptycruciblecrackedhot"); rawironcrucible = new Crucible(Material.ROCK, "rawironcrucible"); hotironcrucible = new CrucibleHot(Material.ROCK, "hotironcrucible"); hotcookedironcrucible = new CrucibleHot(Material.ROCK, "hotcookedironcrucible"); coolironcrucible = new Crucible(Material.ROCK, "coolironcrucible"); failedironcrucible = new Crucible(Material.ROCK, "failedironcrucible"); failedironcruciblehot = new CrucibleHot(Material.ROCK, "failedironcruciblehot"); ironball = new IngotBall(Material.IRON, "ironball", 5.0F); } public static void register() { registerBlock(firebox); registerBlock(bloomery); registerBlock(pistonbellowsoak); registerBlock(pistonbellowsjungle); registerBlock(pistonbellowsbirch); registerBlock(pistonbellowsspruce); registerBlock(pistonbellowsdarkoak); registerBlock(pistonbellowsacacia); registerBlock(emptycrucible); registerBlock(emptycruciblehot); registerBlock(emptycruciblecracked); registerBlock(emptycruciblecrackedhot); registerBlock(rawironcrucible); registerBlock(hotironcrucible); registerBlock(hotcookedironcrucible); registerBlock(coolironcrucible); registerBlock(failedironcrucible); registerBlock(failedironcruciblehot); registerBlockSubType(ironball, ironballitem); } public static void registerRenders() { registerRender(firebox); registerRender(pistonbellowsoak); registerRender(pistonbellowsjungle); registerRender(pistonbellowsbirch); registerRender(pistonbellowsspruce); registerRender(pistonbellowsdarkoak); registerRender(pistonbellowsacacia); registerRender(bloomery); registerRender(emptycrucible); registerRender(emptycruciblehot); registerRender(emptycruciblecracked); registerRender(emptycruciblecrackedhot); registerRender(rawironcrucible); registerRender(hotironcrucible); registerRender(hotcookedironcrucible); registerRender(coolironcrucible); registerRender(failedironcrucible); registerRender(failedironcruciblehot); registerRender(ironball); } private static void registerBlock(Block block) { GameRegistry.register(block); ItemBlock item = new ItemBlock(block); item.setRegistryName(block.getRegistryName()); GameRegistry.register(item); } private static void registerBlockSubType(Block block, ItemBlock itemBlock){ GameRegistry.register(block); ItemBlock item = itemBlock; item.setRegistryName(block.getRegistryName()); GameRegistry.register(item); } private static void registerRender(Block block) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory")); } }
  13. Ok, so what do i do about registering the subTypes? All i see in the UI is the default state of the item.
  14. I dont have any other ItemBlocks, this is my first ItemBlock https://github.com/kitsushadow/forgecraft/blob/master/1.11/src/main/java/nmd/primal/forgecraft/init/ModItems.java
  15. Can u say that again? I am registering my ItemBlock in my Item Class. Is that wrong?
×
×
  • Create New...

Important Information

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