Class StructureBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.StructureBlockEntity
- All Implemented Interfaces:
IAttachmentHolder,IBlockEntityExtension
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.ComponentHelper, BlockEntity.DataComponentInputNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringstatic final Stringprivate booleanprivate floatstatic final intstatic final intprivate Stringprivate Mirrorprivate StructureModeprivate booleanprivate Rotationprivate static final intprivate longprivate booleanprivate booleanprivate ResourceLocationprivate BlockPosprivate Vec3iFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Optional<BoundingBox> calculateEnclosingBoundingBox(BlockPos p_155795_, Stream<BlockPos> p_155796_) voidcreatedBy(LivingEntity p_59852_) static RandomSourcecreateRandom(long p_222889_) booleanfloatgetMode()getRelatedCorners(BlockPos p_155792_, BlockPos p_155793_) longgetSeed()booleanbooleanprivate StructureTemplategetStructureTemplate(ServerLevel p_309601_) getUpdateTag(HolderLookup.Provider p_324257_) booleanbooleanbooleanbooleanprotected voidloadAdditional(CompoundTag p_155800_, HolderLookup.Provider p_324076_) booleanloadStructureInfo(ServerLevel p_309683_) private voidloadStructureInfo(StructureTemplate p_309715_) voidplaceStructure(ServerLevel p_309543_) private voidplaceStructure(ServerLevel p_309691_, StructureTemplate p_309550_) booleanplaceStructureIfSameSize(ServerLevel p_309647_) protected voidsaveAdditional(CompoundTag p_187524_, HolderLookup.Provider p_323617_) booleanbooleansaveStructure(boolean p_59890_) voidsetIgnoreEntities(boolean p_59877_) voidsetIntegrity(float p_59839_) voidsetMetaData(String p_59888_) voidvoidsetMode(StructureMode p_59861_) voidsetPowered(boolean p_59894_) voidsetRotation(Rotation p_59884_) voidsetSeed(long p_59841_) voidsetShowAir(boolean p_59897_) voidsetShowBoundingBox(boolean p_59899_) voidsetStructureName(String p_59869_) voidsetStructureName(ResourceLocation p_59875_) voidsetStructurePos(BlockPos p_59886_) voidsetStructureSize(Vec3i p_155798_) voidprivate voidbooleanMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingData, hasAttachments, hasData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, hasData, removeData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate
-
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
- See Also:
-
structureName
-
author
-
metaData
-
structurePos
-
structureSize
-
mirror
-
rotation
-
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
-
-
Method Details
-
saveAdditional
- Overrides:
saveAdditionalin classBlockEntity
-
loadAdditional
- Overrides:
loadAdditionalin classBlockEntity
-
updateBlockState
private void updateBlockState() -
getUpdatePacket
- Overrides:
getUpdatePacketin classBlockEntity
-
getUpdateTag
- Overrides:
getUpdateTagin classBlockEntity
-
usedBy
-
getStructureName
-
hasStructureName
public boolean hasStructureName() -
setStructureName
-
setStructureName
-
createdBy
-
getStructurePos
-
setStructurePos
-
getStructureSize
-
setStructureSize
-
getMirror
-
setMirror
-
getRotation
-
setRotation
-
getMetaData
-
setMetaData
-
getMode
-
setMode
-
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
-
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
-
placeStructureIfSameSize
-
loadStructureInfo
-
loadStructureInfo
-
placeStructure
-
getStructureTemplate
-
placeStructure
-
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_)
-