Class StaticLocation
java.lang.Object
com.minecolonies.core.colony.requestsystem.locations.StaticLocation
- All Implemented Interfaces:
ILocation
Location described by an immutable blockpos and a dimension.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionStaticLocation(@NotNull net.minecraft.core.BlockPos pos, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension) -
Method Summary
Modifier and TypeMethodDescriptionstatic StaticLocationdeserialize(net.minecraft.network.FriendlyByteBuf buffer) Deserialize the location from the givenFriendlyByteBufboolean@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 dimensioninthashCode()booleanisReachableFromLocation(@NotNull ILocation location) Method to check if this location is reachable from the other.static voidserialize(net.minecraft.network.FriendlyByteBuf buffer, StaticLocation location) Serialize this location to the givenFriendlyByteBuf.toString()
-
Constructor Details
-
StaticLocation
public StaticLocation(@NotNull @NotNull net.minecraft.core.BlockPos pos, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension)
-
-
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.
-
equals
-
hashCode
public int hashCode() -
toString
-
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.
-