minecraft-src/net/minecraft/world/level/levelgen/structure/templatesystem/PosRuleTest.java
2025-07-04 01:41:11 +03:00

16 lines
622 B
Java

package net.minecraft.world.level.levelgen.structure.templatesystem;
import com.mojang.serialization.Codec;
import net.minecraft.core.BlockPos;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.util.RandomSource;
public abstract class PosRuleTest {
public static final Codec<PosRuleTest> CODEC = BuiltInRegistries.POS_RULE_TEST
.byNameCodec()
.dispatch("predicate_type", PosRuleTest::getType, PosRuleTestType::codec);
public abstract boolean test(BlockPos localPos, BlockPos relativePos, BlockPos structurePos, RandomSource random);
protected abstract PosRuleTestType<?> getType();
}