Class TileEntityPlantationField

java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
com.minecolonies.api.tileentities.AbstractTileEntityPlantationField
com.minecolonies.core.tileentities.TileEntityPlantationField
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

public class TileEntityPlantationField extends AbstractTileEntityPlantationField
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
    Constructor
    Description
    TileEntityPlantationField(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    The colony this field is located in.
    @Nullable net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>
    Get the dimension this plantation field is placed in.
    Getter for the pack.
    The field type of this plantation.
    Map<net.minecraft.core.BlockPos,List<String>>
     
    com.ldtteam.structurize.api.RotationMirror
    Get the rotation of the controller.
    net.minecraft.util.Tuple<net.minecraft.core.BlockPos,net.minecraft.core.BlockPos>
     
     
    net.minecraft.core.BlockPos
     
    @Nullable net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket
     
    @NotNull net.minecraft.nbt.CompoundTag
    getUpdateTag(net.minecraft.core.HolderLookup.Provider provider)
     
    List<net.minecraft.core.BlockPos>
    The working positions stored in this field.
    void
    loadAdditional(net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider provider)
     
    void
    onDataPacket(net.minecraft.network.Connection net, net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket packet, net.minecraft.core.HolderLookup.Provider provider)
     
    void
    readSchematicDataFromNBT(net.minecraft.nbt.CompoundTag compound)
     
    void
    rotateAndMirror(com.ldtteam.structurize.api.RotationMirror rotMir)
     
    void
    saveAdditional(net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider provider)
     
    void
     
    void
     
    void
    setPackName(String packName)
     
    void
    setPositionedTags(Map<net.minecraft.core.BlockPos,List<String>> positionedTags)
     
    void
    setSchematicCorners(net.minecraft.core.BlockPos pos1, net.minecraft.core.BlockPos pos2)
     
    void
     

    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, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, 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, onLoad, requestModelDataUpdate

    Methods inherited from interface com.ldtteam.structurize.blockentities.interfaces.IBlueprintDataProviderBE

    addTag, getInWorldCorners, getRealWorldPos, getWorldTagNamePosMap, getWorldTagPosMap, removeTag, writeSchematicDataToNBT
  • Constructor Details

    • TileEntityPlantationField

      public TileEntityPlantationField(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
      Default constructor.
      Parameters:
      pos - The positions this tile entity is at.
      state - The state the entity is in.
  • Method Details

    • getPlantationFieldTypes

      public Set<BuildingExtensionRegistries.BuildingExtensionEntry> getPlantationFieldTypes()
      Description copied from class: AbstractTileEntityPlantationField
      The field type of this plantation.
      Specified by:
      getPlantationFieldTypes in class AbstractTileEntityPlantationField
      Returns:
      the field type.
    • getWorkingPositions

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

      public IColony getCurrentColony()
      Description copied from class: AbstractTileEntityPlantationField
      The colony this field is located in.
      Specified by:
      getCurrentColony in class AbstractTileEntityPlantationField
      Returns:
      the colony instance.
    • getDimension

      @Nullable public @Nullable net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> getDimension()
      Description copied from class: AbstractTileEntityPlantationField
      Get the dimension this plantation field is placed in.
      Specified by:
      getDimension in class AbstractTileEntityPlantationField
      Returns:
      the dimension key.
    • getUpdatePacket

      @Nullable public @Nullable net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket getUpdatePacket()
      Specified by:
      getUpdatePacket in interface com.ldtteam.structurize.blockentities.interfaces.IBlueprintDataProviderBE
      Specified by:
      getUpdatePacket in class AbstractTileEntityPlantationField
    • getRotationMirror

      public com.ldtteam.structurize.api.RotationMirror getRotationMirror()
      Get the rotation of the controller.
      Specified by:
      getRotationMirror in class AbstractTileEntityPlantationField
      Returns:
      the placed rotation.
    • getSchematicName

      public String getSchematicName()
    • setSchematicName

      public void setSchematicName(String s)
    • getPositionedTags

      public Map<net.minecraft.core.BlockPos,List<String>> getPositionedTags()
    • setPositionedTags

      public void setPositionedTags(Map<net.minecraft.core.BlockPos,List<String>> positionedTags)
    • getSchematicCorners

      public net.minecraft.util.Tuple<net.minecraft.core.BlockPos,net.minecraft.core.BlockPos> getSchematicCorners()
    • setSchematicCorners

      public void setSchematicCorners(net.minecraft.core.BlockPos pos1, net.minecraft.core.BlockPos pos2)
    • readSchematicDataFromNBT

      public void readSchematicDataFromNBT(net.minecraft.nbt.CompoundTag compound)
    • getTilePos

      public net.minecraft.core.BlockPos getTilePos()
    • rotateAndMirror

      public void rotateAndMirror(com.ldtteam.structurize.api.RotationMirror rotMir)
    • onDataPacket

      public void onDataPacket(net.minecraft.network.Connection net, net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket packet, @NotNull net.minecraft.core.HolderLookup.Provider provider)
    • loadAdditional

      public void loadAdditional(net.minecraft.nbt.CompoundTag compound, @NotNull net.minecraft.core.HolderLookup.Provider provider)
      Overrides:
      loadAdditional in class net.minecraft.world.level.block.entity.BlockEntity
    • saveAdditional

      public void saveAdditional(net.minecraft.nbt.CompoundTag compound, @NotNull net.minecraft.core.HolderLookup.Provider provider)
      Overrides:
      saveAdditional in class net.minecraft.world.level.block.entity.BlockEntity
    • setChanged

      public void setChanged()
      Overrides:
      setChanged in class net.minecraft.world.level.block.entity.BlockEntity
    • getUpdateTag

      @NotNull public @NotNull net.minecraft.nbt.CompoundTag getUpdateTag(@NotNull net.minecraft.core.HolderLookup.Provider provider)
      Overrides:
      getUpdateTag in class net.minecraft.world.level.block.entity.BlockEntity
    • setBlueprintPath

      public void setBlueprintPath(String filePath)
    • setPackName

      public void setPackName(String packName)
    • getBlueprintPath

      public String getBlueprintPath()
    • getPackName

      public String getPackName()
      Getter for the pack.
      Returns:
      String name.