ComposableEntryContainer .java

net.minecraft.world.level.storage.loot.entries.ComposableEntryContainer (interface): members: ALWAYS_FALSE, ALWAYS_TRUE, expand. ann: @FunctionalInterface.

net.minecraft.world.level.storage.loot.entriesinterface24 linescommon880 B

API Surface (0)

No public/protected methods detected (fields or constants only).

Fields & Constants (2)

ALWAYS_FALSE
ALWAYS_TRUE

Code Graph: Dependencies (2)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

ComposableEntryContainer.java24 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.storage.loot.entries;
2
3
import java.util.Objects;
4
import java.util.function.Consumer;
5
import net.minecraft.world.level.storage.loot.LootContext;
6
7
@FunctionalInterface
8
public interface ComposableEntryContainer {
9
	ComposableEntryContainer ALWAYS_FALSE = (context, output) -> false;
10
	ComposableEntryContainer ALWAYS_TRUE = (context, output) -> true;
11
12
	boolean expand(final LootContext context, final Consumer<LootPoolEntry> output);
13
14
	default ComposableEntryContainer and(final ComposableEntryContainer other) {
15
		Objects.requireNonNull(other);
16
		return (context, output) -> this.expand(context, output) && other.expand(context, output);
17
	}
18
19
	default ComposableEntryContainer or(final ComposableEntryContainer other) {
20
		Objects.requireNonNull(other);
21
		return (context, output) -> this.expand(context, output) || other.expand(context, output);
22
	}
23
}
24

Decompiled Minecraft 26.3 source of ComposableEntryContainer (net/minecraft/world/level/storage/loot/entries/ComposableEntryContainer.java) with Mojang official mappings, stored verbatim on the site.