CommonLevelAccessor .java

net.minecraft.world.level.CommonLevelAccessor (interface): members: getHeightmapPos, isUnobstructed, getEntityCollisions, getBlockEntity. imports: AABB.

net.minecraft.world.levelinterface35 linescommonextends LevelReader1.2 KB

API Surface (0)

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

Full Source

CommonLevelAccessor.java35 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level;
2
3
import java.util.List;
4
import java.util.Optional;
5
import net.minecraft.core.BlockPos;
6
import net.minecraft.world.entity.Entity;
7
import net.minecraft.world.level.block.entity.BlockEntity;
8
import net.minecraft.world.level.block.entity.BlockEntityType;
9
import net.minecraft.world.level.levelgen.Heightmap;
10
import net.minecraft.world.phys.AABB;
11
import net.minecraft.world.phys.shapes.VoxelShape;
12
import org.jspecify.annotations.Nullable;
13
14
public interface CommonLevelAccessor extends LevelReader, LevelSimulatedRW, EntityGetter {
15
	@Override
16
	default <T extends BlockEntity> Optional<T> getBlockEntity(final BlockPos pos, final BlockEntityType<T> type) {
17
		return LevelReader.super.getBlockEntity(pos, type);
18
	}
19
20
	@Override
21
	default List<VoxelShape> getEntityCollisions(final @Nullable Entity source, final AABB testArea) {
22
		return EntityGetter.super.getEntityCollisions(source, testArea);
23
	}
24
25
	@Override
26
	default boolean isUnobstructed(final @Nullable Entity source, final VoxelShape shape) {
27
		return EntityGetter.super.isUnobstructed(source, shape);
28
	}
29
30
	@Override
31
	default BlockPos getHeightmapPos(final Heightmap.Types type, final BlockPos pos) {
32
		return LevelReader.super.getHeightmapPos(type, pos);
33
	}
34
}
35

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