SolidPredicate .java

net.minecraft.world.level.levelgen.blockpredicates.SolidPredicate (class): members: test, type, CODEC. ann: @Deprecated. imports: Vec3i, MapCodec.

net.minecraft.world.level.levelgen.blockpredicatesclass26 linescommonextends StateTestingPredicate713 B

API Surface (2)

boolean test(final BlockState state)
BlockPredicateType<?> type()

Fields & Constants (1)

CODEC

Code Graph: Dependencies (4)

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

Full Source

SolidPredicate.java26 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.levelgen.blockpredicates;
2
3
import com.mojang.serialization.MapCodec;
4
import com.mojang.serialization.codecs.RecordCodecBuilder;
5
import net.minecraft.core.Vec3i;
6
import net.minecraft.world.level.block.state.BlockState;
7
8
@Deprecated
9
public class SolidPredicate extends StateTestingPredicate {
10
	public static final MapCodec<SolidPredicate> CODEC = RecordCodecBuilder.mapCodec(i -> stateTestingCodec(i).apply(i, SolidPredicate::new));
11
12
	public SolidPredicate(final Vec3i offset) {
13
		super(offset);
14
	}
15
16
	@Override
17
	protected boolean test(final BlockState state) {
18
		return state.isSolid();
19
	}
20
21
	@Override
22
	public BlockPredicateType<?> type() {
23
		return BlockPredicateType.SOLID;
24
	}
25
}
26

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