Hello everyone! I'm having the hardest time getting the blockstate JSON for my custom logs to work properly. I've tried various ideas, edits, and tutorials, but for some reason, this is making it very difficult. I'm trying to create a block that emulates the properties of a log (like oak), but its not working out well for me... My JSON scripts are below:
Post the FML log, it should say what the problem is.
The most likely issue is that you haven't included all of the Block's properties in the blockstates file and haven't registered an IStateMapper to ignore the ones you haven't specified.
You can create an IStateMapper using StateMap.Builder and register it with ModelLoader.setCustomStateMapper in ModelRegistryEvent (if you're registering your Blocks and Items in the corresponding registry events, which you should be) or in preInit (if you're registering your Blocks and Items in preInit, which you should move away from).
In future, please use Gist or Pastebin to post logs/crash reports (if applicable) and code with syntax highlighting. To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). To get syntax highlighting on Pastebin, select the language from the dropdown at the bottom of the page.
It's much easier to read code with proper formatting and syntax highlighting.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Post the FML log, it should say what the problem is.
The most likely issue is that you haven't included all of the Block's properties in the blockstates file and haven't registered an IStateMapper to ignore the ones you haven't specified.
You can create an IStateMapper using StateMap.Builder and register it with ModelLoader.setCustomStateMapper in ModelRegistryEvent (if you're registering your Blocks and Items in the corresponding registry events, which you should be) or in preInit (if you're registering your Blocks and Items in preInit, which you should move away from).
In future, please use Gist or Pastebin to post logs/crash reports (if applicable) and code with syntax highlighting. To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). To get syntax highlighting on Pastebin, select the language from the dropdown at the bottom of the page.
It's much easier to read code with proper formatting and syntax highlighting.
There aren't any game-crashing errors, and I've tried digging through the logs myself. I'm probably just missing something stupid
That's the console output, not the FML log. The FML log is the logs/fml-client-latest.log file in the game directory.
Posting the Block class would be useful.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
That's still not the FML log, it doesn't have any DEBUG/TRACE messages. The default game directory is the run directory in the development workspace, the FML log should be in the logs directory inside of it.
BlockAlog doesn't have any properties, so Minecraft uses the normal variant of the blockstates file for the model. This variant doesn't exist, so the block renders as the missing model.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I took that directly from [moddirectory]\run\logs\2017-07-01-7.log
Also when you're referring to the blockstates properties, I thought those needed to be included in the .json files? Do they need to have separate properties included within the individual block class as well? Or do they need to be within the class only, and not in the .json files?
I apologize if some of the questions I'm asking appear to be stupid. I have experience with java and modding, but I'm relatively new to the 1.11.2 modding phase, and complex/rotational blocks are new to me as well.
I took that directly from [moddirectory]\run\logs\2017-07-01-7.log
The FML log is fml-client-latest.log.
Also when you're referring to the blockstates properties, I thought those needed to be included in the .json files? Do they need to have separate properties included within the individual block class as well? Or do they need to be within the class only, and not in the .json files?
Your Block class has to define which properties it uses (which are converted to/from metadata by your overrides of Block#getMetaFromState/getStateFromMeta) and your blockstates file needs to specify which model is used for each combination of property values.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
And I'll work on the properties. I read somewhere that 1.11.2 uses .json for all of its metadata stuff, and that storing that info in classes was no longer necessary.
I read somewhere that 1.11.2 uses .json for all of its metadata stuff, and that storing that info in classes was no longer necessary.
I think you've probably misinterpreted what it was saying. Like I said in my previous post, the Block class is responsible for defining the properties and their metadata conversion and the blockstates file is responsible for specifying a model for each state.
1.7.10 and earlier used metadata values directly and block models were mostly hardcoded. 1.8 introduced block states as an abstraction over metadata values and the JSON-based model system.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Alright! Thanks for all of your help and insight! I've finally got it working somewhat correctly. Now I just need to figure out why alog is being registered multiple times...
Hello everyone! I'm having the hardest time getting the blockstate JSON for my custom logs to work properly. I've tried various ideas, edits, and tutorials, but for some reason, this is making it very difficult. I'm trying to create a block that emulates the properties of a log (like oak), but its not working out well for me... My JSON scripts are below:
blockstates/blockalog.json
models/block/alog.json
Post the FML log, it should say what the problem is.
The most likely issue is that you haven't included all of the Block's properties in the blockstates file and haven't registered an IStateMapper to ignore the ones you haven't specified.
You can create an IStateMapper using StateMap.Builder and register it with ModelLoader.setCustomStateMapper in ModelRegistryEvent (if you're registering your Blocks and Items in the corresponding registry events, which you should be) or in preInit (if you're registering your Blocks and Items in preInit, which you should move away from).
Forge's blockstates format may be useful here.
In future, please use Gist or Pastebin to post logs/crash reports (if applicable) and code with syntax highlighting. To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). To get syntax highlighting on Pastebin, select the language from the dropdown at the bottom of the page.
It's much easier to read code with proper formatting and syntax highlighting.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
There aren't any game-crashing errors, and I've tried digging through the logs myself. I'm probably just missing something stupid
Here's the FML log: https://pastebin.com/eSLRpBqM
Do you want me to post the block's class as well?
That's the console output, not the FML log. The FML log is the logs/fml-client-latest.log file in the game directory.
Posting the Block class would be useful.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Lol stupid me.
The ACTUAL FML log: https://pastebin.com/JDaCE7Fv
Block Class: https://pastebin.com/F9PYXwfj
That's still not the FML log, it doesn't have any DEBUG/TRACE messages. The default game directory is the run directory in the development workspace, the FML log should be in the logs directory inside of it.
BlockAlog doesn't have any properties, so Minecraft uses the normal variant of the blockstates file for the model. This variant doesn't exist, so the block renders as the missing model.
Forge's documentation explains block states here.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I took that directly from [moddirectory]\run\logs\2017-07-01-7.log
Also when you're referring to the blockstates properties, I thought those needed to be included in the .json files? Do they need to have separate properties included within the individual block class as well? Or do they need to be within the class only, and not in the .json files?
I apologize if some of the questions I'm asking appear to be stupid. I have experience with java and modding, but I'm relatively new to the 1.11.2 modding phase, and complex/rotational blocks are new to me as well.
The FML log is fml-client-latest.log.
Your Block class has to define which properties it uses (which are converted to/from metadata by your overrides of Block#getMetaFromState/getStateFromMeta) and your blockstates file needs to specify which model is used for each combination of property values.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Alright, we'll give this one more go: https://pastebin.com/PS422EDy
And I'll work on the properties. I read somewhere that 1.11.2 uses .json for all of its metadata stuff, and that storing that info in classes was no longer necessary.
That's the right log this time, but unfortunately it doesn't say anything about missing models. Is it from a session where the models are missing?
It does say that you're registering the modmcdltc:blockalog Block multiple times, which you shouldn't do.
I think you've probably misinterpreted what it was saying. Like I said in my previous post, the Block class is responsible for defining the properties and their metadata conversion and the blockstates file is responsible for specifying a model for each state.
1.7.10 and earlier used metadata values directly and block models were mostly hardcoded. 1.8 introduced block states as an abstraction over metadata values and the JSON-based model system.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Alright! Thanks for all of your help and insight! I've finally got it working somewhat correctly. Now I just need to figure out why alog is being registered multiple times...