Class TileEntityPlantationField
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
com.minecolonies.core.tileentities.TileEntityPlantationField
- 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>
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, worldPositionFields 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_POSFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB -
Constructor Summary
ConstructorsConstructorDescriptionTileEntityPlantationField(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionThe 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.booleanGet the mirroring setting of the controller.Getter for the pack.The field type of this plantation.net.minecraft.world.level.block.RotationGet 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.CompoundTagList<net.minecraft.core.BlockPos>The working positions stored in this field.voidload(net.minecraft.nbt.CompoundTag compound) voidmirror(net.minecraft.world.level.block.Mirror mirror) voidonDataPacket(net.minecraft.network.Connection net, net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket packet) voidreadSchematicDataFromNBT(net.minecraft.nbt.CompoundTag compound) voidrotate(net.minecraft.world.level.block.Rotation rotationIn) voidsaveAdditional(net.minecraft.nbt.CompoundTag compound) voidsetBlueprintPath(String filePath) voidvoidsetPackName(String packName) voidsetPositionedTags(Map<net.minecraft.core.BlockPos, List<String>> positionedTags) voidsetSchematicCorners(net.minecraft.core.BlockPos pos1, net.minecraft.core.BlockPos pos2) voidMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setLevel, setRemoved, triggerEventMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.ldtteam.structurize.blockentities.interfaces.IBlueprintDataProviderBE
addTag, getInWorldCorners, getRealWorldPos, getWorldTagNamePosMap, getWorldTagPosMap, removeTag, writeSchematicDataToNBTMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onLoad, requestModelDataUpdate, serializeNBT
-
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
Description copied from class:AbstractTileEntityPlantationFieldThe field type of this plantation.- Specified by:
getPlantationFieldTypesin classAbstractTileEntityPlantationField- Returns:
- the field type.
-
getWorkingPositions
Description copied from class:AbstractTileEntityPlantationFieldThe working positions stored in this field.- Specified by:
getWorkingPositionsin classAbstractTileEntityPlantationField- Parameters:
tag- the tag to search for.- Returns:
- a list of working positions.
-
getCurrentColony
Description copied from class:AbstractTileEntityPlantationFieldThe colony this field is located in.- Specified by:
getCurrentColonyin classAbstractTileEntityPlantationField- Returns:
- the colony instance.
-
getDimension
@Nullable public @Nullable net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> getDimension()Description copied from class:AbstractTileEntityPlantationFieldGet the dimension this plantation field is placed in.- Specified by:
getDimensionin classAbstractTileEntityPlantationField- Returns:
- the dimension key.
-
getUpdatePacket
@Nullable public @Nullable net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket getUpdatePacket()- Specified by:
getUpdatePacketin interfacecom.ldtteam.structurize.blockentities.interfaces.IBlueprintDataProviderBE- Specified by:
getUpdatePacketin classAbstractTileEntityPlantationField
-
getRotation
public net.minecraft.world.level.block.Rotation getRotation()Get the rotation of the controller.- Specified by:
getRotationin classAbstractTileEntityPlantationField- Returns:
- the placed rotation.
-
getMirror
public boolean getMirror()Get the mirroring setting of the controller.- Specified by:
getMirrorin classAbstractTileEntityPlantationField- Returns:
- true if mirrored.
-
getSchematicName
-
setSchematicName
-
getPositionedTags
-
setPositionedTags
-
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() -
rotate
public void rotate(net.minecraft.world.level.block.Rotation rotationIn) -
mirror
public void mirror(net.minecraft.world.level.block.Mirror mirror) -
onDataPacket
public void onDataPacket(net.minecraft.network.Connection net, net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket packet) -
load
public void load(net.minecraft.nbt.CompoundTag compound) - Overrides:
loadin classnet.minecraft.world.level.block.entity.BlockEntity
-
saveAdditional
public void saveAdditional(net.minecraft.nbt.CompoundTag compound) - Overrides:
saveAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
setChanged
public void setChanged()- Overrides:
setChangedin classnet.minecraft.world.level.block.entity.BlockEntity
-
getUpdateTag
@NotNull public @NotNull net.minecraft.nbt.CompoundTag getUpdateTag()- Overrides:
getUpdateTagin classnet.minecraft.world.level.block.entity.BlockEntity
-
setBlueprintPath
-
setPackName
-
getBlueprintPath
-
getPackName
Getter for the pack.- Returns:
- String name.
-