use of mcjty.rftoolscontrol.api.parameters.BlockSide in project RFToolsControl by McJty.
the class SideEditor method writeConstantValue.
@Override
protected void writeConstantValue(ParameterValue value) {
if (value == null || value.getValue() == null) {
nameLabel.setText("");
label.setChoice("*");
} else {
BlockSide side = (BlockSide) value.getValue();
nameLabel.setText(side.getNodeName() == null ? "" : side.getNodeName());
String choice = StringUtils.capitalize(side.toString());
label.setChoice(choice);
}
}
use of mcjty.rftoolscontrol.api.parameters.BlockSide in project RFToolsControl by McJty.
the class InventoryTools method blockSideFromString.
@Nullable
public static BlockSide blockSideFromString(String s) {
if (s == null) {
return null;
}
if (s.isEmpty()) {
return null;
}
EnumFacing side = getSideFromChar(s.charAt(s.length() - 1));
int indexOf = s.lastIndexOf(' ');
if (indexOf <= 0) {
return new BlockSide(null, side);
}
return new BlockSide(s.substring(0, indexOf), side);
}
Aggregations