Class TileEntityScarecrow
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.AbstractTileEntityScarecrow
com.minecolonies.core.tileentities.TileEntityScarecrow
- All Implemented Interfaces:
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>
The scarecrow tile entity to store extra data.
-
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 net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB -
Constructor Summary
ConstructorsConstructorDescriptionTileEntityScarecrow(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) Creates an instance of the tileEntity. -
Method Summary
Modifier and TypeMethodDescriptionThe colony this field is located in.int[]Field size.Returns the type of the scarecrow (Important for the rendering).net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket@NotNull net.minecraft.nbt.CompoundTagvoidload(net.minecraft.nbt.CompoundTag compoundTag) voidsaveAdditional(net.minecraft.nbt.CompoundTag compoundTag) voidsetFieldSize(net.minecraft.core.Direction direction, int radius) Methods 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, 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 net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
-
Constructor Details
-
TileEntityScarecrow
public TileEntityScarecrow(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) Creates an instance of the tileEntity.
-
-
Method Details
-
getScarecrowType
Description copied from class:AbstractTileEntityScarecrowReturns the type of the scarecrow (Important for the rendering).- Specified by:
getScarecrowTypein classAbstractTileEntityScarecrow- Returns:
- the enum type.
-
getCurrentColony
Description copied from class:AbstractTileEntityScarecrowThe colony this field is located in.- Specified by:
getCurrentColonyin classAbstractTileEntityScarecrow- Returns:
- the colony instance.
-
saveAdditional
public void saveAdditional(net.minecraft.nbt.CompoundTag compoundTag) - Overrides:
saveAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
load
public void load(net.minecraft.nbt.CompoundTag compoundTag) - Overrides:
loadin classnet.minecraft.world.level.block.entity.BlockEntity
-
setFieldSize
public void setFieldSize(net.minecraft.core.Direction direction, int radius) - Parameters:
direction- the direction for the radiusradius- the number of blocks from the scarecrow that the farmer will work with
-
getUpdatePacket
public net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket getUpdatePacket()- Overrides:
getUpdatePacketin 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
-
getFieldSize
public int[] getFieldSize()Field size.- Returns:
- the field size.
-