Bonjour,
J’aimerais savoir comment on fait pour changer par exemple ces blocs pendant la génération d’un monde ou pendant lé génération d’un biome, mais mon GenerationPopulator ne le fait pas:
"minecraft:plains" { "minecraft:yellow_flower[type=dandelion]"="minecraft:torch[facing=up]" "minecraft:leaves[check_decay=false,decayable=true,variant=oak]"="minecraft:diamond_ore" "minecraft:leaves[check_decay=true,decayable=true,variant=oak]"="minecraft:gold_ore" "minecraft:log[axis=y,variant=birch]"="minecraft:glass" "minecraft:log[axis=y,variant=oak]"="minecraft:wool[color=white]" "minecraft:tallgrass[type=tall_grass]"="minecraft:torch[facing=up]" "minecraft:gravel"="minecraft:wool[color=light_blue]" }
Autre question au chargement du monde j’applique mon getWorldGenerator:
@Listener public void onWorldLoad(LoadWorldEvent event) { World world = event.getTargetWorld(); if (world.getName().equalsIgnoreCase("world2")) { WorldGenerator worldGenerator = world.getWorldGenerator(); worldGenerator.getGenerationPopulators().add(new BlockPopulator()); } }
Ce qui donne:
mais quand je fais:
Optional cOptional = world.regenerateChunk(player.getLocation().getChunkPosition());
cela donne:
Pourquoi ?
[translate.google]
Hello,
I would like to know how we can change these blocks for example during the generation of a world or during the generation of a biome, but my GenerationPopulator does not:
"minecraft:plains" { "minecraft:yellow_flower[type=dandelion]"="minecraft:torch[facing=up]" "minecraft:leaves[check_decay=false,decayable=true,variant=oak]"="minecraft:diamond_ore" "minecraft:leaves[check_decay=true,decayable=true,variant=oak]"="minecraft:gold_ore" "minecraft:log[axis=y,variant=birch]"="minecraft:glass" "minecraft:log[axis=y,variant=oak]"="minecraft:wool[color=white]" "minecraft:tallgrass[type=tall_grass]"="minecraft:torch[facing=up]" "minecraft:gravel"="minecraft:wool[color=light_blue]" }
Another question when loading the world I apply my getWorldGenerator:
@Listener public void onWorldLoad(LoadWorldEvent event) { World world = event.getTargetWorld(); if (world.getName().equalsIgnoreCase("world2")) { WorldGenerator worldGenerator = world.getWorldGenerator(); worldGenerator.getGenerationPopulators().add(new BlockPopulator()); } }
Which give:
but when I do:
Optional cOptional = world.regenerateChunk (player.getLocation (). GetChunkPosition ());
this gives:
Why ?