Class WeightedEntry.Wrapper<T>

java.lang.Object
net.minecraft.util.random.WeightedEntry.Wrapper<T>
All Implemented Interfaces:
WeightedEntry
Enclosing interface:
WeightedEntry

public static class WeightedEntry.Wrapper<T> extends Object implements WeightedEntry
  • Field Details

    • data

      private final T data
    • weight

      private final Weight weight
  • Constructor Details

    • Wrapper

      Wrapper(T p_146302_, Weight p_146303_)
  • Method Details

    • getData

      public T getData()
    • getWeight

      public Weight getWeight()
      Specified by:
      getWeight in interface WeightedEntry
    • codec

      public static <E> com.mojang.serialization.Codec<WeightedEntry.Wrapper<E>> codec(com.mojang.serialization.Codec<E> p_146306_)