public class StructureBlockBlockEntity extends BlockEntity
Modifier and Type | Class and Description |
---|---|
static class |
StructureBlockBlockEntity.Action |
Modifier and Type | Field and Description |
---|---|
private String |
author |
private boolean |
ignoreEntities |
private float |
integrity |
private String |
metadata |
private BlockMirror |
mirror |
private StructureBlockMode |
mode |
private BlockPos |
offset |
private boolean |
powered |
private BlockRotation |
rotation |
private long |
seed |
private boolean |
showAir |
private boolean |
showBoundingBox |
private BlockPos |
size |
private Identifier |
structureName |
pos, removed, world
Constructor and Description |
---|
StructureBlockBlockEntity() |
applyMirror, applyRotation, cancelRemoval, copyItemDataRequiresOperator, createFromTag, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markInvalid, markRemoved, onSyncedBlockEvent, populateCrashReport, resetBlock, setLocation, setPos
private Identifier structureName
private String author
private String metadata
private BlockPos offset
private BlockPos size
private BlockMirror mirror
private BlockRotation rotation
private StructureBlockMode mode
private boolean ignoreEntities
private boolean powered
private boolean showAir
private boolean showBoundingBox
private float integrity
private long seed
@Environment(value=CLIENT) public double getSquaredRenderDistance()
getSquaredRenderDistance
in class BlockEntity
public CompoundTag toTag(CompoundTag tag)
toTag
in class BlockEntity
public void fromTag(BlockState state, CompoundTag tag)
fromTag
in class BlockEntity
private void updateBlockMode()
@Nullable public BlockEntityUpdateS2CPacket toUpdatePacket()
toUpdatePacket
in class BlockEntity
public CompoundTag toInitialChunkDataTag()
toInitialChunkDataTag
in class BlockEntity
public boolean openScreen(PlayerEntity player)
public String getStructureName()
public String getStructurePath()
public boolean hasStructureName()
public void setStructureName(@Nullable Identifier identifier)
public void setAuthor(LivingEntity entity)
@Environment(value=CLIENT) public BlockPos getOffset()
public void setOffset(BlockPos pos)
public BlockPos getSize()
public void setSize(BlockPos pos)
@Environment(value=CLIENT) public BlockMirror getMirror()
public void setMirror(BlockMirror mirror)
public BlockRotation getRotation()
public void setRotation(BlockRotation rotation)
@Environment(value=CLIENT) public String getMetadata()
public void setMetadata(String metadata)
public StructureBlockMode getMode()
public void setMode(StructureBlockMode mode)
@Environment(value=CLIENT) public void cycleMode()
@Environment(value=CLIENT) public boolean shouldIgnoreEntities()
public void setIgnoreEntities(boolean ignoreEntities)
@Environment(value=CLIENT) public float getIntegrity()
public void setIntegrity(float integrity)
@Environment(value=CLIENT) public long getSeed()
public void setSeed(long seed)
public boolean detectStructureSize()
private List<StructureBlockBlockEntity> findCorners(List<StructureBlockBlockEntity> structureBlockEntities)
private List<StructureBlockBlockEntity> findStructureBlockEntities(BlockPos pos1, BlockPos pos2)
private BlockBox makeBoundingBox(BlockPos center, List<StructureBlockBlockEntity> corners)
public boolean saveStructure()
public boolean saveStructure(boolean bool)
public boolean loadStructure(ServerWorld serverWorld)
private static Random createRandom(long seed)
public boolean loadStructure(ServerWorld serverWorld, boolean bool)
public boolean place(ServerWorld serverWorld, boolean bool, Structure structure)
public void unloadStructure()
public boolean isStructureAvailable()
public boolean isPowered()
public void setPowered(boolean powered)
@Environment(value=CLIENT) public boolean shouldShowAir()
public void setShowAir(boolean showAir)
@Environment(value=CLIENT) public boolean shouldShowBoundingBox()
public void setShowBoundingBox(boolean showBoundingBox)