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

33 lines
803 B
Java
Raw Permalink Normal View History

2025-07-01 06:20:03 +00:00
package net.minecraft.world.level.block.state.properties;
import net.minecraft.core.Direction;
import net.minecraft.util.StringRepresentable;
public enum DoubleBlockHalf implements StringRepresentable {
UPPER(Direction.DOWN),
LOWER(Direction.UP);
private final Direction directionToOther;
private DoubleBlockHalf(final Direction p_312507_) {
this.directionToOther = p_312507_;
}
public Direction getDirectionToOther() {
return this.directionToOther;
}
@Override
public String toString() {
return this.getSerializedName();
}
@Override
public String getSerializedName() {
return this == UPPER ? "upper" : "lower";
}
public DoubleBlockHalf getOtherHalf() {
return this == UPPER ? LOWER : UPPER;
}
}