Class IntAttached<V>

java.lang.Object
net.createmod.catnip.utility.Pair<Integer,V>
net.createmod.catnip.utility.IntAttached<V>

public class IntAttached<V> extends Pair<Integer,V>
  • Constructor Details

    • IntAttached

      protected IntAttached(Integer first, V second)
  • Method Details

    • with

      public static <V> IntAttached<V> with(int number, V value)
    • withZero

      public static <V> IntAttached<V> withZero(V value)
    • isZero

      public boolean isZero()
    • exceeds

      public boolean exceeds(int value)
    • isOrBelowZero

      public boolean isOrBelowZero()
    • increment

      public void increment()
    • decrement

      public void decrement()
    • getValue

      public V getValue()
    • serializeNBT

      public net.minecraft.nbt.CompoundTag serializeNBT(Function<V,net.minecraft.nbt.CompoundTag> serializer)
    • comparator

      public static Comparator<? super IntAttached<?>> comparator()
    • read

      public static <T> IntAttached<T> read(net.minecraft.nbt.CompoundTag nbt, Function<net.minecraft.nbt.CompoundTag,T> deserializer)
    • streamCodec

      public static <B extends io.netty.buffer.ByteBuf, T> net.minecraft.network.codec.StreamCodec<B,IntAttached<T>> streamCodec(net.minecraft.network.codec.StreamCodec<? super B,T> codec)