DoubleBlockHalf .java

net.minecraft.world.level.block.state.properties.DoubleBlockHalf (enum): members: UPPER, LOWER, getDirectionToOther, directionToOther, getOtherHalf.

net.minecraft.world.level.block.state.propertiesenum34 linescommon735 B

Implements

API Surface (4)

Direction getDirectionToOther()
String toString()
String getSerializedName()
DoubleBlockHalf getOtherHalf()

Fields & Constants (1)

directionToOther

String literals (2)

"upper"
"lower"

Code Graph: Dependencies (2)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

DoubleBlockHalf.java34 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.block.state.properties;
2
3
import net.minecraft.core.Direction;
4
import net.minecraft.util.StringRepresentable;
5
6
public enum DoubleBlockHalf implements StringRepresentable {
7
	UPPER(Direction.DOWN),
8
	LOWER(Direction.UP);
9
10
	private final Direction directionToOther;
11
12
	DoubleBlockHalf(final Direction directionToOther) {
13
		this.directionToOther = directionToOther;
14
	}
15
16
	public Direction getDirectionToOther() {
17
		return this.directionToOther;
18
	}
19
20
	@Override
21
	public String toString() {
22
		return this.getSerializedName();
23
	}
24
25
	@Override
26
	public String getSerializedName() {
27
		return this == UPPER ? "upper" : "lower";
28
	}
29
30
	public DoubleBlockHalf getOtherHalf() {
31
		return this == UPPER ? LOWER : UPPER;
32
	}
33
}
34

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