Added a color code to the memory card. (#3609)
Can be used to encode the stored content as a 4x2 grid of AEColors Currently used to indicate the P2P frequency.
This commit is contained in:
@@ -21,8 +21,6 @@ package appeng.util.helpers;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
|
||||
import appeng.api.util.AEColor;
|
||||
|
||||
|
||||
@@ -69,22 +67,4 @@ public class P2PHelper
|
||||
return String.format( "%04X", frequency );
|
||||
}
|
||||
|
||||
public String toColorHexDigit( AEColor color )
|
||||
{
|
||||
return TextFormatting.fromColorIndex( color.ordinal() ) + this.toHexDigit( color );
|
||||
}
|
||||
|
||||
public String toColorHexString( short frequency )
|
||||
{
|
||||
final AEColor[] colors = toColors( frequency );
|
||||
final StringBuilder builder = new StringBuilder();
|
||||
|
||||
for( AEColor aeColor : colors )
|
||||
{
|
||||
builder.append( this.toColorHexDigit( aeColor ) );
|
||||
}
|
||||
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user