AirBlock .java

net.minecraft.world.level.block.AirBlock (class, 26 lines): extends Block. members: getRenderShape, getShape. imports: Shapes.

net.minecraft.world.level.blockclass26 linescommonextends Block810 B

API Surface (2)

RenderShape getRenderShape(final BlockState state)
VoxelShape getShape(final BlockState state, final BlockGetter level, final BlockPos pos, final CollisionContext context)

Full Source

AirBlock.java26 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.block;
2
3
import net.minecraft.core.BlockPos;
4
import net.minecraft.world.level.BlockGetter;
5
import net.minecraft.world.level.block.state.BlockBehaviour;
6
import net.minecraft.world.level.block.state.BlockState;
7
import net.minecraft.world.phys.shapes.CollisionContext;
8
import net.minecraft.world.phys.shapes.Shapes;
9
import net.minecraft.world.phys.shapes.VoxelShape;
10
11
public class AirBlock extends Block {
12
	public AirBlock(final BlockBehaviour.Properties properties) {
13
		super(properties);
14
	}
15
16
	@Override
17
	protected RenderShape getRenderShape(final BlockState state) {
18
		return RenderShape.INVISIBLE;
19
	}
20
21
	@Override
22
	protected VoxelShape getShape(final BlockState state, final BlockGetter level, final BlockPos pos, final CollisionContext context) {
23
		return Shapes.empty();
24
	}
25
}
26

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