LevelWriter .java

net.minecraft.world.level.LevelWriter (interface): members: setBlockAndUpdate, addFreshEntity, removeBlock, destroyBlock, setBlock. imports: Block.

net.minecraft.world.levelinterface36 linescommon1.2 KB

API Surface (0)

No public/protected methods detected (fields or constants only).

Code Graph: Dependencies (4)

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

Full Source

LevelWriter.java36 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level;
2
3
import net.minecraft.core.BlockPos;
4
import net.minecraft.world.entity.Entity;
5
import net.minecraft.world.level.block.Block;
6
import net.minecraft.world.level.block.state.BlockState;
7
import org.jspecify.annotations.Nullable;
8
9
public interface LevelWriter {
10
	boolean setBlock(BlockPos pos, BlockState blockState, @Block.UpdateFlags int updateFlags, int updateLimit);
11
12
	default boolean setBlockAndUpdate(final BlockPos pos, final BlockState blockState) {
13
		return this.setBlock(pos, blockState, 3);
14
	}
15
16
	default boolean setBlock(final BlockPos pos, final BlockState blockState, final @Block.UpdateFlags int updateFlags) {
17
		return this.setBlock(pos, blockState, updateFlags, 512);
18
	}
19
20
	boolean removeBlock(BlockPos pos, boolean movedByPiston);
21
22
	default boolean destroyBlock(final BlockPos pos, final boolean dropResources) {
23
		return this.destroyBlock(pos, dropResources, null);
24
	}
25
26
	default boolean destroyBlock(final BlockPos pos, final boolean dropResources, final @Nullable Entity breaker) {
27
		return this.destroyBlock(pos, dropResources, breaker, 512);
28
	}
29
30
	boolean destroyBlock(BlockPos pos, boolean dropResources, @Nullable Entity breaker, int updateLimit);
31
32
	default boolean addFreshEntity(final Entity entity) {
33
		return false;
34
	}
35
}
36

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