Class EntityLocation
java.lang.Object
com.minecolonies.core.colony.requestsystem.locations.EntityLocation
- All Implemented Interfaces:
ILocation
Location described by an Entity.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic EntityLocationdeserialize(net.minecraft.network.FriendlyByteBuf buffer) Deserialize the location from the givenFriendlyByteBuf@NotNull net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>Method to get the dimension of the location.@NotNull net.minecraft.core.BlockPosMethod to get the location in the dimensionnet.minecraft.world.entity.player.PlayerReturns the *player* entity the location is tracking.booleanisReachableFromLocation(@NotNull ILocation location) Method to check if this location is reachable from the other.static voidserialize(net.minecraft.network.FriendlyByteBuf buffer, EntityLocation location) Serialize this location to the givenFriendlyByteBuf.
-
Constructor Details
-
EntityLocation
-
-
Method Details
-
getInDimensionLocation
@NotNull public @NotNull net.minecraft.core.BlockPos getInDimensionLocation()Method to get the location in the dimension- Specified by:
getInDimensionLocationin interfaceILocation- 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:
getDimensionin interfaceILocation- Returns:
- The dimension of the location.
-
isReachableFromLocation
Method to check if this location is reachable from the other.- Specified by:
isReachableFromLocationin interfaceILocation- 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
Serialize this location to the givenFriendlyByteBuf.- Parameters:
buffer- the buffer to serialize this location to.
-
deserialize
Deserialize the location from the givenFriendlyByteBuf- Parameters:
buffer- the buffer to read.- Returns:
- the deserialized location.
-