Class ResearchManager
java.lang.Object
com.minecolonies.core.colony.managers.ResearchManager
- All Implemented Interfaces:
IResearchManager
Research manager of the colony.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks if any autostart research has its prerequisites filled, and if so, prompts the player for resources or begins research if no resources required.voidnet.minecraft.resources.ResourceLocationgetResearchEffectIdFrom(net.minecraft.world.level.block.Block block) Gets the Research Effect Identifier for a given Block Format is namespace:effects/pathGet an instance of the research effects.Get the instance of the researchTree.final booleanisDirty()final voidvoidreadFromNBT(net.minecraft.core.HolderLookup.Provider provider, @NotNull net.minecraft.nbt.CompoundTag compound) Reads all stats from nbt.voidsendPackets(Set<net.minecraft.server.level.ServerPlayer> closeSubscribers, Set<net.minecraft.server.level.ServerPlayer> newSubscribers) voidwriteToNBT(net.minecraft.core.HolderLookup.Provider provider, @NotNull net.minecraft.nbt.CompoundTag compound) Write all stats to nbt.
-
Constructor Details
-
ResearchManager
-
-
Method Details
-
readFromNBT
public void readFromNBT(@NotNull net.minecraft.core.HolderLookup.Provider provider, @NotNull @NotNull net.minecraft.nbt.CompoundTag compound) Description copied from interface:IResearchManagerReads all stats from nbt.- Specified by:
readFromNBTin interfaceIResearchManager- Parameters:
compound- the compound.
-
writeToNBT
public void writeToNBT(@NotNull net.minecraft.core.HolderLookup.Provider provider, @NotNull @NotNull net.minecraft.nbt.CompoundTag compound) Description copied from interface:IResearchManagerWrite all stats to nbt.- Specified by:
writeToNBTin interfaceIResearchManager- Parameters:
compound- the compound.
-
sendPackets
public void sendPackets(Set<net.minecraft.server.level.ServerPlayer> closeSubscribers, Set<net.minecraft.server.level.ServerPlayer> newSubscribers) - Specified by:
sendPacketsin interfaceIResearchManager
-
markDirty
public final void markDirty()- Specified by:
markDirtyin interfaceIResearchManager
-
isDirty
public final boolean isDirty()- Specified by:
isDirtyin interfaceIResearchManager
-
clearDirty
public void clearDirty()- Specified by:
clearDirtyin interfaceIResearchManager
-
getResearchTree
Description copied from interface:IResearchManagerGet the instance of the researchTree.- Specified by:
getResearchTreein interfaceIResearchManager- Returns:
- the ResearchTree object.
-
getResearchEffects
Description copied from interface:IResearchManagerGet an instance of the research effects.- Specified by:
getResearchEffectsin interfaceIResearchManager- Returns:
- the ResearchEffects object.
-
getResearchEffectIdFrom
public net.minecraft.resources.ResourceLocation getResearchEffectIdFrom(net.minecraft.world.level.block.Block block) Description copied from interface:IResearchManagerGets the Research Effect Identifier for a given Block Format is namespace:effects/path- Specified by:
getResearchEffectIdFromin interfaceIResearchManager- Parameters:
block- The block to get a research identifier for.- Returns:
- The string format of that research identifier.
-
checkAutoStartResearch
public void checkAutoStartResearch()Description copied from interface:IResearchManagerChecks if any autostart research has its prerequisites filled, and if so, prompts the player for resources or begins research if no resources required.- Specified by:
checkAutoStartResearchin interfaceIResearchManager
-