Package com.minecolonies.api.research
Interface IResearchManager
- All Known Implementing Classes:
ResearchManager
public interface IResearchManager
Research manager of the colony holding the tree and effects.
-
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.booleanisDirty()voidvoidreadFromNBT(@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(@NotNull net.minecraft.nbt.CompoundTag statsCompound) Write all stats to nbt.
-
Method Details
-
readFromNBT
void readFromNBT(@NotNull @NotNull net.minecraft.nbt.CompoundTag compound) Reads all stats from nbt.- Parameters:
compound- the compound.
-
writeToNBT
void writeToNBT(@NotNull @NotNull net.minecraft.nbt.CompoundTag statsCompound) Write all stats to nbt.- Parameters:
statsCompound- the compound.
-
sendPackets
-
markDirty
void markDirty() -
isDirty
boolean isDirty() -
clearDirty
void clearDirty() -
getResearchTree
ILocalResearchTree getResearchTree()Get the instance of the researchTree.- Returns:
- the ResearchTree object.
-
getResearchEffects
IResearchEffectManager getResearchEffects()Get an instance of the research effects.- Returns:
- the ResearchEffects object.
-
getResearchEffectIdFrom
net.minecraft.resources.ResourceLocation getResearchEffectIdFrom(net.minecraft.world.level.block.Block block) Gets the Research Effect Identifier for a given Block Format is namespace:effects/path- Parameters:
block- The block to get a research identifier for.- Returns:
- The string format of that research identifier.
-
checkAutoStartResearch
void checkAutoStartResearch()Checks if any autostart research has its prerequisites filled, and if so, prompts the player for resources or begins research if no resources required.
-