Class AbstractTileEntityPlantationField
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
com.minecolonies.api.tileentities.AbstractTileEntityPlantationField
- All Implemented Interfaces:
com.ldtteam.structurize.api.IRotatableBlockEntity,com.ldtteam.structurize.blockentities.interfaces.IBlueprintDataProviderBE,net.neoforged.neoforge.attachment.IAttachmentHolder,net.neoforged.neoforge.common.extensions.IBlockEntityExtension
- Direct Known Subclasses:
TileEntityPlantationField
public abstract class AbstractTileEntityPlantationField
extends net.minecraft.world.level.block.entity.BlockEntity
implements com.ldtteam.structurize.blockentities.interfaces.IBlueprintDataProviderBE, com.ldtteam.structurize.api.IRotatableBlockEntity
The abstract implementation for plantation field tile entities.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BlockEntity.DataComponentInputNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
net.neoforged.neoforge.attachment.AttachmentHolder.AsField -
Field Summary
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEYFields inherited from interface com.ldtteam.structurize.blockentities.interfaces.IBlueprintDataProviderBE
TAG_BLUEPRINTDATA, TAG_CORNER_ONE, TAG_CORNER_TWO, TAG_PACK, TAG_PATH, TAG_POS_TAG_MAP, TAG_SCHEMATIC_NAME, TAG_TAG_NAME, TAG_TAG_NAME_LIST, TAG_TAG_POS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractTileEntityPlantationField(net.minecraft.world.level.block.entity.BlockEntityType<? extends AbstractTileEntityPlantationField> entityType, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) Default method. -
Method Summary
Modifier and TypeMethodDescriptionabstract IColonyThe colony this field is located in.abstract @Nullable net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> Get the dimension this plantation field is placed in.The field type of this plantation.abstract com.ldtteam.structurize.api.RotationMirrorGet the rotation of the controller.abstract @Nullable net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacketabstract List<net.minecraft.core.BlockPos> The working positions stored in this field.Methods 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, getUpdateTag, hasLevel, isRemoved, isValidBlockState, loadAdditional, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, removeData, saveAdditional, 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, requestModelDataUpdateMethods inherited from interface com.ldtteam.structurize.blockentities.interfaces.IBlueprintDataProviderBE
addTag, getBlueprintPath, getInWorldCorners, getPackName, getPositionedTags, getRealWorldPos, getSchematicCorners, getSchematicName, getTilePos, getWorldTagNamePosMap, getWorldTagPosMap, readSchematicDataFromNBT, removeTag, setBlueprintPath, setPackName, setPositionedTags, setSchematicCorners, setSchematicName, writeSchematicDataToNBTMethods inherited from interface com.ldtteam.structurize.api.IRotatableBlockEntity
rotateAndMirror
-
Constructor Details
-
AbstractTileEntityPlantationField
protected AbstractTileEntityPlantationField(net.minecraft.world.level.block.entity.BlockEntityType<? extends AbstractTileEntityPlantationField> entityType, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) Default method.- Parameters:
entityType- the entity type.pos- the positions this tile entity is at.state- the state the entity is in.
-
-
Method Details
-
getPlantationFieldTypes
The field type of this plantation.- Returns:
- the field type.
-
getWorkingPositions
The working positions stored in this field.- Parameters:
tag- the tag to search for.- Returns:
- a list of working positions.
-
getCurrentColony
The colony this field is located in.- Returns:
- the colony instance.
-
getDimension
@Nullable public abstract @Nullable net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> getDimension()Get the dimension this plantation field is placed in.- Returns:
- the dimension key.
-
getUpdatePacket
@Nullable public abstract @Nullable net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket getUpdatePacket()- Specified by:
getUpdatePacketin interfacecom.ldtteam.structurize.blockentities.interfaces.IBlueprintDataProviderBE- Overrides:
getUpdatePacketin classnet.minecraft.world.level.block.entity.BlockEntity
-
getRotationMirror
public abstract com.ldtteam.structurize.api.RotationMirror getRotationMirror()Get the rotation of the controller.- Returns:
- the placed rotation.
-