Package org.cyclops.cyclopscore.helper
Class ValueNotifierHelpers
java.lang.Object
org.cyclops.cyclopscore.helper.ValueNotifierHelpers
Helper methods for
IValueNotifiable
and
IValueNotifier
.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
getValueBoolean
(IValueNotifier notifier, int valueId) get the boolean valuestatic int
getValueInt
(IValueNotifier notifier, int valueId) get the int valuestatic net.minecraft.nbt.Tag
getValueNbt
(IValueNotifier notifier, int valueId) get the NBT valuestatic String
getValueString
(IValueNotifier notifier, int valueId) Get the string valuestatic net.minecraft.network.chat.MutableComponent
getValueTextComponent
(IValueNotifier notifier, int valueId) Get theMutableComponent
valuestatic List<net.minecraft.network.chat.MutableComponent>
getValueTextComponentList
(IValueNotifier notifier, int valueId) Get theMutableComponent
list valuestatic void
setValue
(IValueNotifier notifier, int valueId, boolean value) Set the boolean valuestatic void
setValue
(IValueNotifier notifier, int valueId, int value) Set the int valuestatic void
setValue
(IValueNotifier notifier, int valueId, String value) Set the string valuestatic void
setValue
(IValueNotifier notifier, int valueId, List<net.minecraft.network.chat.MutableComponent> values) Set theMutableComponent
list valuestatic void
setValue
(IValueNotifier notifier, int valueId, net.minecraft.nbt.Tag value) Set the NBT valuestatic void
setValue
(IValueNotifier notifier, int valueId, net.minecraft.network.chat.MutableComponent value) Set theMutableComponent
value
-
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 theMutableComponent
value- 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 theMutableComponent
list 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 theMutableComponent
value- 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 theMutableComponent
list value- Parameters:
notifier
- The notifier instancevalueId
- The value id- Returns:
- The value
-