TransparentBlock .java

net.minecraft.world.level.block.TransparentBlock (class, 37 lines): members: getShadeBrightness, getVisualShape, propagatesSkylightDown. imports: Shapes.

net.minecraft.world.level.blockclass37 linescommonextends HalfTransparentBlock1.1 KB

API Surface (3)

VoxelShape getVisualShape(final BlockState state, final BlockGetter level, final BlockPos pos, final CollisionContext context)
float getShadeBrightness(final BlockState state, final BlockGetter level, final BlockPos pos)
boolean propagatesSkylightDown(final BlockState state)

Full Source

TransparentBlock.java37 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
/**
12
 * Access widened by fabric-transitive-access-wideners-v1 to accessible
13
 */
14
public class TransparentBlock extends HalfTransparentBlock {
15
	/**
16
	 * Access widened by fabric-transitive-access-wideners-v1 to accessible
17
	 */
18
	public TransparentBlock(final BlockBehaviour.Properties properties) {
19
		super(properties);
20
	}
21
22
	@Override
23
	protected VoxelShape getVisualShape(final BlockState state, final BlockGetter level, final BlockPos pos, final CollisionContext context) {
24
		return Shapes.empty();
25
	}
26
27
	@Override
28
	protected float getShadeBrightness(final BlockState state, final BlockGetter level, final BlockPos pos) {
29
		return 1.0F;
30
	}
31
32
	@Override
33
	protected boolean propagatesSkylightDown(final BlockState state) {
34
		return true;
35
	}
36
}
37

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