Poseidon5001 Posted May 21, 2017 Posted May 21, 2017 Hi! I tried adding different blockstates to my block. However, despite doing my best to follow what I saw in the forge docs and whatnot, I can't seem to set textures for these models. Right now I've rolled back a bit of what I did, but here's my code:https://github.com/daPoseidonGuy/PencilMod Any help would be greatly appreciated, Thanks. Quote
Draco18s Posted May 21, 2017 Posted May 21, 2017 Which block are you having a problem with? Are there any errors in the console? Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
Poseidon5001 Posted May 21, 2017 Author Posted May 21, 2017 5 hours ago, Draco18s said: Which block are you having a problem with? Are there any errors in the console? PencilBlock renders as a pink and black cube, The console gives an error for literally every block state (facing=up,down, east,west etc.) However, I'm pretty sure I got everything right in the class itself, and I thought i had stuff right in the json file (now I removed some) Quote
Poseidon5001 Posted May 21, 2017 Author Posted May 21, 2017 (edited) 6 hours ago, diesieben07 said: You never assign a value to this field. These fields should be final. Only registration should be done in preInit, create the Items and Blocks immediately in a field initializer. This class does not follow the Java naming conventions. Why is this field not final? The blockstate file for your pencil block is not a valid blockstate file. How is it invalid? I'd check myself but my computer broke yesterday (motherboard died). Thanks for all the comments though, I wouldn't catch a lot of those things by myself. Edited May 21, 2017 by Poseidon5001 Quote
Jay Avery Posted May 21, 2017 Posted May 21, 2017 Your "facing" variant should not be an array (surrounded by square brackets). Also, model names must be entirely lowercase so "testmod:tilePencil" will not work. Quote
Draco18s Posted May 21, 2017 Posted May 21, 2017 Similarly, your asset files need to be all lower case as well. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
Poseidon5001 Posted May 24, 2017 Author Posted May 24, 2017 On 5/21/2017 at 1:48 PM, Jay Avery said: Your "facing" variant should not be an array (surrounded by square brackets). Also, model names must be entirely lowercase so "testmod:tilePencil" will not work. On 5/21/2017 at 4:11 PM, Draco18s said: Similarly, your asset files need to be all lower case as well. So I've changed these things, but am still having trouble. I don't know if I've made other mistakes along the way or something, but it seems the entire blockstate file isn't working, since it doesn't seem to have the particle texture either. Quote
Jay Avery Posted May 24, 2017 Posted May 24, 2017 Your blockstates file itself still has capital letters in the name. If that doesn't solve the issue, post the latest error logs. Quote
Poseidon5001 Posted May 24, 2017 Author Posted May 24, 2017 (edited) 1 minute ago, Jay Avery said: Your blockstates file itself still has capital letters in the name. If that doesn't solve the issue, post the latest error logs. Wait so no blockstate files are supposed to have capital letters? how come all my other blocks render fine, then? And isn't the blockstate file name supposed to be identical to the registry and unlocalized names? I havent changed the blockstate file name and it was working fine before i added the variants. Edited May 24, 2017 by Poseidon5001 Quote
Jay Avery Posted May 25, 2017 Posted May 25, 2017 Actually I think the lowercase restriction might only be enforced in 1.11+, my mistake. What are the latest error logs? Quote
Poseidon5001 Posted May 25, 2017 Author Posted May 25, 2017 Just now, Jay Avery said: Actually I think the lowercase restriction might only be enforced in 1.11+, my mistake. What are the latest error logs? Working (without variants) Not Working (with Variants) Quote
Poseidon5001 Posted May 25, 2017 Author Posted May 25, 2017 I might have just fixed it by adding a model definition into the inventory field, since i dont have a model set for the ItemBlock. Quote
Jay Avery Posted May 25, 2017 Posted May 25, 2017 (edited) Oh yes, it's the way the variants are defined. I wrote a post here about the way forge distinguishes partially- and fully-defined variants. Edited May 25, 2017 by Jay Avery Quote
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.