Package org.cyclops.cyclopscore.helper
Class ValueNotifierHelpers
java.lang.Object
org.cyclops.cyclopscore.helper.ValueNotifierHelpers
Helper methods for
IValueNotifiable and
IValueNotifier.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleangetValueBoolean(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId) get the boolean valuestatic intgetValueInt(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId) get the int valuestatic net.minecraft.nbt.TaggetValueNbt(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId) get the NBT valuestatic StringgetValueString(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId) Get the string valuestatic net.minecraft.network.chat.ComponentgetValueTextComponent(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId) Get theComponentvaluestatic List<net.minecraft.network.chat.Component> getValueTextComponentList(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId) Get theComponentlist valuestatic voidsetValue(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId, boolean value) Set the boolean valuestatic voidsetValue(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId, int value) Set the int valuestatic voidSet the string valuestatic voidsetValue(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId, List<net.minecraft.network.chat.Component> values) Set theMutableComponentlist valuestatic voidsetValue(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId, net.minecraft.nbt.Tag value) Set the NBT valuestatic voidsetValue(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId, net.minecraft.network.chat.Component value) Set theComponentvalue
-
Field Details
-
KEY
-
-
Constructor Details
-
ValueNotifierHelpers
public ValueNotifierHelpers()
-
-
Method Details
-
setValue
public static void setValue(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId, net.minecraft.nbt.Tag value) Set the NBT value- Parameters:
notifier- The notifier instancevalueId- The value idvalue- The value
-
setValue
public static void setValue(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId, int value) Set the int value- Parameters:
notifier- The notifier instancevalueId- The value idvalue- The value
-
setValue
public static void setValue(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId, boolean value) Set the boolean value- Parameters:
notifier- The notifier instancevalueId- The value idvalue- The value
-
setValue
public static void setValue(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId, String value) Set the string value- Parameters:
notifier- The notifier instancevalueId- The value idvalue- The value
-
setValue
public static void setValue(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId, net.minecraft.network.chat.Component value) Set theComponentvalue- Parameters:
notifier- The notifier instancevalueId- The value idvalue- The value
-
setValue
public static void setValue(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId, List<net.minecraft.network.chat.Component> values) Set theMutableComponentlist value- Parameters:
notifier- The notifier instancevalueId- The value idvalues- The values
-
getValueNbt
@Nullable public static net.minecraft.nbt.Tag getValueNbt(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId) get the NBT value- Parameters:
notifier- The notifier instancevalueId- The value id- Returns:
- The value
-
getValueInt
public static int getValueInt(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId) get the int value- Parameters:
notifier- The notifier instancevalueId- The value id- Returns:
- The value
-
getValueBoolean
public static boolean getValueBoolean(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId) get the boolean value- Parameters:
notifier- The notifier instancevalueId- The value id- Returns:
- The value
-
getValueString
@Nullable public static String getValueString(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId) Get the string value- Parameters:
notifier- The notifier instancevalueId- The value id- Returns:
- The value
-
getValueTextComponent
@Nullable public static net.minecraft.network.chat.Component getValueTextComponent(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId) Get theComponentvalue- Parameters:
notifier- The notifier instancevalueId- The value id- Returns:
- The value
-
getValueTextComponentList
@Nullable public static List<net.minecraft.network.chat.Component> getValueTextComponentList(org.cyclops.cyclopscore.inventory.IValueNotifier notifier, int valueId) Get theComponentlist value- Parameters:
notifier- The notifier instancevalueId- The value id- Returns:
- The value
-