Class StructureBlockEntity

All Implemented Interfaces:
IAttachmentHolder, IBlockEntityExtension

public class StructureBlockEntity extends BlockEntity
  • Field Details

    • SCAN_CORNER_BLOCKS_RANGE

      private static final int SCAN_CORNER_BLOCKS_RANGE
      See Also:
    • MAX_OFFSET_PER_AXIS

      public static final int MAX_OFFSET_PER_AXIS
      See Also:
    • MAX_SIZE_PER_AXIS

      public static final int MAX_SIZE_PER_AXIS
      See Also:
    • AUTHOR_TAG

      public static final String AUTHOR_TAG
      See Also:
    • structureName

      @Nullable private ResourceLocation structureName
    • author

      private String author
    • metaData

      private String metaData
    • structurePos

      private BlockPos structurePos
    • structureSize

      private Vec3i structureSize
    • mirror

      private Mirror mirror
    • rotation

      private Rotation rotation
    • mode

      private StructureMode mode
    • ignoreEntities

      private boolean ignoreEntities
    • powered

      private boolean powered
    • showAir

      private boolean showAir
    • showBoundingBox

      private boolean showBoundingBox
    • integrity

      private float integrity
    • seed

      private long seed
  • Constructor Details

    • StructureBlockEntity

      public StructureBlockEntity(BlockPos p_155779_, BlockState p_155780_)
  • Method Details

    • saveAdditional

      protected void saveAdditional(CompoundTag p_187524_, HolderLookup.Provider p_323617_)
      Overrides:
      saveAdditional in class BlockEntity
    • loadAdditional

      protected void loadAdditional(CompoundTag p_155800_, HolderLookup.Provider p_324076_)
      Overrides:
      loadAdditional in class BlockEntity
    • updateBlockState

      private void updateBlockState()
    • getUpdatePacket

      public ClientboundBlockEntityDataPacket getUpdatePacket()
      Overrides:
      getUpdatePacket in class BlockEntity
    • getUpdateTag

      public CompoundTag getUpdateTag(HolderLookup.Provider p_324257_)
      Overrides:
      getUpdateTag in class BlockEntity
    • usedBy

      public boolean usedBy(Player p_59854_)
    • getStructureName

      public String getStructureName()
    • hasStructureName

      public boolean hasStructureName()
    • setStructureName

      public void setStructureName(@Nullable String p_59869_)
    • setStructureName

      public void setStructureName(@Nullable ResourceLocation p_59875_)
    • createdBy

      public void createdBy(LivingEntity p_59852_)
    • getStructurePos

      public BlockPos getStructurePos()
    • setStructurePos

      public void setStructurePos(BlockPos p_59886_)
    • getStructureSize

      public Vec3i getStructureSize()
    • setStructureSize

      public void setStructureSize(Vec3i p_155798_)
    • getMirror

      public Mirror getMirror()
    • setMirror

      public void setMirror(Mirror p_59882_)
    • getRotation

      public Rotation getRotation()
    • setRotation

      public void setRotation(Rotation p_59884_)
    • getMetaData

      public String getMetaData()
    • setMetaData

      public void setMetaData(String p_59888_)
    • getMode

      public StructureMode getMode()
    • setMode

      public void setMode(StructureMode p_59861_)
    • isIgnoreEntities

      public boolean isIgnoreEntities()
    • setIgnoreEntities

      public void setIgnoreEntities(boolean p_59877_)
    • getIntegrity

      public float getIntegrity()
    • setIntegrity

      public void setIntegrity(float p_59839_)
    • getSeed

      public long getSeed()
    • setSeed

      public void setSeed(long p_59841_)
    • detectSize

      public boolean detectSize()
    • getRelatedCorners

      private Stream<BlockPos> getRelatedCorners(BlockPos p_155792_, BlockPos p_155793_)
    • calculateEnclosingBoundingBox

      private static Optional<BoundingBox> calculateEnclosingBoundingBox(BlockPos p_155795_, Stream<BlockPos> p_155796_)
    • saveStructure

      public boolean saveStructure()
    • saveStructure

      public boolean saveStructure(boolean p_59890_)
    • createRandom

      public static RandomSource createRandom(long p_222889_)
    • placeStructureIfSameSize

      public boolean placeStructureIfSameSize(ServerLevel p_309647_)
    • loadStructureInfo

      public boolean loadStructureInfo(ServerLevel p_309683_)
    • loadStructureInfo

      private void loadStructureInfo(StructureTemplate p_309715_)
    • placeStructure

      public void placeStructure(ServerLevel p_309543_)
    • getStructureTemplate

      @Nullable private StructureTemplate getStructureTemplate(ServerLevel p_309601_)
    • placeStructure

      private void placeStructure(ServerLevel p_309691_, StructureTemplate p_309550_)
    • unloadStructure

      public void unloadStructure()
    • isStructureLoadable

      public boolean isStructureLoadable()
    • isPowered

      public boolean isPowered()
    • setPowered

      public void setPowered(boolean p_59894_)
    • getShowAir

      public boolean getShowAir()
    • setShowAir

      public void setShowAir(boolean p_59897_)
    • getShowBoundingBox

      public boolean getShowBoundingBox()
    • setShowBoundingBox

      public void setShowBoundingBox(boolean p_59899_)