Package net.minecraft.util.collection
Class WeightedList<U>
java.lang.Object
net.minecraft.util.collection.WeightedList<U>
public class WeightedList<U> extends Object
- Mappings:
Namespace Name official avr
intermediary net/minecraft/class_4131
named net/minecraft/util/collection/WeightedList
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WeightedList.Entry<T>
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description WeightedList()
private
WeightedList(List<WeightedList.Entry<U>> entries)
-
Method Summary
Modifier and Type Method Description WeightedList<U>
add(U item, int weight)
static <U> com.mojang.serialization.Codec<WeightedList<U>>
createCodec(com.mojang.serialization.Codec<U> codec)
boolean
isEmpty()
U
pickRandom(Random random)
WeightedList<U>
shuffle()
WeightedList<U>
shuffle(Random random)
Stream<U>
stream()
String
toString()
-
Field Details
-
entries
- Mappings:
Namespace Name Mixin selector official a
Lavr;a:Ljava/util/List;
intermediary field_18397
Lnet/minecraft/class_4131;field_18397:Ljava/util/List;
named entries
Lnet/minecraft/util/collection/WeightedList;entries:Ljava/util/List;
-
random
- Mappings:
Namespace Name Mixin selector official b
Lavr;b:Ljava/util/Random;
intermediary field_18398
Lnet/minecraft/class_4131;field_18398:Ljava/util/Random;
named random
Lnet/minecraft/util/collection/WeightedList;random:Ljava/util/Random;
-
-
Constructor Details
-
WeightedList
public WeightedList() -
WeightedList
- Mappings:
Namespace Name Mixin selector official <init>
Lavr;<init>(Ljava/util/List;)V
intermediary <init>
Lnet/minecraft/class_4131;<init>(Ljava/util/List;)V
named <init>
Lnet/minecraft/util/collection/WeightedList;<init>(Ljava/util/List;)V
-
-
Method Details
-
createCodec
public static <U> com.mojang.serialization.Codec<WeightedList<U>> createCodec(com.mojang.serialization.Codec<U> codec)- Mappings:
Namespace Name Mixin selector official a
Lavr;a(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
intermediary method_28338
Lnet/minecraft/class_4131;method_28338(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
named createCodec
Lnet/minecraft/util/collection/WeightedList;createCodec(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
-
add
- Mappings:
Namespace Name Mixin selector official a
Lavr;a(Ljava/lang/Object;I)Lavr;
intermediary method_19031
Lnet/minecraft/class_4131;method_19031(Ljava/lang/Object;I)Lnet/minecraft/class_4131;
named add
Lnet/minecraft/util/collection/WeightedList;add(Ljava/lang/Object;I)Lnet/minecraft/util/collection/WeightedList;
-
shuffle
- Mappings:
Namespace Name Mixin selector official a
Lavr;a()Lavr;
intermediary method_19029
Lnet/minecraft/class_4131;method_19029()Lnet/minecraft/class_4131;
named shuffle
Lnet/minecraft/util/collection/WeightedList;shuffle()Lnet/minecraft/util/collection/WeightedList;
-
shuffle
- Mappings:
Namespace Name Mixin selector official a
Lavr;a(Ljava/util/Random;)Lavr;
intermediary method_23333
Lnet/minecraft/class_4131;method_23333(Ljava/util/Random;)Lnet/minecraft/class_4131;
named shuffle
Lnet/minecraft/util/collection/WeightedList;shuffle(Ljava/util/Random;)Lnet/minecraft/util/collection/WeightedList;
-
isEmpty
public boolean isEmpty()- Mappings:
Namespace Name Mixin selector official b
Lavr;b()Z
intermediary method_28339
Lnet/minecraft/class_4131;method_28339()Z
named isEmpty
Lnet/minecraft/util/collection/WeightedList;isEmpty()Z
-
stream
- Mappings:
Namespace Name Mixin selector official c
Lavr;c()Ljava/util/stream/Stream;
intermediary method_19032
Lnet/minecraft/class_4131;method_19032()Ljava/util/stream/Stream;
named stream
Lnet/minecraft/util/collection/WeightedList;stream()Ljava/util/stream/Stream;
-
pickRandom
- Mappings:
Namespace Name Mixin selector official b
Lavr;b(Ljava/util/Random;)Ljava/lang/Object;
intermediary method_23337
Lnet/minecraft/class_4131;method_23337(Ljava/util/Random;)Ljava/lang/Object;
named pickRandom
Lnet/minecraft/util/collection/WeightedList;pickRandom(Ljava/util/Random;)Ljava/lang/Object;
-
toString
-