BiomeTweaker

BiomeTweaker

13M Downloads

Failed to parse arguments for command registerGenBlockRep()

donqixot opened this issue ยท 9 comments

commented

I am using MC 1.11.2, forge 13.20.1.2530, BiomeTweaker-1.11.2-3.1.304, BiomeTweakerCore-1.11.2-1.0.18, GalacticraftCore-1.11.2-4.0.0.118, Galacticraft-Planets-1.11.2-4.0.0.118.

I have this script:
Tweaker.createBiome("MarsPlus")
mars = forBiomes("biometweaker:MarsPlus")
mars.set("name", "Mars Plus")
myBlock = forBlock("galacticraftplanets:mars")
myBlock.setProperty("basictypemars", "mars_stone")
mars.registerGenBlockRep("minecraft:stone", myBlock, 1)

I am getting
[SuperScript]: Failed to parse arguments for command registerGenBlockRep("minecraft:stone", myBlock, 1). It will be ignored.

For comparison, when I replace last line with this:
mars.addActualFillerBlock(myBlock)

it works and I can see in json file for new biome that filler block was added. Is there something different I have to do for registerGenBlockRep()? I tried this:
mars.registerGenBlockRep("minecraft:stone", "galacticraftplanets:mars[basictypemars\u003dmars_stone]", 1)

still same error.

commented

Why are you adding a 1 at the end of mars.registerGenBlockRep("minecraft:stone", myBlock, 1)? If that's supposed to be metadata, you handle that by setting properties.

commented

I am following your wiki
https://github.com/superckl/BiomeTweaker/wiki/Basic-Script-Commands

Example
taigaBiome.registerGenBlockRep("minecraft:stone", "minecraft:sandstone", 1)

commented

That's an old command. I'll ask again, why are you adding the 1? Do you even know that that was for? The new documentation does not tell you to add that.

commented

I found closed issue #134. It looks like proper format is

mars.registerGenBlockRep(1, "minecraft:stone", myBlock)

You may want to update your wiki.

commented

The documentation for that command hasn't been updated because the new block objects are still technically in beta. I suppose I'll do it soon since I haven't seen any issues with them.

commented

Ok, thanks!

commented

Also, in section "What's New in 2.0.152?" in On-the-Topic-of-Block-Replacement, I see this syntax:
allBiomes.registerGenBlockRep(3, "minecraft:stone", "minecraft:sandstone", 1)

What does it mean? If weight is first argument, then what is the forth argument?

commented

BiomeTweaker changes a lot between versions. When you see version 2.0.x, and we're currently on 3.1.x, it's a pretty safe bet nearly everything has changed. That fourth argument used to be metadata.

commented

Ok, thanks. If possible, please update wiki, it is rather confusing now. I will close this.