Clear .java

net.minecraft.world.level.levelgen.structure.templatesystem.rule.blockentity.Clear (class): members: INSTANCE, apply, getType, CODEC. imports: CompoundTag.

net.minecraft.world.level.levelgen.structure.templatesystem.rule.blockentityclass22 linescommon679 B

Implements

API Surface (2)

CompoundTag apply(final RandomSource random, final @Nullable CompoundTag existingTag)
RuleBlockEntityModifierType<?> getType()

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

Clear.java22 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.levelgen.structure.templatesystem.rule.blockentity;
2
3
import com.mojang.serialization.MapCodec;
4
import net.minecraft.nbt.CompoundTag;
5
import net.minecraft.util.RandomSource;
6
import org.jspecify.annotations.Nullable;
7
8
public class Clear implements RuleBlockEntityModifier {
9
	private static final Clear INSTANCE = new Clear();
10
	public static final MapCodec<Clear> CODEC = MapCodec.unit(INSTANCE);
11
12
	@Override
13
	public CompoundTag apply(final RandomSource random, final @Nullable CompoundTag existingTag) {
14
		return new CompoundTag();
15
	}
16
17
	@Override
18
	public RuleBlockEntityModifierType<?> getType() {
19
		return RuleBlockEntityModifierType.CLEAR;
20
	}
21
}
22

Decompiled Minecraft 26.3 source of Clear (net/minecraft/world/level/levelgen/structure/templatesystem/rule/blockentity/Clear.java) with Mojang official mappings, stored verbatim on the site.