registerGenBlockRep metadata doesn't get accepted
davqvist opened this issue ยท 15 comments
If I do standardBiome.registerGenBlockRep("minecraft:stone", "chisel:basalt2", 7) I get an error because of the 7. Or did I understand the syntax incorrectly, I thought you can add an integer to specify metadata of the block.
BT 3.1.301
BTCore 1.0.16
MC 1.12.1
Forge 2456
(Still don't get any fml-client-latest.log in case you are wondering, haven't figured that out yet)
The syntax for handling blocks in scripts has changed. I haven't documented it yet since this version isn't released yet. Essentially, you can no longer use metadata in scripts, they are magic numbers that should be for internal use only. You now can set block properties through scripts. Example:
biomes = forAllBiomes()
andesiteBlock = forBlock("minecraft:stone")
andesiteBlock.setProperty("variant", "andesite")
biomes.registerGenBlockRep(andesiteBlock)
This new method utilizes the power of the scripting language in the same way the new feature generation system does. You can still use just the resource name when specifying blocks (as you are) if you do not need to set metadata.
forBlock seems to always give me "minecraft:stone"
Log says "No property variation found for block minecraft:stone. Skipping it."
I'm confused. Am I not supposed to name the name of the property?
https://github.com/Chisel-Team/Chisel/blob/1.12/dev/src/main/java/team/chisel/common/block/BlockCarvable.java#L70
It's "variation" for this block.
The log line you posted says you're setting the property for "minecraft:stone". Have you replaced the resource names? If so, post your script please.
Ah sorry, I didn't see it. It looks like it's not recognizing "chisel:basalt2" as a block. Are you sure that's the correct resource name? If it is, could you try it with a vanilla block as well, such as "minecraft:glass" to verify it is an issue in BT.
Yeah, same problem with this script:
https://pastebin.com/2vAaeXWC
No, I found the issue. I decided to delete a critical piece of code in 46c16df. It's a quick fix, but unfortunately, I'm on vacation right now. In the meantime, you can simply use any build before that commit. There haven't been too many large changes since that commit.
Here is the most recent build before that commit:
Thank you very much. I wonder if I can use the current BiomeTweakerCore for 1.12.1 and this build in 1.12.1. If not, I'll just have to wait.