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(IValueNotifier notifier, int valueId) get the boolean valuestatic intgetValueInt(IValueNotifier notifier, int valueId) get the int valuestatic net.minecraft.nbt.TaggetValueNbt(IValueNotifier notifier, int valueId) get the NBT valuestatic StringgetValueString(IValueNotifier notifier, int valueId) Get the string valuestatic net.minecraft.network.chat.MutableComponentgetValueTextComponent(IValueNotifier notifier, int valueId) Get theMutableComponentvaluestatic List<net.minecraft.network.chat.MutableComponent> getValueTextComponentList(IValueNotifier notifier, int valueId) Get theMutableComponentlist valuestatic voidsetValue(IValueNotifier notifier, int valueId, boolean value) Set the boolean valuestatic voidsetValue(IValueNotifier notifier, int valueId, int value) Set the int valuestatic voidsetValue(IValueNotifier notifier, int valueId, String value) Set the string valuestatic voidsetValue(IValueNotifier notifier, int valueId, List<net.minecraft.network.chat.MutableComponent> values) Set theMutableComponentlist valuestatic voidsetValue(IValueNotifier notifier, int valueId, net.minecraft.nbt.Tag value) Set the NBT valuestatic voidsetValue(IValueNotifier notifier, int valueId, net.minecraft.network.chat.MutableComponent value) Set theMutableComponentvalue
-
Field Details
-
KEY
-
-
Constructor Details
-
ValueNotifierHelpers
public ValueNotifierHelpers()
-
-
Method Details
-
setValue
Set the NBT value- Parameters:
notifier- The notifier instancevalueId- The value idvalue- The value
-
setValue
Set the int value- Parameters:
notifier- The notifier instancevalueId- The value idvalue- The value
-
setValue
Set the boolean value- Parameters:
notifier- The notifier instancevalueId- The value idvalue- The value
-
setValue
Set the string value- Parameters:
notifier- The notifier instancevalueId- The value idvalue- The value
-
setValue
public static void setValue(IValueNotifier notifier, int valueId, net.minecraft.network.chat.MutableComponent value) Set theMutableComponentvalue- Parameters:
notifier- The notifier instancevalueId- The value idvalue- The value
-
setValue
public static void setValue(IValueNotifier notifier, int valueId, List<net.minecraft.network.chat.MutableComponent> values) Set theMutableComponentlist value- Parameters:
notifier- The notifier instancevalueId- The value idvalues- The values
-
getValueNbt
get the NBT value- Parameters:
notifier- The notifier instancevalueId- The value id- Returns:
- The value
-
getValueInt
get the int value- Parameters:
notifier- The notifier instancevalueId- The value id- Returns:
- The value
-
getValueBoolean
get the boolean value- Parameters:
notifier- The notifier instancevalueId- The value id- Returns:
- The value
-
getValueString
Get the string value- Parameters:
notifier- The notifier instancevalueId- The value id- Returns:
- The value
-
getValueTextComponent
@Nullable public static net.minecraft.network.chat.MutableComponent getValueTextComponent(IValueNotifier notifier, int valueId) Get theMutableComponentvalue- Parameters:
notifier- The notifier instancevalueId- The value id- Returns:
- The value
-
getValueTextComponentList
@Nullable public static List<net.minecraft.network.chat.MutableComponent> getValueTextComponentList(IValueNotifier notifier, int valueId) Get theMutableComponentlist value- Parameters:
notifier- The notifier instancevalueId- The value id- Returns:
- The value
-