Class BuildingEntry
java.lang.Object
com.minecolonies.api.colony.buildings.registry.BuildingEntry
Entry for the
IBuilding registry. Makes it possible to create a single registry for a IBuilding. Used to lookup how to create IBuilding and IBuildingView. Also links a given IBuilding to a given AbstractBlockHut.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA builder class forBuildingEntry.static classBuildingEntry.ModuleProducer<MODULECLASS extends IBuildingModule,VIEWCLASS extends IBuildingModuleView> Set of servermodule and its view with ID, module or view might be null -
Method Summary
Modifier and TypeMethodDescriptionstatic Map<String,BuildingEntry.ModuleProducer> Retreives all existing module producers and their IDsstatic BuildingEntry.ModuleProducergetProducer(int runtimeID) get a producer by its runtime identitystatic BuildingEntry.ModuleProducergetProducer(String key) Gets a producer by its string key identitynet.minecraft.resources.ResourceLocationGet the assigned registry name.produceBuilding(net.minecraft.core.BlockPos position, IColony colony) produceBuildingView(net.minecraft.core.BlockPos position, IColonyView colony) static @Nullable IBuildingModuleProduces a module without a respective building, mostly used for display or other purposesstatic @Nullable IBuildingModuleViewproduceViewWithoutBuilding(String key, IColonyView colony) Produces a module view without a respective building, mostly used for display or other purposes
-
Method Details
-
getTranslationKey
-
getBuildingBlock
-
produceBuilding
-
produceBuildingView
-
getModuleProducers
-
getRegistryName
public net.minecraft.resources.ResourceLocation getRegistryName()Get the assigned registry name.- Returns:
-
produceModuleWithoutBuilding
Produces a module without a respective building, mostly used for display or other purposes- Parameters:
key-- Returns:
-
produceViewWithoutBuilding
@Nullable public static @Nullable IBuildingModuleView produceViewWithoutBuilding(String key, IColonyView colony) Produces a module view without a respective building, mostly used for display or other purposes- Parameters:
key-- Returns:
-
getALlModuleProducers
Retreives all existing module producers and their IDs- Returns:
-
getProducer
Gets a producer by its string key identity- Parameters:
key-- Returns:
-
getProducer
get a producer by its runtime identity- Parameters:
runtimeID-- Returns:
-