TrueBlockPredicate .java

net.minecraft.world.level.levelgen.blockpredicates.TrueBlockPredicate (class, 23 lines): members: INSTANCE, test, type, CODEC. imports: LevelAccessor.

net.minecraft.world.level.levelgen.blockpredicatesclass23 linescommon632 B

Implements

API Surface (2)

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

Fields & Constants (2)

INSTANCE
CODEC

Code Graph: Dependencies (4)

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

Full Source

TrueBlockPredicate.java23 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.levelgen.blockpredicates;
2
3
import com.mojang.serialization.MapCodec;
4
import net.minecraft.core.BlockPos;
5
import net.minecraft.world.level.LevelAccessor;
6
7
public class TrueBlockPredicate implements BlockPredicate {
8
	public static final TrueBlockPredicate INSTANCE = new TrueBlockPredicate();
9
	public static final MapCodec<TrueBlockPredicate> CODEC = MapCodec.unit(() -> INSTANCE);
10
11
	private TrueBlockPredicate() {
12
	}
13
14
	public boolean test(final LevelAccessor level, final BlockPos origin) {
15
		return true;
16
	}
17
18
	@Override
19
	public BlockPredicateType<?> type() {
20
		return BlockPredicateType.TRUE;
21
	}
22
}
23

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