Class TileEntityColonySign

java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
com.minecolonies.core.tileentities.TileEntityColonySign
All Implemented Interfaces:
ITickable, 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>

public class TileEntityColonySign extends net.minecraft.world.level.block.entity.BlockEntity implements ITickable
  • 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 net.minecraftforge.common.extensions.IForgeBlockEntity

    INFINITE_EXTENT_AABB
  • Constructor Summary

    Constructors
    Constructor
    Description
    TileEntityColonySign(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get colony of sign above (cached).
    int
    Get distance to colony.
    int
    Get colony id from sign, like to copy it on another sign.
    Obtain the colony name.
    @NotNull net.minecraft.core.BlockPos
    Get next node pos.
    @NotNull net.minecraft.core.BlockPos
    Get previous node pos.
    float
    Get the relative rotation to the colony.
    int
    Get target colony distance.
    int
    + Get target colony id from sign, -1 if not set.
    Obtain the target colony name.
    net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket
     
    @NotNull net.minecraft.nbt.CompoundTag
     
    void
    load(@NotNull net.minecraft.nbt.CompoundTag compound)
     
    void
    onDataPacket(net.minecraft.network.Connection net, net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket packet)
     
    void
    saveAdditional(@NotNull net.minecraft.nbt.CompoundTag compound)
     
    void
     
    void
    setColonyAndAnchor(IColony colony, net.minecraft.core.BlockPos anchor)
    Set the colony meta data.
    void
    Update method to be called by Minecraft every tick

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

    getCapability, getCapability

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

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

    Methods inherited from interface com.minecolonies.api.tileentities.ITickable

    tick
  • Constructor Details

    • TileEntityColonySign

      public TileEntityColonySign(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
  • Method Details

    • setChanged

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

      public void load(@NotNull @NotNull net.minecraft.nbt.CompoundTag compound)
      Overrides:
      load in class net.minecraft.world.level.block.entity.BlockEntity
    • saveAdditional

      public void saveAdditional(@NotNull @NotNull net.minecraft.nbt.CompoundTag compound)
      Overrides:
      saveAdditional in class net.minecraft.world.level.block.entity.BlockEntity
    • getUpdatePacket

      @Nullable public net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket getUpdatePacket()
      Overrides:
      getUpdatePacket in class net.minecraft.world.level.block.entity.BlockEntity
    • getUpdateTag

      @NotNull public @NotNull net.minecraft.nbt.CompoundTag getUpdateTag()
      Overrides:
      getUpdateTag in class net.minecraft.world.level.block.entity.BlockEntity
    • onDataPacket

      public void onDataPacket(net.minecraft.network.Connection net, net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket packet)
      Specified by:
      onDataPacket in interface net.minecraftforge.common.extensions.IForgeBlockEntity
    • tick

      public void tick()
      Update method to be called by Minecraft every tick
      Specified by:
      tick in interface ITickable
    • setColonyAndAnchor

      public void setColonyAndAnchor(IColony colony, @Nullable net.minecraft.core.BlockPos anchor)
      Set the colony meta data.
      Parameters:
      colony - the colony.
      anchor - the anchor position it points to.
    • getColonyName

      public String getColonyName()
      Obtain the colony name. Cached for efficiency.
      Returns:
      string name.
    • getRelativeRotation

      public float getRelativeRotation()
      Get the relative rotation to the colony. Cached for efficiency.
      Returns:
      the value.
    • getColonyDistance

      public int getColonyDistance()
      Get distance to colony.
      Returns:
      the distance in blocks.
    • getColonyId

      public int getColonyId()
      Get colony id from sign, like to copy it on another sign.
      Returns:
      the colony id.
    • getTargetColonyId

      public int getTargetColonyId()
      + Get target colony id from sign, -1 if not set.
      Returns:
      the target colony id.
    • getTargetColonyName

      public String getTargetColonyName()
      Obtain the target colony name. Cached for efficiency.
      Returns:
      string name.
    • getTargetColonyDistance

      public int getTargetColonyDistance()
      Get target colony distance.
      Returns:
      the distance in blocks.
    • getCachedSignAboveColony

      public int getCachedSignAboveColony()
      Get colony of sign above (cached).
      Returns:
      the colony id (-1 default).
    • getPreviousPos

      @NotNull public @NotNull net.minecraft.core.BlockPos getPreviousPos()
      Get previous node pos.
      Returns:
      the pos.
    • getNextPosition

      @NotNull public @NotNull net.minecraft.core.BlockPos getNextPosition()
      Get next node pos.
      Returns:
      the pos.