Class ResearchManager

java.lang.Object
com.minecolonies.core.colony.managers.ResearchManager
All Implemented Interfaces:
IResearchManager

public class ResearchManager extends Object implements IResearchManager
Research manager of the colony.
  • Constructor Details

    • ResearchManager

      public ResearchManager(IColony colony)
  • Method Details

    • readFromNBT

      public void readFromNBT(@NotNull net.minecraft.core.HolderLookup.Provider provider, @NotNull @NotNull net.minecraft.nbt.CompoundTag compound)
      Description copied from interface: IResearchManager
      Reads all stats from nbt.
      Specified by:
      readFromNBT in interface IResearchManager
      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: IResearchManager
      Write all stats to nbt.
      Specified by:
      writeToNBT in interface IResearchManager
      Parameters:
      compound - the compound.
    • sendPackets

      public void sendPackets(Set<net.minecraft.server.level.ServerPlayer> closeSubscribers, Set<net.minecraft.server.level.ServerPlayer> newSubscribers)
      Specified by:
      sendPackets in interface IResearchManager
    • markDirty

      public final void markDirty()
      Specified by:
      markDirty in interface IResearchManager
    • isDirty

      public final boolean isDirty()
      Specified by:
      isDirty in interface IResearchManager
    • clearDirty

      public void clearDirty()
      Specified by:
      clearDirty in interface IResearchManager
    • getResearchTree

      public LocalResearchTree getResearchTree()
      Description copied from interface: IResearchManager
      Get the instance of the researchTree.
      Specified by:
      getResearchTree in interface IResearchManager
      Returns:
      the ResearchTree object.
    • getResearchEffects

      public IResearchEffectManager getResearchEffects()
      Description copied from interface: IResearchManager
      Get an instance of the research effects.
      Specified by:
      getResearchEffects in interface IResearchManager
      Returns:
      the ResearchEffects object.
    • getResearchEffectIdFrom

      public net.minecraft.resources.ResourceLocation getResearchEffectIdFrom(net.minecraft.world.level.block.Block block)
      Description copied from interface: IResearchManager
      Gets the Research Effect Identifier for a given Block Format is namespace:effects/path
      Specified by:
      getResearchEffectIdFrom in interface IResearchManager
      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: IResearchManager
      Checks 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:
      checkAutoStartResearch in interface IResearchManager