Class MultiChunkFeaturePiece

java.lang.Object
net.minecraft.world.level.levelgen.structure.StructurePiece
fr.rodofire.ewc.structure.MultiChunkFeaturePiece

public abstract class MultiChunkFeaturePiece extends net.minecraft.world.level.levelgen.structure.StructurePiece
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.level.levelgen.structure.StructurePiece

    net.minecraft.world.level.levelgen.structure.StructurePiece.BlockSelector
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Set<net.minecraft.world.level.ChunkPos>
     
    protected net.minecraft.resources.ResourceLocation
     

    Fields inherited from class net.minecraft.world.level.levelgen.structure.StructurePiece

    boundingBox, CAVE_AIR, genDepth
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    MultiChunkFeaturePiece(net.minecraft.world.level.levelgen.structure.pieces.StructurePieceType type, int length, net.minecraft.world.level.levelgen.structure.BoundingBox boundingBox, net.minecraft.resources.ResourceLocation featureId, Set<net.minecraft.world.level.ChunkPos> chunkPosSet)
     
     
    MultiChunkFeaturePiece(net.minecraft.world.level.levelgen.structure.pieces.StructurePieceType pieceType, net.minecraft.nbt.CompoundTag nbtCompound)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addAdditionalSaveData(@NotNull net.minecraft.world.level.levelgen.structure.pieces.StructurePieceSerializationContext context, net.minecraft.nbt.CompoundTag nbt)
     
    abstract @Nullable DividedBlockListManager
    getDividedStructure(net.minecraft.world.level.WorldGenLevel world, net.minecraft.world.level.StructureManager structureAccessor, net.minecraft.world.level.chunk.ChunkGenerator chunkGenerator, net.minecraft.util.RandomSource random, net.minecraft.world.level.levelgen.structure.BoundingBox chunkBox, net.minecraft.world.level.ChunkPos chunkPos, net.minecraft.core.BlockPos pivot)
    Method to get the divided blockList manager.
    protected <T extends StructureGeneratorConfig<T>>
    T
    getGeneratorConfig(net.minecraft.nbt.CompoundTag nbt, com.mojang.serialization.Codec<T> codec)
     
    abstract @Nullable com.mojang.datafixers.util.Pair<Map<net.minecraft.world.level.ChunkPos,it.unimi.dsi.fastutil.longs.LongOpenHashSet>,LayerManager>
    getStructurePair(net.minecraft.world.level.WorldGenLevel world, net.minecraft.world.level.StructureManager structureAccessor, net.minecraft.world.level.chunk.ChunkGenerator chunkGenerator, net.minecraft.util.RandomSource random, net.minecraft.world.level.levelgen.structure.BoundingBox chunkBox, net.minecraft.world.level.ChunkPos chunkPos, net.minecraft.core.BlockPos pivot)
     
    void
    postProcess(@NotNull net.minecraft.world.level.WorldGenLevel world, @NotNull net.minecraft.world.level.StructureManager structureManager, @NotNull net.minecraft.world.level.chunk.ChunkGenerator generator, @NotNull net.minecraft.util.RandomSource random, @NotNull net.minecraft.world.level.levelgen.structure.BoundingBox box, @NotNull net.minecraft.world.level.ChunkPos chunkPos, @NotNull net.minecraft.core.BlockPos pos)
     
    protected <T extends StructureGeneratorConfig<T>>
    void
    writeGeneratorConfigCodec(net.minecraft.nbt.CompoundTag nbt, com.mojang.serialization.Codec<T> codec, T config)
     

    Methods inherited from class net.minecraft.world.level.levelgen.structure.StructurePiece

    addChildren, canBeReplaced, createBoundingBox, createChest, createChest, createDispenser, createTag, fillColumnDown, findCollisionPiece, generateAirBox, generateBox, generateBox, generateBox, generateBox, generateMaybeBox, generateUpperHalfSphere, getBlock, getBoundingBox, getGenDepth, getLocatorPosition, getMirror, getOrientation, getRandomHorizontalDirection, getRotation, getType, getWorldPos, getWorldX, getWorldY, getWorldZ, isCloseToChunk, isInterior, isReplaceableByStructures, makeBoundingBox, maybeGenerateBlock, move, placeBlock, reorient, setGenDepth, setOrientation

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • featureId

      protected net.minecraft.resources.ResourceLocation featureId
    • chunkPosSet

      protected Set<net.minecraft.world.level.ChunkPos> chunkPosSet
  • Constructor Details

    • MultiChunkFeaturePiece

      protected MultiChunkFeaturePiece(net.minecraft.world.level.levelgen.structure.pieces.StructurePieceType type, int length, net.minecraft.world.level.levelgen.structure.BoundingBox boundingBox, net.minecraft.resources.ResourceLocation featureId, Set<net.minecraft.world.level.ChunkPos> chunkPosSet)
    • MultiChunkFeaturePiece

      public MultiChunkFeaturePiece(net.minecraft.world.level.levelgen.structure.pieces.StructurePieceType pieceType, net.minecraft.nbt.CompoundTag nbtCompound)
  • Method Details

    • addAdditionalSaveData

      protected void addAdditionalSaveData(@NotNull @NotNull net.minecraft.world.level.levelgen.structure.pieces.StructurePieceSerializationContext context, net.minecraft.nbt.CompoundTag nbt)
      Specified by:
      addAdditionalSaveData in class net.minecraft.world.level.levelgen.structure.StructurePiece
    • writeGeneratorConfigCodec

      protected <T extends StructureGeneratorConfig<T>> void writeGeneratorConfigCodec(net.minecraft.nbt.CompoundTag nbt, com.mojang.serialization.Codec<T> codec, T config)
    • getGeneratorConfig

      protected <T extends StructureGeneratorConfig<T>> T getGeneratorConfig(net.minecraft.nbt.CompoundTag nbt, com.mojang.serialization.Codec<T> codec)
    • postProcess

      public void postProcess(@NotNull @NotNull net.minecraft.world.level.WorldGenLevel world, @NotNull @NotNull net.minecraft.world.level.StructureManager structureManager, @NotNull @NotNull net.minecraft.world.level.chunk.ChunkGenerator generator, @NotNull @NotNull net.minecraft.util.RandomSource random, @NotNull @NotNull net.minecraft.world.level.levelgen.structure.BoundingBox box, @NotNull @NotNull net.minecraft.world.level.ChunkPos chunkPos, @NotNull @NotNull net.minecraft.core.BlockPos pos)
      Specified by:
      postProcess in class net.minecraft.world.level.levelgen.structure.StructurePiece
    • getDividedStructure

      @Nullable public abstract @Nullable DividedBlockListManager getDividedStructure(net.minecraft.world.level.WorldGenLevel world, net.minecraft.world.level.StructureManager structureAccessor, net.minecraft.world.level.chunk.ChunkGenerator chunkGenerator, net.minecraft.util.RandomSource random, net.minecraft.world.level.levelgen.structure.BoundingBox chunkBox, net.minecraft.world.level.ChunkPos chunkPos, net.minecraft.core.BlockPos pivot)
      Method to get the divided blockList manager. If you don't need to provide a DividedBlockListManager, you can use getStructurePair(WorldGenLevel, StructureManager, ChunkGenerator, RandomSource, BoundingBox, ChunkPos, BlockPos)
    • getStructurePair

      @Nullable public abstract @Nullable com.mojang.datafixers.util.Pair<Map<net.minecraft.world.level.ChunkPos,it.unimi.dsi.fastutil.longs.LongOpenHashSet>,LayerManager> getStructurePair(net.minecraft.world.level.WorldGenLevel world, net.minecraft.world.level.StructureManager structureAccessor, net.minecraft.world.level.chunk.ChunkGenerator chunkGenerator, net.minecraft.util.RandomSource random, net.minecraft.world.level.levelgen.structure.BoundingBox chunkBox, net.minecraft.world.level.ChunkPos chunkPos, net.minecraft.core.BlockPos pivot)