java.lang.Object
com.minecolonies.core.colony.requestsystem.locations.EntityLocation
All Implemented Interfaces:
ILocation

public class EntityLocation extends Object implements ILocation
Location described by an Entity.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    EntityLocation(@NotNull UUID uuid)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    deserialize(net.minecraft.network.FriendlyByteBuf buffer)
    Deserialize the location from the given FriendlyByteBuf
    @NotNull net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>
    Method to get the dimension of the location.
    @NotNull net.minecraft.core.BlockPos
    Method to get the location in the dimension
    net.minecraft.world.entity.player.Player
    Returns the *player* entity the location is tracking.
    boolean
    Method to check if this location is reachable from the other.
    static void
    serialize(net.minecraft.network.FriendlyByteBuf buffer, EntityLocation location)
    Serialize this location to the given FriendlyByteBuf.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EntityLocation

      public EntityLocation(@NotNull @NotNull UUID uuid)
  • Method Details

    • getInDimensionLocation

      @NotNull public @NotNull net.minecraft.core.BlockPos getInDimensionLocation()
      Method to get the location in the dimension
      Specified by:
      getInDimensionLocation in interface ILocation
      Returns:
      The location.
    • getDimension

      @NotNull public @NotNull net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> getDimension()
      Method to get the dimension of the location.
      Specified by:
      getDimension in interface ILocation
      Returns:
      The dimension of the location.
    • isReachableFromLocation

      public boolean isReachableFromLocation(@NotNull @NotNull ILocation location)
      Method to check if this location is reachable from the other.
      Specified by:
      isReachableFromLocation in interface ILocation
      Parameters:
      location - The check if it is reachable from here.
      Returns:
      True when reachable, false when not.
    • getPlayerEntity

      public net.minecraft.world.entity.player.Player getPlayerEntity()
      Returns the *player* entity the location is tracking.
      Returns:
      player entity being tracked, or null if the tracked entity is not a player.
    • serialize

      public static void serialize(net.minecraft.network.FriendlyByteBuf buffer, EntityLocation location)
      Serialize this location to the given FriendlyByteBuf.
      Parameters:
      buffer - the buffer to serialize this location to.
    • deserialize

      public static EntityLocation deserialize(net.minecraft.network.FriendlyByteBuf buffer)
      Deserialize the location from the given FriendlyByteBuf
      Parameters:
      buffer - the buffer to read.
      Returns:
      the deserialized location.