AllOfPredicate .java

net.minecraft.world.level.levelgen.blockpredicates.AllOfPredicate (class, 30 lines): members: test, type, CODEC. imports: LevelAccessor.

net.minecraft.world.level.levelgen.blockpredicatesclass30 linescommonextends CombiningPredicate745 B

API Surface (2)

boolean test(final LevelAccessor level, final BlockPos origin)
BlockPredicateType<?> type()

Fields & Constants (1)

CODEC

Code Graph: Dependencies (5)

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

Full Source

AllOfPredicate.java30 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.levelgen.blockpredicates;
2
3
import com.mojang.serialization.MapCodec;
4
import java.util.List;
5
import net.minecraft.core.BlockPos;
6
import net.minecraft.world.level.LevelAccessor;
7
8
public class AllOfPredicate extends CombiningPredicate {
9
	public static final MapCodec<AllOfPredicate> CODEC = codec(AllOfPredicate::new);
10
11
	public AllOfPredicate(final List<BlockPredicate> predicates) {
12
		super(predicates);
13
	}
14
15
	public boolean test(final LevelAccessor level, final BlockPos origin) {
16
		for (BlockPredicate predicate : this.predicates) {
17
			if (!predicate.test(level, origin)) {
18
				return false;
19
			}
20
		}
21
22
		return true;
23
	}
24
25
	@Override
26
	public BlockPredicateType<?> type() {
27
		return BlockPredicateType.ALL_OF;
28
	}
29
}
30

Decompiled Minecraft 26.3 source of AllOfPredicate (net/minecraft/world/level/levelgen/blockpredicates/AllOfPredicate.java) with Mojang official mappings, stored verbatim on the site.