Interface IServerColonySaveData
- All Known Implementing Classes:
ServerColonySaveData
public interface IServerColonySaveData
Capability for the colony tag for chunks
-
Method Summary
Modifier and TypeMethodDescriptionvoidadd a new colony to the capability.createColony(@NotNull net.minecraft.server.level.ServerLevel w, @NotNull String name, @NotNull net.minecraft.core.BlockPos pos) Create a colony and return it.voiddeleteColony(int id) Delete a colony with a certain id.Get a list of all colonies.getColony(int id) Get a colony with a certain id.static IServerColonySaveDatagetOrComputeSaveData(net.minecraft.server.level.ServerLevel level) Get the save data for a given server level.static IServerColonySaveDatagetSaveData(net.minecraft.server.level.ServerLevel level) intgetTopID()Get the top most id of all colonies.setOverworld(boolean b) Set as overworld.
-
Method Details
-
createColony
IColony createColony(@NotNull @NotNull net.minecraft.server.level.ServerLevel w, @NotNull @NotNull String name, @NotNull @NotNull net.minecraft.core.BlockPos pos) Create a colony and return it.- Parameters:
w- the world the colony is in.name- the name of the colony.pos- the position of the colony.- Returns:
- the created colony.
-
deleteColony
void deleteColony(int id) Delete a colony with a certain id.- Parameters:
id- the id of the colony.
-
getColony
Get a colony with a certain id.- Parameters:
id- the id of the colony.- Returns:
- the colony or null.
-
getColonies
Get a list of all colonies.- Returns:
- a complete list.
-
addColony
add a new colony to the capability.- Parameters:
colony- the colony to add.
-
getTopID
int getTopID()Get the top most id of all colonies.- Returns:
- the top most id.
-
setOverworld
Set as overworld.- Parameters:
b- if overworld.- Returns:
- itself.
-
getOrComputeSaveData
Get the save data for a given server level.- Parameters:
level- the server level to get it from.- Returns:
- the savedata.
-
getSaveData
-