Class AbstractTileEntityPlantationField

java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
com.minecolonies.api.tileentities.AbstractTileEntityPlantationField
All Implemented Interfaces:
com.ldtteam.structurize.api.util.IRotatableBlockEntity, com.ldtteam.structurize.blockentities.interfaces.IBlueprintDataProviderBE, net.minecraftforge.common.capabilities.ICapabilityProvider, net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.block.entity.BlockEntity>, net.minecraftforge.common.capabilities.ICapabilitySerializable<net.minecraft.nbt.CompoundTag>, net.minecraftforge.common.extensions.IForgeBlockEntity, net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
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.util.IRotatableBlockEntity
The abstract implementation for plantation field tile entities.
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider

    net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B extends net.minecraftforge.common.capabilities.ICapabilityProviderImpl<B>>
  • Field Summary

    Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity

    level, remove, worldPosition

    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

    Fields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity

    INFINITE_EXTENT_AABB
  • 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.
    abstract boolean
    Get the mirroring setting of the controller.
    The field type of this plantation.
    abstract net.minecraft.world.level.block.Rotation
    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, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdateTag, hasLevel, isRemoved, load, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveAdditional, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setLevel, setRemoved, triggerEvent

    Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider

    areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps

    Methods inherited from class java.lang.Object

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

    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 net.minecraftforge.common.capabilities.ICapabilityProvider

    getCapability, getCapability

    Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity

    deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT

    Methods inherited from interface com.ldtteam.structurize.api.util.IRotatableBlockEntity

    mirror, rotate
  • 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
    • getRotation

      public abstract net.minecraft.world.level.block.Rotation getRotation()
      Get the rotation of the controller.
      Returns:
      the placed rotation.
    • getMirror

      public abstract boolean getMirror()
      Get the mirroring setting of the controller.
      Returns:
      true if mirrored.