Interface StructurePoolAddCallback


public interface StructurePoolAddCallback
A callback for newly added structure pools.

Word of warning: Mods may be editing on the structure pool from user configured data packs instead of the builtin Minecraft or mod resources.

Example usage:


 StructurePoolAddCallback.EVENT.register(structurePool -> {
 			if (structurePool.getId().equals(new Identifier("minecraft:village/desert/houses"))) {
 				structurePool.addStructurePoolElement(StructurePoolElement.ofProcessedLegacySingle("fabric:cactus_farm", StructureProcessorLists.FARM_PLAINS).apply(StructurePool.Projection.RIGID));
          }
 });
 
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Called when structure pools are reloaded at data pack reload time.
  • Method Summary

    Modifier and Type
    Method
    Description
    void