Class ValueNotifierHelpers

java.lang.Object
org.cyclops.cyclopscore.helper.ValueNotifierHelpers

public class ValueNotifierHelpers extends Object
Helper methods for IValueNotifiable and IValueNotifier.
  • Field Details

    • KEY

      public static String KEY
  • Constructor Details

    • ValueNotifierHelpers

      public ValueNotifierHelpers()
  • Method Details

    • setValue

      public static void setValue(IValueNotifier notifier, int valueId, net.minecraft.nbt.Tag value)
      Set the NBT value
      Parameters:
      notifier - The notifier instance
      valueId - The value id
      value - The value
    • setValue

      public static void setValue(IValueNotifier notifier, int valueId, int value)
      Set the int value
      Parameters:
      notifier - The notifier instance
      valueId - The value id
      value - The value
    • setValue

      public static void setValue(IValueNotifier notifier, int valueId, boolean value)
      Set the boolean value
      Parameters:
      notifier - The notifier instance
      valueId - The value id
      value - The value
    • setValue

      public static void setValue(IValueNotifier notifier, int valueId, String value)
      Set the string value
      Parameters:
      notifier - The notifier instance
      valueId - The value id
      value - The value
    • setValue

      public static void setValue(IValueNotifier notifier, int valueId, net.minecraft.network.chat.MutableComponent value)
      Set the MutableComponent value
      Parameters:
      notifier - The notifier instance
      valueId - The value id
      value - The value
    • setValue

      public static void setValue(IValueNotifier notifier, int valueId, List<net.minecraft.network.chat.MutableComponent> values)
      Set the MutableComponent list value
      Parameters:
      notifier - The notifier instance
      valueId - The value id
      values - The values
    • getValueNbt

      @Nullable public static net.minecraft.nbt.Tag getValueNbt(IValueNotifier notifier, int valueId)
      get the NBT value
      Parameters:
      notifier - The notifier instance
      valueId - The value id
      Returns:
      The value
    • getValueInt

      public static int getValueInt(IValueNotifier notifier, int valueId)
      get the int value
      Parameters:
      notifier - The notifier instance
      valueId - The value id
      Returns:
      The value
    • getValueBoolean

      public static boolean getValueBoolean(IValueNotifier notifier, int valueId)
      get the boolean value
      Parameters:
      notifier - The notifier instance
      valueId - The value id
      Returns:
      The value
    • getValueString

      @Nullable public static String getValueString(IValueNotifier notifier, int valueId)
      Get the string value
      Parameters:
      notifier - The notifier instance
      valueId - The value id
      Returns:
      The value
    • getValueTextComponent

      @Nullable public static net.minecraft.network.chat.MutableComponent getValueTextComponent(IValueNotifier notifier, int valueId)
      Get the MutableComponent value
      Parameters:
      notifier - The notifier instance
      valueId - The value id
      Returns:
      The value
    • getValueTextComponentList

      @Nullable public static List<net.minecraft.network.chat.MutableComponent> getValueTextComponentList(IValueNotifier notifier, int valueId)
      Get the MutableComponent list value
      Parameters:
      notifier - The notifier instance
      valueId - The value id
      Returns:
      The value