Class SlimefunRegistry

java.lang.Object
io.github.thebusybiscuit.slimefun4.core.SlimefunRegistry

public final class SlimefunRegistry extends Object
This class houses a lot of instances of Map and List that hold various mappings and collections related to SlimefunItem.
Author:
TheBusyBiscuit
  • Constructor Details

    • SlimefunRegistry

      public SlimefunRegistry()
  • Method Details

    • load

      public void load(@Nonnull Slimefun plugin, @Nonnull io.github.bakedlibs.dough.config.Config cfg)
    • isAutoLoadingEnabled

      public boolean isAutoLoadingEnabled()
      This returns whether auto-loading is enabled. Auto-Loading will automatically call SlimefunItem.load() when the item is registered. Normally that method is called after the Server finished starting up. But in the unusual scenario if a SlimefunItem is registered after that, this is gonna cover that.
      Returns:
      Whether auto-loading is enabled
    • setAutoLoadingMode

      public void setAutoLoadingMode(boolean mode)
      This method will make any SlimefunItem which is registered automatically call SlimefunItem.load(). Normally this method call is delayed but when the Server is already running, the method can be called instantaneously.
      Parameters:
      mode - Whether auto-loading should be enabled
    • getAllItemGroups

      @Nonnull public List<ItemGroup> getAllItemGroups()
      This returns a List containing every enabled ItemGroup.
      Returns:
      List containing every enabled ItemGroup
    • getAllSlimefunItems

      @Nonnull public List<SlimefunItem> getAllSlimefunItems()
      This List contains every SlimefunItem, even disabled items.
      Returns:
      A List containing every SlimefunItem
    • getEnabledSlimefunItems

      @Nonnull public List<SlimefunItem> getEnabledSlimefunItems()
      This List contains every enabled SlimefunItem.
      Returns:
      A List containing every enabled SlimefunItem
    • getResearches

      @Nonnull public List<Research> getResearches()
      This returns a List containing every enabled Research.
      Returns:
      A List containing every enabled Research
    • getCurrentlyResearchingPlayers

      @Nonnull public Set<UUID> getCurrentlyResearchingPlayers()
      This method returns a Set containing the UUID of every Player who is currently unlocking a Research.
      Returns:
      A Set holding the UUID from every Player who is currently unlocking a Research
    • getResearchRanks

      @Nonnull public List<String> getResearchRanks()
    • setResearchingEnabled

      public void setResearchingEnabled(boolean enabled)
    • isResearchingEnabled

      public boolean isResearchingEnabled()
    • setFreeCreativeResearchingEnabled

      public void setFreeCreativeResearchingEnabled(boolean enabled)
    • isFreeCreativeResearchingEnabled

      public boolean isFreeCreativeResearchingEnabled()
    • isResearchFireworkEnabled

      public boolean isResearchFireworkEnabled()
    • isLearningAnimationDisabled

      public boolean isLearningAnimationDisabled()
      Returns whether the research learning animations is disabled
      Returns:
      Whether the research learning animations is disabled
    • getMultiBlocks

      @Nonnull public List<MultiBlock> getMultiBlocks()
      This method returns a List of every enabled MultiBlock.
      Returns:
      A List containing every enabled MultiBlock
    • getSlimefunGuide

      @Nonnull public SlimefunGuideImplementation getSlimefunGuide(@Nonnull SlimefunGuideMode mode)
      This returns the corresponding SlimefunGuideImplementation for a certain SlimefunGuideMode.

      This mainly only exists for internal purposes, if you want to open a certain section using the SlimefunGuide, then please use the static methods provided in the SlimefunGuide class.

      Parameters:
      mode - The SlimefunGuideMode
      Returns:
      The corresponding SlimefunGuideImplementation
    • getMobDrops

      @Nonnull public Map<EntityType,Set<ItemStack>> getMobDrops()
      This returns a Map connecting the EntityType with a Set of ItemStacks which would be dropped when an Entity of that type was killed.
      Returns:
      The Map of custom mob drops
    • getBarteringDrops

      @Nonnull public Set<ItemStack> getBarteringDrops()
      This returns a Set of ItemStacks which can be obtained by bartering with Piglins.
      Returns:
      A Set of bartering drops
    • getRadioactiveItems

      @Nonnull public Set<SlimefunItem> getRadioactiveItems()
    • getTickerBlocks

      @Nonnull public Set<String> getTickerBlocks()
    • getSlimefunItemIds

      @Nonnull public Map<String,SlimefunItem> getSlimefunItemIds()
    • getMenuPresets

      @Nonnull public Map<String,BlockMenuPreset> getMenuPresets()
    • getUniversalInventories

      @Nonnull public Map<String,UniversalBlockMenu> getUniversalInventories()
    • getPlayerProfiles

      @Nonnull public Map<UUID,PlayerProfile> getPlayerProfiles()
    • getGlobalItemHandlers

      @Nonnull public Map<Class<? extends ItemHandler>,Set<ItemHandler>> getGlobalItemHandlers()
    • getGlobalItemHandlers

      @Nonnull public Set<ItemHandler> getGlobalItemHandlers(@Nonnull Class<? extends ItemHandler> identifier)
    • getWorlds

      @Nonnull public Map<String,BlockStorage> getWorlds()
    • getChunks

      @Nonnull public Map<String,BlockInfoConfig> getChunks()
    • getGEOResources

      @Nonnull public io.github.bakedlibs.dough.collections.KeyMap<GEOResource> getGEOResources()
    • logDuplicateBlockEntries

      public boolean logDuplicateBlockEntries()
    • useActionbarForTalismans

      public boolean useActionbarForTalismans()
    • getSoulboundDataKey

      @Nonnull public NamespacedKey getSoulboundDataKey()
    • getItemChargeDataKey

      @Nonnull public NamespacedKey getItemChargeDataKey()
    • getGuideDataKey

      @Nonnull public NamespacedKey getGuideDataKey()