BiomeTweaker

BiomeTweaker

13M Downloads

Advanced block placement not working [1.19.2]

Mikelius45 opened this issue ยท 1 comments

commented

Hey!
So my issue is that I'm trying to replace all cave_air and air blocks between y: -64 and y: 64 only in the overworld by water.
The simple block replacement works for me. But the one advanced with conditions does not work...
This is what I tried :

Tweaker.setWorld("minecraft:minecraft_overworld")
allBiomes = forAllBiomes()
allBiomes.registerGenBlockRep("minecraft:cave_air", "minecraft:water")
blockRep = newBlockReplacement()
water = forBlock("minecraft:air")
water.setProperty("variant", "water")
blockRep.set("block", water)
blockRep.set("maxY", 64)
allBiomes.registerGenBlockRep("minecraft:air", blockRep)

I tried your example replacing stone by andesite, but it does not work either :

blockRep = newBlockReplacement()
andesite = forBlock("minecraft:stone")
andesite.setProperty("variant", "andesite")
blockRep.set("block", andesite)
blockRep.set("minY", 60)
allBiomes = forAllBiomes()
allBiomes.registerGenBlockRep("minecraft:stone", blockRep)

Thanks for your work and I hope someone could help me!

commented

water = forBlock("minecraft:air")
water.setProperty("variant", "water")
[...]
allBiomes.registerGenBlockRep("minecraft:air", blockRep)
You replaced air with air and I didn't know air has an variant of water!

It should be
water = forBlock("minecraft:water")
blockRep.set("block", water)
blockRep.set("maxY", 64)
[...]