Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

trollworkout

Members
  • Joined

Everything posted by trollworkout

  1. set it up like I have it set up with proxy and use init and preInit events like I do and you'll be good. and you use GameRegistry.register(block, item whatever..) everything common/Technorcery is my main file look at that and you'll get it
  2. Ah, okay. So I'm trying to go through and pick out what could help me here. haha. I see in your ModItems class, you use GameRegistry.register(item) But you aren't setting the model or anything. Could you explain to me in what order you do what? I'm trying to use the (apparently) new events for registering things. RegistryEvent.Register<Item> to register all my items and ModelRegisteryEvent to set all the ModelResourceLocations. Apparently those fire before FMLPreInitializationEvent does You don't have to do it like me. I set all my models in a separate client sided only class. https://github.com/trollworkout/technorcery/blob/master/src/main/java/com/technorcery/client/ModelsHandler.java which is called from the client proxy here https://github.com/trollworkout/technorcery/blob/master/src/main/java/com/technorcery/client/ProxyClient.java and the whole proxy is here https://github.com/trollworkout/technorcery/blob/master/src/main/java/com/technorcery/common/Proxy.java this is the main proxy . I just split all my stuff in various pieces so they are all together.
  3. remove Test.MODID + ":" + from your model loader registry. when you do item.getRegistryName is automatically included This is why is not working The mod is looking for test:test:ItemTrainingStaff
  4. Blocks are "variants" (blocks that have sub blocks based on condition ex rotated blocks) "multipart" (blocks made out of many pieces that are added or removed based on conditions ex fences) and "normal" (regular blocks with only one look with no facing or anything special) Items in your inventory use "inventory" when you register them. oh and here is my mod I am working on. https://github.com/trollworkout/technorcery Make sure your folder structure is similar to mine. Is only one way to do it
  5. Also please post the paths of the json/texture files not just the code.
  6. That whole substring thing is so stupid. I personally set UnlocalizedName and RegistryName to the same string then when I register my model I make my model resource loader load my item/block's registry name Actual example my block my model registry This way my model name = localized string name = registry string name Life is 3 times easier.
  7. I figured it out guys. I was right my sapling was incorrect. Gen tree was wrong. I fixed it like so Note the IBlockState iblockstate2 = Blocks.AIR.getDefaultState(); worldIn.setBlockState(pos, iblockstate2, 4); if (!worldgenerator.generate(worldIn, rand, pos.add(0, 0, 0))) { worldIn.setBlockState(pos, state, 4); } seems like you need to set the state of air block to 4 before you can spawn the tree.
  8. WorldGenerator does not implements or extends anything. IWorldGenerator and WorldGenerator are not compatible. So how do I fix my custom tree?
  9. WorldGenAbstractTree extends WorldGenerator Nope it implements WorldGenerator not IWorldGenerator. Whatever code I have up there it does not bonemeal and will not grow ever. There's some issue somewhere. I have a feeling the sapling is broken.
  10. But how do I register it? The GameRegistry.RegisterWorldGenerator only registers IWorldGenerator and not WorldGenerator for my custom tree gen. Seems other mods don't register their custom tree gen. I'm thinking my problem may be somewhere else maybe my grow function in my sapling is broken.
  11. why is it asking for divine ascendancy?
  12. Is it cause I need to register something? Maybe tree worldgen needs registering??
  13. Not with bonemeal or anything My custom sapling block My custom tree worldgen class
  14. You can also make them regen health really fast making them way more tough. I've seen this done in Witchery Lilith regens like 10 hp every second.
  15. Yeah dude . But we're not discussing my views are we. My slabs are 100% and I was providing assistance. Feel free to also use my code .
  16. I was missing the getStateFromMeta getMetaFromState and createBlockstate functions so it didn't understand what half=bottom half=upper were
  17. Here is the link to my project https://github.com/trollworkout/technorcery/tree/master/src/main/java/com/technorcery knock yourself out Note that the way my project is structured is like this blocks = unique blocks that need special classes client = anything that runs on client side common = anything that runs on both client and server common/block = generic blocks (here you gonna find the slab, stairs, halfslab..) common/item = generic item (here you gonna find the custom itemslab) entity = entities sever = anything that runs on server
  18. Hey I managed to figure this out. 100% working slabs. Unlike the answer above I actually use a custom ItemSlab which gets rid of VARIANT bs. Here is my custom SlabBlock (generic slab block you can use for any slab block base) Here is my half slab for WOOD only . This is what I actually use to create the block and half slab (continue reading) This is my double slab (as you can see this returns isDouble true..by default my custom base slab is set to double false which is why in the half slab I don't set this at all) Here is my custom ItemSlab (the trick here is I got rid of Comparator<?> and IProperty because that was used for VARIANT. in other words this type of slab is defined one at a time and does not have subtypes or sub blocks or variants) This is how I register the item public static final ItemBlock SLAB_APPLE = (ItemBlock) new SlabItem(ModBlocks.HALFSLAB_APPLE, (BlockSlab) ModBlocks.HALFSLAB_APPLE, (BlockSlab) ModBlocks.DOUBLESLAB_APPLE).setUnlocalizedName("slabApple").setRegistryName("slabApple").setCreativeTab(ModData.CREATIVE_TAB); The trick is Blockitem mySlab = new SlabItem( halfSlab, halfSlab, fullSlab) This is how I register the block public static final Block DOUBLESLAB_APPLE = (new DoubleSlabWoodBlock("doubleSlabApple")); public static final Block HALFSLAB_APPLE = (new HalfSlabWoodBlock("halfSlabApple")); For the json you make your slab item parent to you halfSlab model and your blockstate would be same as regular MC slab . 2 blockstates halfSlab and fulLSlab . halfSlab has 2 HALF properties BOTTOM when to place it lower and UPPER when you place it higher . The BOTTOM model is your normal slab that you also use for item parent.
  19. SO I think I can just generate the default state for doubleSlab without using Comparator<?> and IProperty by simply doing this.doubleSlab.getDefaultState() YEP WORKS
  20. Crash occurs at at com.technorcery.items.SlabItem.onItemUse which is Comparable<?> comparable1 = iblockstate.getValue(iproperty); because my slab Comparable returns null because I have no Variants. Is there another way of doing this? Seems vanilla checks for stupid sub blocks which I never ever use.
  21. I managed to make it working by adding the meta and createBlockstate but now it crashes because Comparable<?> comparable1 = iblockstate.getValue(iproperty); my comparable returns null because I have no VARIANT. I tried to create my own SlabItem but I'm kinda confused as this complicated stupid MC way of doing things with sub blocks and meta.
  22. I'm working on the slab right now . Works until I place it then it crashes saying there's no property "half"
  23. model json won't show up as an error . you need to verify your json file i recommend using http://jsonlint.com/# also make sure you use a proper editor. if you use something like Edit for mac it will replace " double quotes with side quotes which are not correct and will break the json
  24. You need to make a colorizer class is now done separately Here is mine The missing texture is your bad you messed up your model registration or your model json or blockstate json files.
  25. I will have to do this so if this post is still unsolved I will report here my findings. I will HAVE to do it. So I will do it (eventually)

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.