Code/net/minecraft/world/level/block/state/properties/RailShape.java

40 lines
1000 B
Java
Raw Normal View History

2025-07-01 06:20:03 +00:00
package net.minecraft.world.level.block.state.properties;
import net.minecraft.util.StringRepresentable;
public enum RailShape implements StringRepresentable {
NORTH_SOUTH("north_south"),
EAST_WEST("east_west"),
ASCENDING_EAST("ascending_east"),
ASCENDING_WEST("ascending_west"),
ASCENDING_NORTH("ascending_north"),
ASCENDING_SOUTH("ascending_south"),
SOUTH_EAST("south_east"),
SOUTH_WEST("south_west"),
NORTH_WEST("north_west"),
NORTH_EAST("north_east");
private final String name;
private RailShape(final String p_61743_) {
this.name = p_61743_;
}
public String getName() {
return this.name;
}
@Override
public String toString() {
return this.name;
}
public boolean isSlope() {
return this == ASCENDING_NORTH || this == ASCENDING_EAST || this == ASCENDING_SOUTH || this == ASCENDING_WEST;
}
@Override
public String getSerializedName() {
return this.name;
}
}