dbz0wn4g3 Posted August 14, 2019 Share Posted August 14, 2019 (edited) I can't seem to understand why this isn't working, but I put .png textures for a block I'm trying to insert into the game. In the hotbar, it shows up perfectly, but when I place the block it does not load the texture, despite tinkering with the JSON files I created for them. I have attached my Mod File, as well as my .java files where I register all blocks/items/itemBlocks, and my .JSON files used for models. Mod File: https://pastebin.com/J9Bv21AR My EventSubscriber.java where I register items/blocks: https://pastebin.com/LuYnNB5K ModBlocks.java file: https://pastebin.com/aEhUKpqE My HealthBox.java file: https://pastebin.com/ny3fFkac JSON file located in assets.modname.models.block: https://pastebin.com/1iHBkVFA JSON file located in blockstates: https://pastebin.com/33BH4Hc1 Logs Logs Logs: https://pastebin.com/sQbXpRhe Edited August 14, 2019 by dbz0wn4g3 Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 14, 2019 Share Posted August 14, 2019 53 minutes ago, dbz0wn4g3 said: JSON file located in blockstates: Your textures tag isnt needed your model specifies the texture. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator. Link to comment Share on other sites More sharing options...
dbz0wn4g3 Posted August 14, 2019 Author Share Posted August 14, 2019 11 minutes ago, Animefan8888 said: Your textures tag isnt needed your model specifies the texture. Done, still having the same error and logs are more or less the same (nothing extraordinary changed). Do you think it may be an error in my package structure? Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 14, 2019 Share Posted August 14, 2019 3 minutes ago, dbz0wn4g3 said: Done, still having the same error and logs are more or less the same (nothing extraordinary changed). Do you think it may be an error in my package structure? Post the debug log or the straight console there should be an error. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator. Link to comment Share on other sites More sharing options...
dbz0wn4g3 Posted August 14, 2019 Author Share Posted August 14, 2019 (edited) Idk if I'm blind, but I don't see any exceptions related to my item LOL What I did in session was grab the block from creative and place it again. https://pastebin.com/7yXgkNc0 Edited August 14, 2019 by dbz0wn4g3 Quote Link to comment Share on other sites More sharing options...
dbz0wn4g3 Posted August 14, 2019 Author Share Posted August 14, 2019 Solved! What I had done before was register a new HealthBox(), when I had already declared one in code. To fix this, I changed "new HealthBox()" in EventSubscriber to "ModBlocks.HEALTH_BOX" (which references a new HealthBox in code via ModBlocks.java). Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 14, 2019 Share Posted August 14, 2019 4 minutes ago, dbz0wn4g3 said: Solved! What I had done before was register a new HealthBox(), when I had already declared one in code. To fix this, I changed "new HealthBox()" in EventSubscriber to "ModBlocks.HEALTH_BOX" (which references a new HealthBox in code via ModBlocks.java). A better solution would be to do this instead. // Change public static final HealthBox HEALTH_BOX = new HealthBox(); // TO @ObjectHolder("modid:registry_name") public static final Block HEALTH_BOX = null; And keep the new HealthBox in your Registry Event. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.