Interface IServerColonySaveData

All Known Implementing Classes:
ServerColonySaveData

public interface IServerColonySaveData
Capability for the colony tag for chunks
  • 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

      @Nullable IColony getColony(int id)
      Get a colony with a certain id.
      Parameters:
      id - the id of the colony.
      Returns:
      the colony or null.
    • getColonies

      List<IColony> getColonies()
      Get a list of all colonies.
      Returns:
      a complete list.
    • addColony

      void addColony(IColony colony)
      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

      IServerColonySaveData setOverworld(boolean b)
      Set as overworld.
      Parameters:
      b - if overworld.
      Returns:
      itself.
    • getOrComputeSaveData

      static IServerColonySaveData getOrComputeSaveData(net.minecraft.server.level.ServerLevel level)
      Get the save data for a given server level.
      Parameters:
      level - the server level to get it from.
      Returns:
      the savedata.
    • getSaveData

      static IServerColonySaveData getSaveData(net.minecraft.server.level.ServerLevel level)