pick 97420a31d The big reformat of 2020

This commit is contained in:
yueh
2020-06-16 21:41:28 +02:00
parent 5304b3febe
commit 5225ea426b
2252 changed files with 95466 additions and 118582 deletions
@@ -18,58 +18,52 @@
package appeng.block.storage;
import net.minecraft.util.IStringSerializable;
/**
* Describes the different states a single slot of a BlockDrive can be in in terms of rendering.
* Describes the different states a single slot of a BlockDrive can be in in
* terms of rendering.
*/
public enum DriveSlotState implements IStringSerializable
{
public enum DriveSlotState implements IStringSerializable {
// No cell in slot
EMPTY( "empty" ),
// No cell in slot
EMPTY("empty"),
// Cell in slot, but unpowered
OFFLINE( "offline" ),
// Cell in slot, but unpowered
OFFLINE("offline"),
// Online and free space
ONLINE( "online" ),
// Online and free space
ONLINE("online"),
// Types full, space left
TYPES_FULL( "types_full" ),
// Types full, space left
TYPES_FULL("types_full"),
// Completely full
FULL( "full" );
// Completely full
FULL("full");
private final String name;
private final String name;
DriveSlotState( String name )
{
this.name = name;
}
DriveSlotState(String name) {
this.name = name;
}
@Override
public String getName()
{
return this.name;
}
@Override
public String getName() {
return this.name;
}
public static DriveSlotState fromCellStatus( int cellStatus )
{
switch( cellStatus )
{
default:
case 0:
return DriveSlotState.EMPTY;
case 1:
return DriveSlotState.ONLINE;
case 2:
return DriveSlotState.TYPES_FULL;
case 3:
return DriveSlotState.FULL;
}
}
public static DriveSlotState fromCellStatus(int cellStatus) {
switch (cellStatus) {
default:
case 0:
return DriveSlotState.EMPTY;
case 1:
return DriveSlotState.ONLINE;
case 2:
return DriveSlotState.TYPES_FULL;
case 3:
return DriveSlotState.FULL;
}
}
}