RailShape .java

net.minecraft.world.level.block.state.properties.RailShape (enum): members: NORTH_SOUTH, EAST_WEST, ASCENDING_EAST, ASCENDING_WEST, ASCENDING_NORTH, name.

net.minecraft.world.level.block.state.propertiesenum41 linescommon886 B

Implements

API Surface (4)

String getName()
String toString()
boolean isSlope()
String getSerializedName()

Fields & Constants (1)

name

String literals (10)

"north_south"
"east_west"
"ascending_east"
"ascending_west"
"ascending_north"
"ascending_south"
"south_east"
"south_west"
"north_west"
"north_east"

Code Graph: Dependencies (1)

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

Full Source

RailShape.java41 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.block.state.properties;
2
3
import net.minecraft.util.StringRepresentable;
4
5
public enum RailShape implements StringRepresentable {
6
	NORTH_SOUTH("north_south"),
7
	EAST_WEST("east_west"),
8
	ASCENDING_EAST("ascending_east"),
9
	ASCENDING_WEST("ascending_west"),
10
	ASCENDING_NORTH("ascending_north"),
11
	ASCENDING_SOUTH("ascending_south"),
12
	SOUTH_EAST("south_east"),
13
	SOUTH_WEST("south_west"),
14
	NORTH_WEST("north_west"),
15
	NORTH_EAST("north_east");
16
17
	private final String name;
18
19
	RailShape(final String name) {
20
		this.name = name;
21
	}
22
23
	public String getName() {
24
		return this.name;
25
	}
26
27
	@Override
28
	public String toString() {
29
		return this.name;
30
	}
31
32
	public boolean isSlope() {
33
		return this == ASCENDING_NORTH || this == ASCENDING_EAST || this == ASCENDING_SOUTH || this == ASCENDING_WEST;
34
	}
35
36
	@Override
37
	public String getSerializedName() {
38
		return this.name;
39
	}
40
}
41

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