newSplotchDecoration doesn't seem to generate
LeLobster opened this issue ยท 6 comments
BiomeTweaker-1.12.2-3.1.330
I have this Desert-like biome created.
LushDesert.set("topBlock", "minecraft:sand")
LushDesert.set("fillerBlock", "minecraft:sand")
Then I'm trying to add splotches of dirt to them but they don't generate.
Tweaker.setScriptStage("POST_INIT")
Tweaker.setPlacementStage("POST_DECORATE")
dirtSplotch = newSplotchDecoration()
dirtSplotch.set("mainBlock", "minecraft:dirt")
dirtSplotch.set("count", 3) # Should attempt 3 splotches per chunk
dirtSplotch.set("size", 4) # with a average size of 4 blocks
# dirtSplotch.setRequiresBaseBlock(true) ## Syntax change?
# dirtSplotch.set("requires_base", true) ## (Got this from 'WorldGenPropertyManager.java
')
# dirtSplotch.addBaseBlock("minecraft:sand") ## Because all 3 commands aren't recognized
dirtSplotch.addBlockToReplace("minecraft:sand")
LushDesert.addDecoration(dirtSplotch)
Very subtle issue here... the whitespace you have before your #
was messing things up. Fixed now
The syntax for requires base is set("requiresBase", true/false)
. It defaults to true, so you don't need to set it in your case.
The reason it's not generating is that you haven't added a base block, whereas it requires one. The command dirtSplotch.addBaseBlock("minecraft:sand")
should be working now.
I'm now getting:
Failed to parse a script file: /home/leLobster/.minecraft/config/BiomeTweaker/scripts/General_Tweaks.cfg
[me.superckl.api.superscript.script.ScriptParser:parseScriptFile:50]: java.lang.NullPointerException
at me.superckl.api.superscript.script.ScriptParser.parseScriptLines(ScriptParser.java:58)
...
Can this be caused by my fancy block comment now that you've updated the parser?
It contains some helpful things I need to remember, and looks somewhat like this
##############################################################################
# #
# "createBiome" must happen on "BIOME_REGISTRY" #
# "xxxPerChunk" must happend before "POST_INIT" #
# #
##############################################################################
Nope... that was just me forgetting how the script parser works (I wrote that stuff a long time ago). Should be fixed.
So the comments are fixed and the splotches are fixed as well.
Thank you for your quick work.
Quick question: Would it be possible to 'combine' 2 different splotches?
Meaning: frst we create dirt splotches of ~5 blocks, and then place a water splotch of ~2 blocks in that dirt?
Right now I have:
dirtSplotch.set("mainBlock", "minecraft:dirt")
dirtSplotch.set("count", 3)
dirtSplotch.set("size", 4)
dirtSplotch.addBaseBlock("minecraft:sand")
dirtSplotch.addBlockToReplace("minecraft:sand")
waterPools = newSplotchDecoration()
waterPools.set("mainBlock", "minecraft:water")
waterPools.set("count", 2)
waterPools.set("size", 2)
waterPools.addBaseBlock("minecraft:dirt")
waterPools.addBlockToReplace("minecraft:dirt")
LushDesert.addDecoration(dirtSplotch)
LushDesert.addDecoration(waterPools)
But I only see dirt.
edit: Having a different setPlacementStage
for addDecoration
doesn't have the desired effect
edit1,5: Seems like minecraft:water
doesn't even exist anymore. I guess this is impossible then?
edit2: I'm also noticing a few other things but I'm not sure if I should make a seperate issue for each of them. What would you prefer?