BiomeTweaker icon indicating copy to clipboard operation
BiomeTweaker copied to clipboard

Advanced block placement not working [1.19.2]

Open Mikelius45 opened this issue 1 year ago • 1 comments

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!

Mikelius45 avatar Dec 28 '23 16:12 Mikelius45

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

Dinerell avatar Feb 18 '24 13:02 Dinerell