File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed
paper-server/patches/sources/net/minecraft/util/random Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change 1616 this.items = List.copyOf(items);
1717 this.totalWeight = WeightedRandom.getTotalWeight(items, Weighted::weight);
1818 if (this.totalWeight == 0) {
19- @@ -38,15 +_,15 @@
20- return new WeightedList<>(List.of());
21- }
22-
23- - public static <E> WeightedList<E> of(E element) {
24- - return new WeightedList<>(List.of(new Weighted<>(element, 1)));
25- - }
26- -
27- @SafeVarargs
28- public static <E> WeightedList<E> of(Weighted<E>... items) {
29- return new WeightedList<>(List.of(items));
30- }
31-
32- + public static <E> WeightedList<E> of(E element) {
33- + return new WeightedList<>(List.of(new Weighted<>(element, 1)));
34- + }
35- +
36- public static <E> WeightedList<E> of(List<Weighted<E>> items) {
37- return new WeightedList<>(items);
38- }
3919@@ -128,7 +_,7 @@
4020 }
4121
You can’t perform that action at this time.
0 commit comments