Class StructureBlockEntity

All Implemented Interfaces:
ICapabilityProvider, ICapabilityProviderImpl<BlockEntity>, ICapabilitySerializable<CompoundTag>, IBlockEntityExtension, INBTSerializable<CompoundTag>

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

      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_)
      Overrides:
      saveAdditional in class BlockEntity
    • load

      public void load(CompoundTag p_155800_)
      Overrides:
      load in class BlockEntity
    • updateBlockState

      private void updateBlockState()
    • getUpdatePacket

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

      public CompoundTag getUpdateTag()
      Overrides:
      getUpdateTag in class BlockEntity
    • usedBy

      public boolean usedBy(Player p_59854_)
    • getStructureName

      public String getStructureName()
    • getStructurePath

      public String getStructurePath()
    • 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_)
    • loadStructure

      public boolean loadStructure(ServerLevel p_59843_)
    • createRandom

      public static RandomSource createRandom(long p_222889_)
    • loadStructure

      public boolean loadStructure(ServerLevel p_59845_, boolean p_59846_)
    • loadStructure

      public boolean loadStructure(ServerLevel p_59848_, boolean p_59849_, StructureTemplate p_59850_)
    • 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_)