Enum Class Mods

java.lang.Object
java.lang.Enum<Mods>
com.simibubi.create.compat.Mods
All Implemented Interfaces:
Serializable, Comparable<Mods>, Constable

public enum Mods extends Enum<Mods>
For compatibility with and without another mod present, we have to define load conditions of the specific code
  • Enum Constant Details

    • AETHER

      public static final Mods AETHER
    • AETHER_II

      public static final Mods AETHER_II
    • BETTEREND

      public static final Mods BETTEREND
    • COMPUTERCRAFT

      public static final Mods COMPUTERCRAFT
    • CURIOS

      public static final Mods CURIOS
    • DYNAMICTREES

      public static final Mods DYNAMICTREES
    • JEI

      public static final Mods JEI
    • FUNCTIONALSTORAGE

      public static final Mods FUNCTIONALSTORAGE
    • OCCULTISM

      public static final Mods OCCULTISM
    • PACKETFIXER

      public static final Mods PACKETFIXER
    • SOPHISTICATEDBACKPACKS

      public static final Mods SOPHISTICATEDBACKPACKS
    • SOPHISTICATEDSTORAGE

      public static final Mods SOPHISTICATEDSTORAGE
    • STORAGEDRAWERS

      public static final Mods STORAGEDRAWERS
    • TCONSTRUCT

      public static final Mods TCONSTRUCT
    • FRAMEDBLOCKS

      public static final Mods FRAMEDBLOCKS
    • XLPACKETS

      public static final Mods XLPACKETS
    • MODERNUI

      public static final Mods MODERNUI
    • FTBCHUNKS

      public static final Mods FTBCHUNKS
    • JOURNEYMAP

      public static final Mods JOURNEYMAP
    • XAEROWORLDMAP

      public static final Mods XAEROWORLDMAP
    • FTBLIBRARY

      public static final Mods FTBLIBRARY
    • SODIUM

      public static final Mods SODIUM
    • INVENTORYSORTER

      public static final Mods INVENTORYSORTER
    • FARMERSDELIGHT

      public static final Mods FARMERSDELIGHT
  • Method Details

    • values

      public static Mods[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Mods valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • id

      public String id()
      Returns:
      the mod id
    • rl

      public net.minecraft.resources.ResourceLocation rl(String path)
    • getBlock

      public net.minecraft.world.level.block.Block getBlock(String id)
    • getItem

      public net.minecraft.world.item.Item getItem(String id)
    • contains

      public boolean contains(net.minecraft.world.level.ItemLike entry)
    • isLoaded

      public boolean isLoaded()
      Returns:
      a boolean of whether the mod is loaded or not based on mod id
    • runIfInstalled

      public <T> Optional<T> runIfInstalled(Supplier<Supplier<T>> toRun)
      Simple hook to run code if a mod is installed
      Parameters:
      toRun - will be run only if the mod is loaded
      Returns:
      Optional.empty() if the mod is not loaded, otherwise an Optional of the return value of the given supplier
    • executeIfInstalled

      public void executeIfInstalled(Supplier<Runnable> toExecute)
      Simple hook to execute code if a mod is installed
      Parameters:
      toExecute - will be executed only if the mod is loaded