Class RecyclingOutputs
java.lang.Object
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<RecyclingOutput>,Collection<RecyclingOutput>,Deque<RecyclingOutput>,List<RecyclingOutput>,Queue<RecyclingOutput>,SequencedCollection<RecyclingOutput>
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleFactor by which the expected amounts of allRecyclingOutputs are multiplied whenactually determining the output.static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, RecyclingOutputs> Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionRecyclingOutputs(Collection<RecyclingOutput> outputs) RecyclingOutputs(net.minecraft.world.item.ItemStack stack) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int index, RecyclingOutput output) booleanadd(RecyclingOutput newOutput) booleanaddAll(Collection<? extends RecyclingOutput> collection) addOther(RecyclingOutputs outputs) copy()static final RecyclingOutputsempty()booleandoublemultiplyAll(double factor) List<net.minecraft.world.item.ItemStack> rollStacks(net.minecraft.util.RandomSource randomSource) voidsplitAll(double proportion, Consumer<RecyclingOutput> modification) Splits every existingRecyclingOutputinto two.voidsplitAll(double proportion, Consumer<RecyclingOutput> modification, Consumer<RecyclingOutput> remainderModification) Splits every existingRecyclingOutputinto two.Methods inherited from class java.util.LinkedList
addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, reversed, set, size, spliterator, toArray, toArrayMethods inherited from class java.util.AbstractSequentialList
iteratorMethods inherited from class java.util.AbstractList
hashCode, listIterator, removeRange, subListMethods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
containsAll, hashCode, isEmpty, iterator, listIterator, removeAll, replaceAll, retainAll, sort, subList
-
Field Details
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,RecyclingOutputs> STREAM_CODEC -
expectationMultiplier
public double expectationMultiplierFactor by which the expected amounts of allRecyclingOutputs are multiplied whenactually determining the output. Change this to avoid having to iterate over every single individual output.
-
-
Constructor Details
-
RecyclingOutputs
public RecyclingOutputs(net.minecraft.world.item.ItemStack stack) -
RecyclingOutputs
-
-
Method Details
-
empty
-
getExpectationMultiplier
public double getExpectationMultiplier() -
add
- Specified by:
addin interfaceList<RecyclingOutput>- Overrides:
addin classLinkedList<RecyclingOutput>
-
add
- Specified by:
addin interfaceCollection<RecyclingOutput>- Specified by:
addin interfaceDeque<RecyclingOutput>- Specified by:
addin interfaceList<RecyclingOutput>- Specified by:
addin interfaceQueue<RecyclingOutput>- Overrides:
addin classLinkedList<RecyclingOutput>
-
addOther
-
addAll
- Specified by:
addAllin interfaceCollection<RecyclingOutput>- Specified by:
addAllin interfaceDeque<RecyclingOutput>- Specified by:
addAllin interfaceList<RecyclingOutput>- Overrides:
addAllin classLinkedList<RecyclingOutput>
-
multiplyAll
-
splitAll
Splits every existingRecyclingOutputinto two.- Parameters:
proportion- The proportion of each Output to be modifiedmodification- The modification to apply to that proportion of the Output
-
splitAll
public void splitAll(double proportion, Consumer<RecyclingOutput> modification, Consumer<RecyclingOutput> remainderModification) Splits every existingRecyclingOutputinto two.- Parameters:
proportion- The proportion of each Output to be modifiedmodification- The modification to apply to that proportion of the OutputremainderModification- The modification to apply to the remainder of the Output
-
rollStacks
public List<net.minecraft.world.item.ItemStack> rollStacks(net.minecraft.util.RandomSource randomSource) -
copy
-
equals
- Specified by:
equalsin interfaceCollection<RecyclingOutput>- Specified by:
equalsin interfaceList<RecyclingOutput>- Overrides:
equalsin classAbstractList<RecyclingOutput>
-