Package com.minecolonies.core.colony
Class IColonyManagerCapability.Impl
java.lang.Object
com.minecolonies.core.colony.IColonyManagerCapability.Impl
- All Implemented Interfaces:
IColonyManagerCapability
- Enclosing interface:
- IColonyManagerCapability
public static class IColonyManagerCapability.Impl
extends Object
implements IColonyManagerCapability
The implementation of the colonyTagCapability.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.minecolonies.core.colony.IColonyManagerCapability
IColonyManagerCapability.Impl, IColonyManagerCapability.Storage -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd a new colony to the capability.createColony(@NotNull net.minecraft.world.level.Level w, @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.intgetTopID()Get the top most id of all colonies.
-
Constructor Details
-
Impl
public Impl()
-
-
Method Details
-
createColony
public IColony createColony(@NotNull @NotNull net.minecraft.world.level.Level w, @NotNull @NotNull net.minecraft.core.BlockPos pos) Description copied from interface:IColonyManagerCapabilityCreate a colony and return it.- Specified by:
createColonyin interfaceIColonyManagerCapability- Parameters:
w- the world the colony is in.pos- the position of the colony.- Returns:
- the created colony.
-
deleteColony
public void deleteColony(int id) Description copied from interface:IColonyManagerCapabilityDelete a colony with a certain id.- Specified by:
deleteColonyin interfaceIColonyManagerCapability- Parameters:
id- the id of the colony.
-
getColony
Description copied from interface:IColonyManagerCapabilityGet a colony with a certain id.- Specified by:
getColonyin interfaceIColonyManagerCapability- Parameters:
id- the id of the colony.- Returns:
- the colony or null.
-
getColonies
Description copied from interface:IColonyManagerCapabilityGet a list of all colonies.- Specified by:
getColoniesin interfaceIColonyManagerCapability- Returns:
- a complete list.
-
addColony
Description copied from interface:IColonyManagerCapabilityadd a new colony to the capability.- Specified by:
addColonyin interfaceIColonyManagerCapability- Parameters:
colony- the colony to add.
-
getTopID
public int getTopID()Description copied from interface:IColonyManagerCapabilityGet the top most id of all colonies.- Specified by:
getTopIDin interfaceIColonyManagerCapability- Returns:
- the top most id.
-