superckl / BiomeTweaker

Used to tweak various properties of biomes
Other
57 stars 9 forks source link

Advanced block placement not working [1.19.2] #301

Open Mikelius45 opened 9 months ago

Mikelius45 commented 9 months ago

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!

Dinerell commented 8 months ago

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) [...]