PiglinWallSkullBlock .java

net.minecraft.world.level.block.PiglinWallSkullBlock (class, 25 lines): extends WallSkullBlock. members: SHAPES, getShape. imports: Shapes.

net.minecraft.world.level.blockclass25 linescommonextends WallSkullBlock954 B

API Surface (1)

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

Fields & Constants (1)

SHAPES

Full Source

PiglinWallSkullBlock.java25 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.block;
2
3
import java.util.Map;
4
import net.minecraft.core.BlockPos;
5
import net.minecraft.core.Direction;
6
import net.minecraft.world.level.BlockGetter;
7
import net.minecraft.world.level.block.state.BlockBehaviour;
8
import net.minecraft.world.level.block.state.BlockState;
9
import net.minecraft.world.phys.shapes.CollisionContext;
10
import net.minecraft.world.phys.shapes.Shapes;
11
import net.minecraft.world.phys.shapes.VoxelShape;
12
13
public class PiglinWallSkullBlock extends WallSkullBlock {
14
	private static final Map<Direction, VoxelShape> SHAPES = Shapes.rotateHorizontal(Block.boxZ(10.0, 8.0, 8.0, 16.0));
15
16
	public PiglinWallSkullBlock(final BlockBehaviour.Properties properties) {
17
		super(SkullBlock.Types.PIGLIN, properties);
18
	}
19
20
	@Override
21
	protected VoxelShape getShape(final BlockState state, final BlockGetter level, final BlockPos pos, final CollisionContext context) {
22
		return SHAPES.get(state.getValue(FACING));
23
	}
24
}
25

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