-
Posts
5161 -
Joined
-
Last visited
-
Days Won
76
Everything posted by Choonster
-
[1.12, latest][Solved]Item switch animation when nbt changes.
Choonster replied to Jacky2611's topic in Modder Support
Override Item#shouldCauseReequipAnimation. -
Understanding texture/model of blocks in inventory
Choonster replied to indemnity83's topic in Modder Support
The FML log (logs/fml-client-latest.log in the game directory) should say why the textures aren't working, please post it using Gist or Pastebin. -
Item models loading from blockstates files is a Forge addition, Minecraft itself doesn't allow it.
-
I found the issue: glass_bottle_chaos_essence.json uses the Forge blockstates format, but it's located in models/item so Minecraft tries to parse it as an item model rather than a blockstates file. It doesn't have the "parent" or "elements" properties, so it gets parsed as a model with zero elements (annoyingly, Minecraft doesn't detect this as invalid and throw an exception). Since there's zero elements, there's nothing for Minecraft to render and the item appears invisible. You need to move glass_bottle_chaos_essence.json to the blockstates directory. As I said in my previous post, you also need to move standard_item.json to models/block (or a subdirectory) to it can be used by blockstates files. It should also extend minecraft:item/generated instead of copying it. Another issue I noticed is that you're passing null as the CreativeTabs argument of Item#getSubTypes even though it's marked as non-null (by the @ParametersAreNonnullByDefault annotation applied to all vanilla packages). Your IDE should warn you about nullability issues like this. Use CreativeTabs.SEARCH as the default tab for Item#getSubTypes. I also recommend annotating your event handler classes with @Mod.EventBusSubscriber rather than manually registering them with the Forge event bus, but this isn't required.
-
The main problem you'll run into is that blocks no longer have textures, they now have models. An IBakedModel can have any number of BakedQuads, each of which belongs to an EnumFacing (or null) and has a texture. You can use IBakedModel#getQuads to get the BakedQuads for an optional IBlockState and optional EnumFacing. You'll need to work out what to do if the model has either zero or more than one BakedQuads for EnumFacing.UP (probably blacklist that state from being smoothed). Look at BlockRendererDispatcher#renderBlock to see how it gets the actual state from the in-world state, the model from the actual state and the extended state from the actual state before rendering the model.
-
I'm not seeing any obvious issues. Is ItemRenderRegister.registerItems being called? Are models being registered for each of your Items? Step through the code in the debugger if you're not sure. I'll need to debug your code locally to help you further. Please create a Git repository of your mod on a site like GitHub (if you haven't already) and link it here. See my repository and its .gitignore file for an example of the structure to use and which files to include.
-
Post the FML log from 1.12 (logs/fml-client-latest.log in the game directory) using Gist or Pastebin.
-
The logging of missing models was broken in Forge 1.12-14.21.0.2363 (commit dc043ac) and fixed in Forge 1.12-14.21.1.2390 (commit ede05a2). Update Forge and run Minecraft again to see the model errors. Where is the dimensionshiftmain:item/standard_item model located? Blockstates files only load models from the models/block directory, so it should be located at assets/dimensionshiftmain/models/block/item/standard_item.json. You should extend minecraft:item/generated instead of copying it.
-
Post your model registration code and JSON files (including the and the dimensionshiftmain:item/standard_item model) and the FML log.
-
Minecraft uses = to separate properties and values in variant strings, not :. Instead of "test:2", use "test=2". If each metadata value has its own variant in the blockstates file, make sure you use that variant in the ModelResourceLocation you pass to ModelLoader.setCustomModelResourceLocation. e.g. Instead of hardcoding "test=2", use "test=" + meta.
-
Gradle uses the JDK specified by the JAVA_HOME environment variable, it looks like it's pointing to a JRE on your machine.
-
[1.7.10] Help rendering armor/weapons on custom mob
Choonster replied to Big_Bad_E's topic in Modder Support
Some people on Minecraft Forum still provide support for 1.7.10. I strongly recommend updating to a modern version of Minecraft, though. -
Forge works on any OS that runs the desktop edition of Minecraft, there aren't any OS-specific versions.
-
[1.7.10] Help rendering armor/weapons on custom mob
Choonster replied to Big_Bad_E's topic in Modder Support
1.7.10 is no longer supported on this forum, update if you want help. -
[SOLVED] Client side mod to monitor player's hunger
Choonster replied to Is.M.L's topic in Modder Support
You'll need to monitor the food stats on ClientTickEvent, since there aren't any events fired on the client when the food stats change. Make sure you check the event's Phase to avoid running your code twice per tick. -
That's not the full error, the NoClassDefFoundError was almost certainly caused by another exception that indicates what actually went wrong. The FML event bus (FMLCommonHandler#bus) has been deprecated since 1.8.9 (when it was merged with the Forge event bus), don't use it. As explained in Forge's documentation on events, registering an instance with an event bus will only register the non-static @SubscribeEvent methods and registering the Class object (or annotating the class with @Mod.EventBusSubscriber) will only register the static @SubscribeEvent methods. If you're using @Mod.EventBusSubscriber, you don't need to manually register your class with the Forge event bus. Your code is quite hard to read on the dark theme. In future, please paste your code into the post without formatting and use the built-in syntax highlighting of the code blocks. Alternatively, post your code using Gist or Pastebin.