StructureVoidBlock .java

net.minecraft.world.level.block.StructureVoidBlock (class): members: getShadeBrightness, getRenderShape, SHAPE, getShape. imports: CollisionContext.

net.minecraft.world.level.blockclass38 linescommonextends Block1.1 KB

API Surface (3)

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

Fields & Constants (1)

SHAPE

Full Source

StructureVoidBlock.java38 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.VoxelShape;
9
10
/**
11
 * Access widened by fabric-transitive-access-wideners-v1 to accessible
12
 */
13
public class StructureVoidBlock extends Block {
14
	private static final VoxelShape SHAPE = Block.cube(6.0);
15
16
	/**
17
	 * Access widened by fabric-transitive-access-wideners-v1 to accessible
18
	 */
19
	public StructureVoidBlock(final BlockBehaviour.Properties properties) {
20
		super(properties);
21
	}
22
23
	@Override
24
	protected RenderShape getRenderShape(final BlockState state) {
25
		return RenderShape.INVISIBLE;
26
	}
27
28
	@Override
29
	protected VoxelShape getShape(final BlockState state, final BlockGetter level, final BlockPos pos, final CollisionContext context) {
30
		return SHAPE;
31
	}
32
33
	@Override
34
	protected float getShadeBrightness(final BlockState state, final BlockGetter level, final BlockPos pos) {
35
		return 1.0F;
36
	}
37
}
38

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