public class IntAttached<V> extends Pair<java.lang.Integer,V>
| Modifier | Constructor and Description |
|---|---|
protected |
IntAttached(java.lang.Integer first,
V second) |
| Modifier and Type | Method and Description |
|---|---|
void |
decrement() |
boolean |
exceeds(int value) |
V |
getValue() |
void |
increment() |
boolean |
isOrBelowZero() |
boolean |
isZero() |
static <T> IntAttached<T> |
read(net.minecraft.nbt.CompoundNBT nbt,
java.util.function.Function<net.minecraft.nbt.CompoundNBT,T> deserializer) |
net.minecraft.nbt.CompoundNBT |
serializeNBT(java.util.function.Function<V,net.minecraft.nbt.CompoundNBT> serializer) |
static <V> IntAttached<V> |
with(int number,
V value) |
static <V> IntAttached<V> |
withZero(V value) |
protected IntAttached(java.lang.Integer first,
V second)
public static <V> IntAttached<V> with(int number, V value)
public static <V> IntAttached<V> withZero(V value)
public boolean isZero()
public boolean exceeds(int value)
public boolean isOrBelowZero()
public void increment()
public void decrement()
public V getValue()
public net.minecraft.nbt.CompoundNBT serializeNBT(java.util.function.Function<V,net.minecraft.nbt.CompoundNBT> serializer)
public static <T> IntAttached<T> read(net.minecraft.nbt.CompoundNBT nbt, java.util.function.Function<net.minecraft.nbt.CompoundNBT,T> deserializer)