Class ValueTypeListProxyNbtValueListGeneric<N extends net.minecraft.nbt.Tag,T extends IValueType<V>,V extends IValue>

java.lang.Object
org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeListProxyBase<T,V>
org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeListProxyNbtValueListGeneric<N,T,V>
All Implemented Interfaces:
Iterable<V>, IValueTypeListProxy<T,V>
Direct Known Subclasses:
ValueTypeListProxyNbtValueListByte, ValueTypeListProxyNbtValueListInt, ValueTypeListProxyNbtValueListLong, ValueTypeListProxyNbtValueListTag

public abstract class ValueTypeListProxyNbtValueListGeneric<N extends net.minecraft.nbt.Tag,T extends IValueType<V>,V extends IValue> extends ValueTypeListProxyBase<T,V>
An abstraction for a list of NBT values of a certain type.
  • Constructor Details

    • ValueTypeListProxyNbtValueListGeneric

      public ValueTypeListProxyNbtValueListGeneric(net.minecraft.resources.ResourceLocation name, T valueType, String key, Optional<net.minecraft.nbt.Tag> tag)
  • Method Details

    • getKey

      public String getKey()
    • getTag

      public Optional<net.minecraft.nbt.CompoundTag> getTag()
    • getLength

      public int getLength() throws EvaluationException
      Returns:
      The list length
      Throws:
      EvaluationException - If something went wrong wile getting an element.
    • get

      public V get(int index) throws EvaluationException
      Description copied from interface: IValueTypeListProxy
      Get the element at the given index.
      Parameters:
      index - The index.
      Returns:
      The element at the given index.
      Throws:
      EvaluationException - If something went wrong wile getting an element.
    • getLength

      protected abstract int getLength(N tag)
    • get

      protected abstract V get(N tag, int index)