Skip to content

Advanced block placement not working [1.19.2] #301

@Mikelius45

Description

@Mikelius45

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions