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.DataComponentInput

    Nested 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, worldPosition

    Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    ATTACHMENTS_NBT_KEY

    Fields 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

    Constructors
    Modifier
    Constructor
    Description
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract IColony
    The 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.RotationMirror
    Get the rotation of the controller.
    abstract @Nullable net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket
     
    abstract 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, triggerEvent

    Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    deserializeAttachments, getData, getExistingData, hasAttachments, hasData, serializeAttachments

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder

    getData, getExistingData, hasData, removeData, setData

    Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension

    getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate

    Methods 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, writeSchematicDataToNBT

    Methods 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

      public abstract Set<BuildingExtensionRegistries.BuildingExtensionEntry> getPlantationFieldTypes()
      The field type of this plantation.
      Returns:
      the field type.
    • getWorkingPositions

      public abstract List<net.minecraft.core.BlockPos> getWorkingPositions(String tag)
      The working positions stored in this field.
      Parameters:
      tag - the tag to search for.
      Returns:
      a list of working positions.
    • getCurrentColony

      public abstract IColony 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:
      getUpdatePacket in interface com.ldtteam.structurize.blockentities.interfaces.IBlueprintDataProviderBE
      Overrides:
      getUpdatePacket in class net.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.