EmptyBlockGetter .java

net.minecraft.world.level.EmptyBlockGetter (enum): members: INSTANCE, getMinY, getBlockEntity, getBlockState, getHeight, getFluidState. imports: Fluids.

net.minecraft.world.levelenum39 linescommon874 B

Implements

API Surface (4)

BlockState getBlockState(final BlockPos pos)
FluidState getFluidState(final BlockPos pos)
int getMinY()
int getHeight()

Code Graph: Dependencies (7)

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

Full Source

EmptyBlockGetter.java39 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level;
2
3
import net.minecraft.core.BlockPos;
4
import net.minecraft.world.level.block.Blocks;
5
import net.minecraft.world.level.block.entity.BlockEntity;
6
import net.minecraft.world.level.block.state.BlockState;
7
import net.minecraft.world.level.material.FluidState;
8
import net.minecraft.world.level.material.Fluids;
9
import org.jspecify.annotations.Nullable;
10
11
public enum EmptyBlockGetter implements BlockGetter {
12
	INSTANCE;
13
14
	@Override
15
	public @Nullable BlockEntity getBlockEntity(final BlockPos pos) {
16
		return null;
17
	}
18
19
	@Override
20
	public BlockState getBlockState(final BlockPos pos) {
21
		return Blocks.AIR.defaultBlockState();
22
	}
23
24
	@Override
25
	public FluidState getFluidState(final BlockPos pos) {
26
		return Fluids.EMPTY.defaultFluidState();
27
	}
28
29
	@Override
30
	public int getMinY() {
31
		return 0;
32
	}
33
34
	@Override
35
	public int getHeight() {
36
		return 0;
37
	}
38
}
39

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