Package com.minecolonies.api.util
Class ChunkCapData
java.lang.Object
com.minecolonies.api.util.ChunkCapData
Wrapper class for chunk pos and colony cap data
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionChunkCapData(int x, int z) ChunkCapData(int x, int z, int owningColony, List<Integer> staticColonyClaim, @NotNull Map<Integer, Set<net.minecraft.core.BlockPos>> allClaimingBuildings) -
Method Summary
Modifier and TypeMethodDescriptionstatic ChunkCapDatafromBytes(@NotNull net.minecraft.network.RegistryFriendlyByteBuf buffer) Creates the data from a bufferGetter for all claimed buildings.intGetter for owning colony id.Getter for static claim.voidtoBytes(@NotNull net.minecraft.network.RegistryFriendlyByteBuf buf) Writes data to a buffer
-
Field Details
-
x
public final int xChunk coordinates -
z
public final int z
-
-
Constructor Details
-
ChunkCapData
public ChunkCapData(int x, int z) -
ChunkCapData
-
-
Method Details
-
toBytes
public void toBytes(@NotNull @NotNull net.minecraft.network.RegistryFriendlyByteBuf buf) Writes data to a buffer- Parameters:
buf- the buffer to write it to.
-
fromBytes
public static ChunkCapData fromBytes(@NotNull @NotNull net.minecraft.network.RegistryFriendlyByteBuf buffer) Creates the data from a buffer- Parameters:
buffer- the bytebuffer.- Returns:
- the cap data.
-
getStaticColonyClaim
Getter for static claim.- Returns:
- list.
-
getOwningColony
public int getOwningColony()Getter for owning colony id.- Returns:
- the id.
-
getAllClaimingBuildings
Getter for all claimed buildings.- Returns:
- the map.
-