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,11 +18,9 @@
package appeng.core.worlddata;
import org.junit.Assert;
import org.junit.Test;
/**
* Tests for {@link MeteorDataNameEncoder}
*
@@ -30,34 +28,31 @@ import org.junit.Test;
* @version rv3 - 06.06.2015
* @since rv3 06.06.2015
*/
public class MeteorDataNameEncoderTest
{
private static final int WITHOUT_CHUNK_X = 0;
private static final int WITHOUT_CHUNK_Z = 13;
private static final String WITHOUT_EXPECTED = "-5_0_13.dat";
public class MeteorDataNameEncoderTest {
private static final int WITHOUT_CHUNK_X = 0;
private static final int WITHOUT_CHUNK_Z = 13;
private static final String WITHOUT_EXPECTED = "-5_0_13.dat";
private static final int WITH_CHUNK_X = 32;
private static final int WITH_CHUNK_Z = -64;
private static final String WITH_EXPECTED = "3_2_-4.dat";
private static final int WITH_CHUNK_X = 32;
private static final int WITH_CHUNK_Z = -64;
private static final String WITH_EXPECTED = "3_2_-4.dat";
private final MeteorDataNameEncoder encoderWithZeroShifting = new MeteorDataNameEncoder( 0 );
private final MeteorDataNameEncoder encoderWithFourShifting = new MeteorDataNameEncoder( 4 );
private final MeteorDataNameEncoder encoderWithZeroShifting = new MeteorDataNameEncoder(0);
private final MeteorDataNameEncoder encoderWithFourShifting = new MeteorDataNameEncoder(4);
@Test
public void testEncoderWithoutShifting()
{
final String expected = WITHOUT_EXPECTED;
final String actual = this.encoderWithZeroShifting.encode( WITHOUT_CHUNK_X, WITHOUT_CHUNK_Z );
@Test
public void testEncoderWithoutShifting() {
final String expected = WITHOUT_EXPECTED;
final String actual = this.encoderWithZeroShifting.encode(WITHOUT_CHUNK_X, WITHOUT_CHUNK_Z);
Assert.assertEquals( expected, actual );
}
Assert.assertEquals(expected, actual);
}
@Test
public void testEncoderWithShifting()
{
final String expected = WITH_EXPECTED;
final String actual = this.encoderWithFourShifting.encode( WITH_CHUNK_X, WITH_CHUNK_Z );
@Test
public void testEncoderWithShifting() {
final String expected = WITH_EXPECTED;
final String actual = this.encoderWithFourShifting.encode(WITH_CHUNK_X, WITH_CHUNK_Z);
Assert.assertEquals( expected, actual );
}
Assert.assertEquals(expected, actual);
}
}
@@ -1,12 +1,15 @@
package appeng.core.worlddata;
import appeng.spatial.SpatialDimensionExtraData;
import io.netty.buffer.Unpooled;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.math.BlockPos;
import static org.junit.Assert.*;
import org.junit.Test;
import static org.junit.Assert.*;
import io.netty.buffer.Unpooled;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.math.BlockPos;
import appeng.spatial.SpatialDimensionExtraData;
public class SpatialDimensionExtraDataTest {
@@ -1,12 +1,10 @@
package appeng.util;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
@@ -32,115 +30,102 @@ import org.junit.Test;
* @version rv2
* @since rv2
*/
public final class SlimReadableNumberConverterTest
{
private static final long NUMBER_NEG_999999 = -999999L;
private static final String RESULT_NEG_999999 = "-0M";
public final class SlimReadableNumberConverterTest {
private static final long NUMBER_NEG_999999 = -999999L;
private static final String RESULT_NEG_999999 = "-0M";
private static final long NUMBER_NEG_9999 = -9999L;
private static final String RESULT_NEG_9999 = "-9K";
private static final long NUMBER_NEG_9999 = -9999L;
private static final String RESULT_NEG_9999 = "-9K";
private static final long NUMBER_NEG_999 = -999L;
private static final String RESULT_NEG_999 = "-0K";
private static final long NUMBER_NEG_999 = -999L;
private static final String RESULT_NEG_999 = "-0K";
private static final long NUMBER_0 = 0L;
private static final String RESULT_0 = "0";
private static final long NUMBER_0 = 0L;
private static final String RESULT_0 = "0";
private static final long NUMBER_999 = 999L;
private static final String RESULT_999 = "999";
private static final long NUMBER_999 = 999L;
private static final String RESULT_999 = "999";
private static final long NUMBER_9999 = 9999L;
private static final String RESULT_9999 = "9K";
private static final long NUMBER_9999 = 9999L;
private static final String RESULT_9999 = "9K";
private static final long NUMBER_10000 = 10000L;
private static final String RESULT_10000 = "10K";
private static final long NUMBER_10000 = 10000L;
private static final String RESULT_10000 = "10K";
private static final long NUMBER_10500 = 10500L;
private static final String RESULT_10500 = "10K";
private static final long NUMBER_10500 = 10500L;
private static final String RESULT_10500 = "10K";
private static final long NUMBER_155555 = 155555L;
private static final String RESULT_155555 = ".1M";
private static final long NUMBER_155555 = 155555L;
private static final String RESULT_155555 = ".1M";
private static final long NUMBER_9999999 = 9999999L;
private static final String RESULT_9999999 = "9M";
private static final long NUMBER_9999999 = 9999999L;
private static final String RESULT_9999999 = "9M";
private static final long NUMBER_10000000 = 10000000L;
private static final String RESULT_10000000 = "10M";
private static final long NUMBER_10000000 = 10000000L;
private static final String RESULT_10000000 = "10M";
private static final long NUMBER_155555555 = 155555555L;
private static final String RESULT_155555555 = ".1G";
private static final long NUMBER_155555555 = 155555555L;
private static final String RESULT_155555555 = ".1G";
private final ISlimReadableNumberConverter converter = ReadableNumberConverter.INSTANCE;
private final ISlimReadableNumberConverter converter = ReadableNumberConverter.INSTANCE;
@Test( expected = AssertionError.class )
public void testConvertNeg999999()
{
assertEquals( RESULT_NEG_999999, this.converter.toSlimReadableForm( NUMBER_NEG_999999 ) );
}
@Test(expected = AssertionError.class)
public void testConvertNeg999999() {
assertEquals(RESULT_NEG_999999, this.converter.toSlimReadableForm(NUMBER_NEG_999999));
}
@Test( expected = AssertionError.class )
public void testConvertNeg9999()
{
assertEquals( RESULT_NEG_9999, this.converter.toSlimReadableForm( NUMBER_NEG_9999 ) );
}
@Test(expected = AssertionError.class)
public void testConvertNeg9999() {
assertEquals(RESULT_NEG_9999, this.converter.toSlimReadableForm(NUMBER_NEG_9999));
}
@Test( expected = AssertionError.class )
public void testConvertNeg999()
{
assertEquals( RESULT_NEG_999, this.converter.toSlimReadableForm( NUMBER_NEG_999 ) );
}
@Test(expected = AssertionError.class)
public void testConvertNeg999() {
assertEquals(RESULT_NEG_999, this.converter.toSlimReadableForm(NUMBER_NEG_999));
}
@Test
public void testConvert0()
{
assertEquals( RESULT_0, this.converter.toSlimReadableForm( NUMBER_0 ) );
}
@Test
public void testConvert0() {
assertEquals(RESULT_0, this.converter.toSlimReadableForm(NUMBER_0));
}
@Test
public void testConvert999()
{
assertEquals( RESULT_999, this.converter.toSlimReadableForm( NUMBER_999 ) );
}
@Test
public void testConvert999() {
assertEquals(RESULT_999, this.converter.toSlimReadableForm(NUMBER_999));
}
@Test
public void testConvert9999()
{
assertEquals( RESULT_9999, this.converter.toSlimReadableForm( NUMBER_9999 ) );
}
@Test
public void testConvert9999() {
assertEquals(RESULT_9999, this.converter.toSlimReadableForm(NUMBER_9999));
}
@Test
public void testConvert10000()
{
assertEquals( RESULT_10000, this.converter.toSlimReadableForm( NUMBER_10000 ) );
}
@Test
public void testConvert10000() {
assertEquals(RESULT_10000, this.converter.toSlimReadableForm(NUMBER_10000));
}
@Test
public void testConvert10500()
{
assertEquals( RESULT_10500, this.converter.toSlimReadableForm( NUMBER_10500 ) );
}
@Test
public void testConvert10500() {
assertEquals(RESULT_10500, this.converter.toSlimReadableForm(NUMBER_10500));
}
@Test
public void testConvert155555()
{
assertEquals( RESULT_155555, this.converter.toSlimReadableForm( NUMBER_155555 ) );
}
@Test
public void testConvert155555() {
assertEquals(RESULT_155555, this.converter.toSlimReadableForm(NUMBER_155555));
}
@Test
public void testConvert9999999()
{
assertEquals( RESULT_9999999, this.converter.toSlimReadableForm( NUMBER_9999999 ) );
}
@Test
public void testConvert9999999() {
assertEquals(RESULT_9999999, this.converter.toSlimReadableForm(NUMBER_9999999));
}
@Test
public void testConvert10000000()
{
assertEquals( RESULT_10000000, this.converter.toSlimReadableForm( NUMBER_10000000 ) );
}
@Test
public void testConvert10000000() {
assertEquals(RESULT_10000000, this.converter.toSlimReadableForm(NUMBER_10000000));
}
@Test
public void testConvert155555555()
{
assertEquals( RESULT_155555555, this.converter.toSlimReadableForm( NUMBER_155555555 ) );
}
@Test
public void testConvert155555555() {
assertEquals(RESULT_155555555, this.converter.toSlimReadableForm(NUMBER_155555555));
}
}
+20 -27
View File
@@ -18,44 +18,37 @@
package appeng.util;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
/**
* Tests for {@link UUIDMatcher}
*/
public final class UUIDMatcherTest
{
private static final String IS_UUID = "03ba29a1-d6bd-32ba-90b2-375e4d65abc9";
private static final String NO_UUID = "no";
private static final String INVALID_UUID = "g3ba29a1-d6bd-32ba-90b2-375e4d65abc9";
public final class UUIDMatcherTest {
private static final String IS_UUID = "03ba29a1-d6bd-32ba-90b2-375e4d65abc9";
private static final String NO_UUID = "no";
private static final String INVALID_UUID = "g3ba29a1-d6bd-32ba-90b2-375e4d65abc9";
private final UUIDMatcher matcher;
private final UUIDMatcher matcher;
public UUIDMatcherTest()
{
this.matcher = new UUIDMatcher();
}
public UUIDMatcherTest() {
this.matcher = new UUIDMatcher();
}
@Test
public void testUUID_shouldPass()
{
assertTrue( this.matcher.isUUID( IS_UUID ) );
}
@Test
public void testUUID_shouldPass() {
assertTrue(this.matcher.isUUID(IS_UUID));
}
@Test
public void testNoUUD_shouldPass()
{
assertFalse( this.matcher.isUUID( NO_UUID ) );
}
@Test
public void testNoUUD_shouldPass() {
assertFalse(this.matcher.isUUID(NO_UUID));
}
@Test
public void testInvalidUUID_shouldPass()
{
assertFalse( this.matcher.isUUID( INVALID_UUID ) );
}
@Test
public void testInvalidUUID_shouldPass() {
assertFalse(this.matcher.isUUID(INVALID_UUID));
}
}
@@ -18,12 +18,10 @@
package appeng.util;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
/**
* Test for {@link IWideReadableNumberConverter}
*
@@ -31,115 +29,102 @@ import org.junit.Test;
* @version rv2
* @since rv2
*/
public final class WideReadableNumberConverterTest
{
private static final long NUMBER_NEG_999999 = -999999L;
private static final String RESULT_NEG_999999 = "-0M";
public final class WideReadableNumberConverterTest {
private static final long NUMBER_NEG_999999 = -999999L;
private static final String RESULT_NEG_999999 = "-0M";
private static final long NUMBER_NEG_9999 = -9999L;
private static final String RESULT_NEG_9999 = "-9K";
private static final long NUMBER_NEG_9999 = -9999L;
private static final String RESULT_NEG_9999 = "-9K";
private static final long NUMBER_NEG_999 = -999L;
private static final String RESULT_NEG_999 = "-999";
private static final long NUMBER_NEG_999 = -999L;
private static final String RESULT_NEG_999 = "-999";
private static final long NUMBER_0 = 0L;
private static final String RESULT_0 = "0";
private static final long NUMBER_0 = 0L;
private static final String RESULT_0 = "0";
private static final long NUMBER_999 = 999L;
private static final String RESULT_999 = "999";
private static final long NUMBER_999 = 999L;
private static final String RESULT_999 = "999";
private static final long NUMBER_9999 = 9999L;
private static final String RESULT_9999 = "9999";
private static final long NUMBER_9999 = 9999L;
private static final String RESULT_9999 = "9999";
private static final long NUMBER_10000 = 10000L;
private static final String RESULT_10000 = "10K";
private static final long NUMBER_10000 = 10000L;
private static final String RESULT_10000 = "10K";
private static final long NUMBER_10500 = 10500L;
private static final String RESULT_10500 = "10K";
private static final long NUMBER_10500 = 10500L;
private static final String RESULT_10500 = "10K";
private static final long NUMBER_155555 = 155555L;
private static final String RESULT_155555 = "155K";
private static final long NUMBER_155555 = 155555L;
private static final String RESULT_155555 = "155K";
private static final long NUMBER_9999999 = 9999999L;
private static final String RESULT_9999999 = "9.9M";
private static final long NUMBER_9999999 = 9999999L;
private static final String RESULT_9999999 = "9.9M";
private static final long NUMBER_10000000 = 10000000L;
private static final String RESULT_10000000 = "10M";
private static final long NUMBER_10000000 = 10000000L;
private static final String RESULT_10000000 = "10M";
private static final long NUMBER_155555555 = 155555555L;
private static final String RESULT_155555555 = "155M";
private static final long NUMBER_155555555 = 155555555L;
private static final String RESULT_155555555 = "155M";
private final IWideReadableNumberConverter converter = ReadableNumberConverter.INSTANCE;
private final IWideReadableNumberConverter converter = ReadableNumberConverter.INSTANCE;
@Test( expected = AssertionError.class )
public void testConvertNeg999999()
{
assertEquals( RESULT_NEG_999999, this.converter.toWideReadableForm( NUMBER_NEG_999999 ) );
}
@Test(expected = AssertionError.class)
public void testConvertNeg999999() {
assertEquals(RESULT_NEG_999999, this.converter.toWideReadableForm(NUMBER_NEG_999999));
}
@Test( expected = AssertionError.class )
public void testConvertNeg9999()
{
assertEquals( RESULT_NEG_9999, this.converter.toWideReadableForm( NUMBER_NEG_9999 ) );
}
@Test(expected = AssertionError.class)
public void testConvertNeg9999() {
assertEquals(RESULT_NEG_9999, this.converter.toWideReadableForm(NUMBER_NEG_9999));
}
@Test( expected = AssertionError.class )
public void testConvertNeg999()
{
assertEquals( RESULT_NEG_999, this.converter.toWideReadableForm( NUMBER_NEG_999 ) );
}
@Test(expected = AssertionError.class)
public void testConvertNeg999() {
assertEquals(RESULT_NEG_999, this.converter.toWideReadableForm(NUMBER_NEG_999));
}
@Test
public void testConvert0()
{
assertEquals( RESULT_0, this.converter.toWideReadableForm( NUMBER_0 ) );
}
@Test
public void testConvert0() {
assertEquals(RESULT_0, this.converter.toWideReadableForm(NUMBER_0));
}
@Test
public void testConvert999()
{
assertEquals( RESULT_999, this.converter.toWideReadableForm( NUMBER_999 ) );
}
@Test
public void testConvert999() {
assertEquals(RESULT_999, this.converter.toWideReadableForm(NUMBER_999));
}
@Test
public void testConvert9999()
{
assertEquals( RESULT_9999, this.converter.toWideReadableForm( NUMBER_9999 ) );
}
@Test
public void testConvert9999() {
assertEquals(RESULT_9999, this.converter.toWideReadableForm(NUMBER_9999));
}
@Test
public void testConvert10000()
{
assertEquals( RESULT_10000, this.converter.toWideReadableForm( NUMBER_10000 ) );
}
@Test
public void testConvert10000() {
assertEquals(RESULT_10000, this.converter.toWideReadableForm(NUMBER_10000));
}
@Test
public void testConvert10500()
{
assertEquals( RESULT_10500, this.converter.toWideReadableForm( NUMBER_10500 ) );
}
@Test
public void testConvert10500() {
assertEquals(RESULT_10500, this.converter.toWideReadableForm(NUMBER_10500));
}
@Test
public void testConvert155555()
{
assertEquals( RESULT_155555, this.converter.toWideReadableForm( NUMBER_155555 ) );
}
@Test
public void testConvert155555() {
assertEquals(RESULT_155555, this.converter.toWideReadableForm(NUMBER_155555));
}
@Test
public void testConvert9999999()
{
assertEquals( RESULT_9999999, this.converter.toWideReadableForm( NUMBER_9999999 ) );
}
@Test
public void testConvert9999999() {
assertEquals(RESULT_9999999, this.converter.toWideReadableForm(NUMBER_9999999));
}
@Test
public void testConvert10000000()
{
assertEquals( RESULT_10000000, this.converter.toWideReadableForm( NUMBER_10000000 ) );
}
@Test
public void testConvert10000000() {
assertEquals(RESULT_10000000, this.converter.toWideReadableForm(NUMBER_10000000));
}
@Test
public void testConvert155555555()
{
assertEquals( RESULT_155555555, this.converter.toWideReadableForm( NUMBER_155555555 ) );
}
@Test
public void testConvert155555555() {
assertEquals(RESULT_155555555, this.converter.toWideReadableForm(NUMBER_155555555));
}
}
@@ -18,7 +18,6 @@
package appeng.util.helpers;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
@@ -26,82 +25,77 @@ import org.junit.Test;
import appeng.api.util.AEColor;
public class P2PHelperTest {
public class P2PHelperTest
{
private P2PHelper unitUnderTest = new P2PHelper();
private P2PHelper unitUnderTest = new P2PHelper();
private static final short WHITE_FREQUENCY = 0;
private static final AEColor[] WHITE_COLORS = new AEColor[] { AEColor.WHITE, AEColor.WHITE, AEColor.WHITE,
AEColor.WHITE };
private static final short WHITE_FREQUENCY = 0;
private static final AEColor[] WHITE_COLORS = new AEColor[] { AEColor.WHITE, AEColor.WHITE, AEColor.WHITE, AEColor.WHITE };
private static final short BLACK_FREQUENCY = (short) 0xFFFF;
private static final AEColor[] BLACK_COLORS = new AEColor[] { AEColor.BLACK, AEColor.BLACK, AEColor.BLACK,
AEColor.BLACK };
private static final short BLACK_FREQUENCY = (short) 0xFFFF;
private static final AEColor[] BLACK_COLORS = new AEColor[] { AEColor.BLACK, AEColor.BLACK, AEColor.BLACK, AEColor.BLACK };
private static final short MULTI_FREQUENCY = (short) 0xE8D1;
private static final AEColor[] MULTI_COLORS = new AEColor[] { AEColor.RED, AEColor.LIGHT_GRAY, AEColor.GREEN,
AEColor.ORANGE };
private static final short MULTI_FREQUENCY = (short) 0xE8D1;
private static final AEColor[] MULTI_COLORS = new AEColor[] { AEColor.RED, AEColor.LIGHT_GRAY, AEColor.GREEN, AEColor.ORANGE };
private static final String HEX_WHITE_FREQUENCY = "0000";
private static final String HEX_BLACK_FREQUENCY = "FFFF";
private static final String HEX_MULTI_FREQUENCY = "E8D1";
private static final String HEX_MIN_FREQUENCY = "8000";
private static final String HEX_MAX_FREQUENCY = "7FFF";
private static final String HEX_WHITE_FREQUENCY = "0000";
private static final String HEX_BLACK_FREQUENCY = "FFFF";
private static final String HEX_MULTI_FREQUENCY = "E8D1";
private static final String HEX_MIN_FREQUENCY = "8000";
private static final String HEX_MAX_FREQUENCY = "7FFF";
@Test
public void testToColors() {
assertArrayEquals(WHITE_COLORS, this.unitUnderTest.toColors(WHITE_FREQUENCY));
assertArrayEquals(BLACK_COLORS, this.unitUnderTest.toColors(BLACK_FREQUENCY));
assertArrayEquals(MULTI_COLORS, this.unitUnderTest.toColors(MULTI_FREQUENCY));
}
@Test
public void testToColors()
{
assertArrayEquals( WHITE_COLORS, this.unitUnderTest.toColors( WHITE_FREQUENCY ) );
assertArrayEquals( BLACK_COLORS, this.unitUnderTest.toColors( BLACK_FREQUENCY ) );
assertArrayEquals( MULTI_COLORS, this.unitUnderTest.toColors( MULTI_FREQUENCY ) );
}
@Test
public void testFromColors() {
assertEquals(WHITE_FREQUENCY, this.unitUnderTest.fromColors(WHITE_COLORS));
assertEquals(BLACK_FREQUENCY, this.unitUnderTest.fromColors(BLACK_COLORS));
assertEquals(MULTI_FREQUENCY, this.unitUnderTest.fromColors(MULTI_COLORS));
}
@Test
public void testFromColors()
{
assertEquals( WHITE_FREQUENCY, this.unitUnderTest.fromColors( WHITE_COLORS ) );
assertEquals( BLACK_FREQUENCY, this.unitUnderTest.fromColors( BLACK_COLORS ) );
assertEquals( MULTI_FREQUENCY, this.unitUnderTest.fromColors( MULTI_COLORS ) );
}
@Test
public void testToAndFromColors() {
for (short i = Short.MIN_VALUE; i < Short.MAX_VALUE; i++) {
assertEquals(i, this.unitUnderTest.fromColors(this.unitUnderTest.toColors(i)));
}
}
@Test
public void testToAndFromColors()
{
for( short i = Short.MIN_VALUE; i < Short.MAX_VALUE; i++ )
{
assertEquals( i, this.unitUnderTest.fromColors( this.unitUnderTest.toColors( i ) ) );
}
}
@Test
public void testToHexDigit() {
assertEquals("0", this.unitUnderTest.toHexDigit(AEColor.WHITE));
assertEquals("1", this.unitUnderTest.toHexDigit(AEColor.ORANGE));
assertEquals("2", this.unitUnderTest.toHexDigit(AEColor.MAGENTA));
assertEquals("3", this.unitUnderTest.toHexDigit(AEColor.LIGHT_BLUE));
assertEquals("4", this.unitUnderTest.toHexDigit(AEColor.YELLOW));
assertEquals("5", this.unitUnderTest.toHexDigit(AEColor.LIME));
assertEquals("6", this.unitUnderTest.toHexDigit(AEColor.PINK));
assertEquals("7", this.unitUnderTest.toHexDigit(AEColor.GRAY));
assertEquals("8", this.unitUnderTest.toHexDigit(AEColor.LIGHT_GRAY));
assertEquals("9", this.unitUnderTest.toHexDigit(AEColor.CYAN));
assertEquals("A", this.unitUnderTest.toHexDigit(AEColor.PURPLE));
assertEquals("B", this.unitUnderTest.toHexDigit(AEColor.BLUE));
assertEquals("C", this.unitUnderTest.toHexDigit(AEColor.BROWN));
assertEquals("D", this.unitUnderTest.toHexDigit(AEColor.GREEN));
assertEquals("E", this.unitUnderTest.toHexDigit(AEColor.RED));
assertEquals("F", this.unitUnderTest.toHexDigit(AEColor.BLACK));
}
@Test
public void testToHexDigit()
{
assertEquals( "0", this.unitUnderTest.toHexDigit( AEColor.WHITE ) );
assertEquals( "1", this.unitUnderTest.toHexDigit( AEColor.ORANGE ) );
assertEquals( "2", this.unitUnderTest.toHexDigit( AEColor.MAGENTA ) );
assertEquals( "3", this.unitUnderTest.toHexDigit( AEColor.LIGHT_BLUE ) );
assertEquals( "4", this.unitUnderTest.toHexDigit( AEColor.YELLOW ) );
assertEquals( "5", this.unitUnderTest.toHexDigit( AEColor.LIME ) );
assertEquals( "6", this.unitUnderTest.toHexDigit( AEColor.PINK ) );
assertEquals( "7", this.unitUnderTest.toHexDigit( AEColor.GRAY ) );
assertEquals( "8", this.unitUnderTest.toHexDigit( AEColor.LIGHT_GRAY ) );
assertEquals( "9", this.unitUnderTest.toHexDigit( AEColor.CYAN ) );
assertEquals( "A", this.unitUnderTest.toHexDigit( AEColor.PURPLE ) );
assertEquals( "B", this.unitUnderTest.toHexDigit( AEColor.BLUE ) );
assertEquals( "C", this.unitUnderTest.toHexDigit( AEColor.BROWN ) );
assertEquals( "D", this.unitUnderTest.toHexDigit( AEColor.GREEN ) );
assertEquals( "E", this.unitUnderTest.toHexDigit( AEColor.RED ) );
assertEquals( "F", this.unitUnderTest.toHexDigit( AEColor.BLACK ) );
}
@Test
public void testToHexString() {
assertEquals(HEX_WHITE_FREQUENCY, this.unitUnderTest.toHexString(WHITE_FREQUENCY));
assertEquals(HEX_BLACK_FREQUENCY, this.unitUnderTest.toHexString(BLACK_FREQUENCY));
assertEquals(HEX_MULTI_FREQUENCY, this.unitUnderTest.toHexString(MULTI_FREQUENCY));
@Test
public void testToHexString()
{
assertEquals( HEX_WHITE_FREQUENCY, this.unitUnderTest.toHexString( WHITE_FREQUENCY ) );
assertEquals( HEX_BLACK_FREQUENCY, this.unitUnderTest.toHexString( BLACK_FREQUENCY ) );
assertEquals( HEX_MULTI_FREQUENCY, this.unitUnderTest.toHexString( MULTI_FREQUENCY ) );
assertEquals( HEX_MIN_FREQUENCY, this.unitUnderTest.toHexString( Short.MIN_VALUE ) );
assertEquals( HEX_MAX_FREQUENCY, this.unitUnderTest.toHexString( Short.MAX_VALUE ) );
}
assertEquals(HEX_MIN_FREQUENCY, this.unitUnderTest.toHexString(Short.MIN_VALUE));
assertEquals(HEX_MAX_FREQUENCY, this.unitUnderTest.toHexString(Short.MAX_VALUE));
}
}
@@ -31,9 +31,7 @@
"prerelease": true,
"created_at": "2015-03-15T17:38:03Z",
"published_at": "2015-03-16T06:32:39Z",
"assets": [
],
"assets": [],
"tarball_url": "https://api.github.com/repos/AppliedEnergistics/Applied-Energistics-2/tarball/rv2.beta.12",
"zipball_url": "https://api.github.com/repos/AppliedEnergistics/Applied-Energistics-2/zipball/rv2.beta.12",
"body": "Fixes #1024 Added zinc to the grindstone - thatsIch\r\n\r\nUpdate zh_CN.lang - bakaxyf"
@@ -70,9 +68,7 @@
"prerelease": true,
"created_at": "2015-03-13T22:49:12Z",
"published_at": "2015-03-14T23:53:49Z",
"assets": [
],
"assets": [],
"tarball_url": "https://api.github.com/repos/AppliedEnergistics/Applied-Energistics-2/tarball/rv2.beta.11",
"zipball_url": "https://api.github.com/repos/AppliedEnergistics/Applied-Energistics-2/zipball/rv2.beta.11",
"body": "Fixes #1015 Pattern terminal destroying a single item when not able to satisfy a NEI recipe - yueh\r\n\r\nFixes #1011 skip null values returned by the oredictionary - yueh\r\n\r\nUpdate zh_CN.lang - bakaxyf"
@@ -109,9 +105,7 @@
"prerelease": true,
"created_at": "2015-03-11T15:40:32Z",
"published_at": "2015-03-11T15:53:37Z",
"assets": [
],
"assets": [],
"tarball_url": "https://api.github.com/repos/AppliedEnergistics/Applied-Energistics-2/tarball/rv2.beta.10",
"zipball_url": "https://api.github.com/repos/AppliedEnergistics/Applied-Energistics-2/zipball/rv2.beta.10",
"body": "Fixes #861 Wireless Terminal notifies player, if it is unlinked - thatsIch\r\n\r\nFixes #920 Increased GUI close distance to match Vanilla MC distance - thatsIch\r\n\r\nFixes #743 Crash with BC plugs\r\n\r\nFixes #942 BC builder can build AE networks again\r\n\r\nUpdate #319 Now compiled against BC 6.4.2, with that MJ is gone"
@@ -148,9 +142,7 @@
"prerelease": true,
"created_at": "2015-03-09T14:05:21Z",
"published_at": "2015-03-10T09:42:09Z",
"assets": [
],
"assets": [],
"tarball_url": "https://api.github.com/repos/AppliedEnergistics/Applied-Energistics-2/tarball/rv2.beta.9",
"zipball_url": "https://api.github.com/repos/AppliedEnergistics/Applied-Energistics-2/zipball/rv2.beta.9",
"body": "Enhancement #817 Crafting CPU GUI now shows a green background on items being crafted, and a yellow background on scheduled items - Eearslya\r\n\r\nEnhancement Added an option to disable the colored crafting status - yueh\r\n\r\nEnhancement Added more information to the security audit - yueh\r\n\r\nEnhancement Improved performance - yueh\r\n\r\nFixes #972 Level Emitter tool-tip now corresponds to the actual behavior - thatsIch\r\n\r\nFixes #982 Auto-crafting lag reduced - yueh\r\n\r\nFixes #910 Dense cables render correctly with FMP now - yueh\r\n\r\nFixes #943 Reduced lag when breaking multiple blocks at once using Annihilation Plane - yueh\r\n\r\nFixes cable render crash and covered cables render as smart - yueh\r\n\r\nUpdate fr_FR.lang - Mazdallier\r\n\r\nUpdate zh_CN.lang - bakaxyf\r\n\r\nUpdated Texture / Model License to be more specific - AlgorithmX2\r\n\r\nUpdated Forge to recommended 10.13.2.1291 and other dependencies - yueh"
@@ -187,9 +179,7 @@
"prerelease": true,
"created_at": "2015-01-22T16:05:23Z",
"published_at": "2015-01-24T16:46:55Z",
"assets": [
],
"assets": [],
"tarball_url": "https://api.github.com/repos/AppliedEnergistics/Applied-Energistics-2/tarball/rv2.beta.8",
"zipball_url": "https://api.github.com/repos/AppliedEnergistics/Applied-Energistics-2/zipball/rv2.beta.8",
"body": "Update pt_BR.lang - al-myr\r\n\r\nImproved the logged warning for FailledConnection Now displays to coordinates of the affected tunnels. - yueh\r\n\r\nFix #701 - Changed harvest tool to axe - TheJulianJES\r\n\r\nFormation plane can now drop blocks as items - yueh\r\n\r\nDisable level emitter on offline networks Turns off level emitters if the goes offline because it runs out of power, channels or similar. - yueh\r\n\r\nFixes #304 WAILA Integration updated and fixed WAILA offers a new interface to sync the server data to the client. - thatsIch\r\n\r\nRemoved buffer from annihilation plane - yueh\r\n\r\nEffects should not collide with anything - yueh\r\n\r\nImprove code quality - thatsIch"
@@ -226,9 +216,7 @@
"prerelease": true,
"created_at": "2015-01-01T14:35:57Z",
"published_at": "2015-01-01T17:56:50Z",
"assets": [
],
"assets": [],
"tarball_url": "https://api.github.com/repos/AppliedEnergistics/Applied-Energistics-2/tarball/rv2.beta.7",
"zipball_url": "https://api.github.com/repos/AppliedEnergistics/Applied-Energistics-2/zipball/rv2.beta.7",
"body": "Fixes #666 vanishing microblocks with Immibis-Microblocks - yueh"
@@ -1,5 +1,5 @@
{
"variants": {
"normal": { "model": "uvlightmapjsontest:uvlblock_vanilla" }
}
"variants": {
"normal": { "model": "uvlightmapjsontest:uvlblock_vanilla" }
}
}
@@ -1,87 +1,159 @@
{
"loader": "appliedenergistics2:uvlightmap",
"textures": {
"0": "block/obsidian",
"1": "uvlightmapjsontest:blocks/BlockControllerLights"
"loader": "appliedenergistics2:uvlightmap",
"textures": {
"0": "block/obsidian",
"1": "uvlightmapjsontest:blocks/BlockControllerLights"
},
"elements": [
{
"name": "LL",
"from": [4.0, 0.0, 7.0],
"to": [6.0, 16.0, 9.0],
"faces": {
"north": { "texture": "#0", "uv": [1.0, 0.0, 15.0, 16.0] },
"east": { "texture": "#0", "uv": [1.0, 0.0, 15.0, 16.0] },
"south": { "texture": "#0", "uv": [1.0, 0.0, 15.0, 16.0] },
"west": { "texture": "#0", "uv": [1.0, 0.0, 15.0, 16.0] },
"up": { "texture": "#0", "uv": [0.0, 0.0, 2.0, 2.0] },
"down": { "texture": "#0", "uv": [0.0, 0.0, 2.0, 2.0] }
}
},
"elements": [
{
"name": "LL",
"from": [ 4.0, 0.0, 7.0 ],
"to": [ 6.0, 16.0, 9.0 ],
"faces": {
"north": { "texture": "#0", "uv": [ 1.0, 0.0, 15.0, 16.0 ] },
"east": { "texture": "#0", "uv": [ 1.0, 0.0, 15.0, 16.0 ] },
"south": { "texture": "#0", "uv": [ 1.0, 0.0, 15.0, 16.0] },
"west": { "texture": "#0", "uv": [ 1.0, 0.0, 15.0, 16.0 ] },
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 2.0, 2.0 ] },
"down": { "texture": "#0", "uv": [ 0.0, 0.0, 2.0, 2.0 ] }
}
{
"name": "RL",
"from": [10.0, 0.0, 7.0],
"to": [12.0, 16.0, 9.0],
"faces": {
"north": { "texture": "#0", "uv": [1.0, 0.0, 15.0, 16.0] },
"east": { "texture": "#0", "uv": [1.0, 0.0, 15.0, 16.0] },
"south": { "texture": "#0", "uv": [1.0, 0.0, 15.0, 16.0] },
"west": { "texture": "#0", "uv": [1.0, 0.0, 15.0, 16.0] },
"up": { "texture": "#0", "uv": [0.0, 0.0, 2.0, 2.0] },
"down": { "texture": "#0", "uv": [0.0, 0.0, 2.0, 2.0] }
}
},
{
"name": "B",
"from": [6.0, 7.0, 7.0],
"to": [10.0, 9.0, 9.0],
"faces": {
"north": { "texture": "#0", "uv": [0.0, 1.0, 16.0, 3.0] },
"east": { "texture": "#0", "uv": [1.0, 1.0, 3.0, 3.0] },
"south": { "texture": "#0", "uv": [0.0, 1.0, 16.0, 3.0] },
"west": { "texture": "#0", "uv": [1.0, 1.0, 3.0, 3.0] },
"up": { "texture": "#0", "uv": [0.0, 1.0, 16.0, 3.0] },
"down": { "texture": "#0", "uv": [0.0, 1.0, 16.0, 3.0] }
}
},
{
"name": "LLO",
"from": [4.0, 0.0, 7.0],
"to": [6.0, 16.0, 9.0],
"faces": {
"north": {
"texture": "#1",
"uv": [2.0, 0.0, 4.0, 16.0],
"uvlightmap": { "sky": 0.007, "block": 0.007 }
},
{
"name": "RL",
"from": [ 10.0, 0.0, 7.0 ],
"to": [ 12.0, 16.0, 9.0 ],
"faces": {
"north": { "texture": "#0", "uv": [ 1.0, 0.0, 15.0, 16.0 ] },
"east": { "texture": "#0", "uv": [ 1.0, 0.0, 15.0, 16.0 ] },
"south": { "texture": "#0", "uv": [ 1.0, 0.0, 15.0, 16.0 ] },
"west": { "texture": "#0", "uv": [ 1.0, 0.0, 15.0, 16.0 ] },
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 2.0, 2.0 ] },
"down": { "texture": "#0", "uv": [ 0.0, 0.0, 2.0, 2.0 ] }
}
"east": {
"texture": "#1",
"uv": [5.0, 0.0, 7.0, 16.0],
"uvlightmap": { "sky": 0.007, "block": 0.007 }
},
{
"name": "B",
"from": [ 6.0, 7.0, 7.0 ],
"to": [ 10.0, 9.0, 9.0 ],
"faces": {
"north": { "texture": "#0", "uv": [ 0.0, 1.0, 16.0, 3.0 ] },
"east": { "texture": "#0", "uv": [ 1.0, 1.0, 3.0, 3.0 ] },
"south": { "texture": "#0", "uv": [ 0.0, 1.0, 16.0, 3.0 ] },
"west": { "texture": "#0", "uv": [ 1.0, 1.0, 3.0, 3.0 ] },
"up": { "texture": "#0", "uv": [ 0.0, 1.0, 16.0, 3.0 ] },
"down": { "texture": "#0", "uv": [ 0.0, 1.0, 16.0, 3.0 ] }
}
"south": {
"texture": "#1",
"uv": [8.0, 0.0, 10.0, 16.0],
"uvlightmap": { "sky": 0.007, "block": 0.007 }
},
{
"name": "LLO",
"from": [ 4.0, 0.0, 7.0 ],
"to": [ 6.0, 16.0, 9.0 ],
"faces": {
"north": { "texture": "#1", "uv": [ 2.0, 0.0, 4.0, 16.0 ], "uvlightmap": { "sky": 0.007, "block": 0.007 } },
"east": { "texture": "#1", "uv": [ 5.0, 0.0, 7.0, 16.0 ], "uvlightmap": { "sky": 0.007, "block": 0.007 } },
"south": { "texture": "#1", "uv": [ 8.0, 0.0, 10.0, 16.0 ], "uvlightmap": { "sky": 0.007, "block": 0.007 } },
"west": { "texture": "#1", "uv": [ 11.0, 0.0, 13.0, 16.0 ], "uvlightmap": { "sky": 0.007, "block": 0.007 } },
"up": { "texture": "#1", "uv": [ 6.0, 6.0, 8.0, 8.0 ], "uvlightmap": { "sky": 0.007, "block": 0.007 } },
"down": { "texture": "#1", "uv": [ 8.0, 8.0, 10.0, 10.0 ], "uvlightmap": { "sky": 0.007, "block": 0.007 } }
}
"west": {
"texture": "#1",
"uv": [11.0, 0.0, 13.0, 16.0],
"uvlightmap": { "sky": 0.007, "block": 0.007 }
},
{
"name": "RLO",
"from": [ 10.0, 0.0, 7.0 ],
"to": [ 12.0, 16.0, 9.0 ],
"faces": {
"north": { "texture": "#1", "uv": [ 3.0, 0.0, 5.0, 16.0 ], "uvlightmap": { "sky": 0.007, "block": 0.007 } },
"east": { "texture": "#1", "uv": [ 5.0, 0.0, 7.0, 16.0 ], "uvlightmap": { "sky": 0.007, "block": 0.007 } },
"south": { "texture": "#1", "uv": [ 7.0, 0.0, 9.0, 16.0 ], "uvlightmap": { "sky": 0.007, "block": 0.007 } },
"west": { "texture": "#1", "uv": [ 10.0, 0.0, 12.0, 16.0 ], "uvlightmap": { "sky": 0.007, "block": 0.007 } },
"up": { "texture": "#1", "uv": [ 6.0, 6.0, 8.0, 8.0 ], "uvlightmap": { "sky": 0.007, "block": 0.007 } },
"down": { "texture": "#1", "uv": [ 7.0, 8.0, 9.0, 10.0 ], "uvlightmap": { "sky": 0.007, "block": 0.007 } }
}
"up": {
"texture": "#1",
"uv": [6.0, 6.0, 8.0, 8.0],
"uvlightmap": { "sky": 0.007, "block": 0.007 }
},
{
"name": "BO",
"from": [ 6.0, 7.0, 7.0 ],
"to": [ 10.0, 9.0, 9.0 ],
"faces": {
"north": { "texture": "#1", "uv": [ 5.0, 6.0, 9.0, 8.0 ], "uvlightmap": { "sky": 0.007, "block": 0.007 } },
"east": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 2.0 ], "uvlightmap": { "sky": 0.007, "block": 0.007 } },
"south": { "texture": "#1", "uv": [ 5.0, 7.0, 9.0, 9.0 ], "uvlightmap": { "sky": 0.007, "block": 0.007 } },
"west": { "texture": "#1", "uv": [ 5.0, 3.0, 7.0, 5.0 ], "uvlightmap": { "sky": 0.007, "block": 0.007 } },
"up": { "texture": "#1", "uv": [ 4.0, 10.0, 8.0, 12.0 ], "uvlightmap": { "sky": 0.007, "block": 0.007 } },
"down": { "texture": "#1", "uv": [ 8.0, 8.0, 12.0, 10.0 ], "uvlightmap": { "sky": 0.007, "block": 0.007 } }
}
"down": {
"texture": "#1",
"uv": [8.0, 8.0, 10.0, 10.0],
"uvlightmap": { "sky": 0.007, "block": 0.007 }
}
]
}
},
{
"name": "RLO",
"from": [10.0, 0.0, 7.0],
"to": [12.0, 16.0, 9.0],
"faces": {
"north": {
"texture": "#1",
"uv": [3.0, 0.0, 5.0, 16.0],
"uvlightmap": { "sky": 0.007, "block": 0.007 }
},
"east": {
"texture": "#1",
"uv": [5.0, 0.0, 7.0, 16.0],
"uvlightmap": { "sky": 0.007, "block": 0.007 }
},
"south": {
"texture": "#1",
"uv": [7.0, 0.0, 9.0, 16.0],
"uvlightmap": { "sky": 0.007, "block": 0.007 }
},
"west": {
"texture": "#1",
"uv": [10.0, 0.0, 12.0, 16.0],
"uvlightmap": { "sky": 0.007, "block": 0.007 }
},
"up": {
"texture": "#1",
"uv": [6.0, 6.0, 8.0, 8.0],
"uvlightmap": { "sky": 0.007, "block": 0.007 }
},
"down": {
"texture": "#1",
"uv": [7.0, 8.0, 9.0, 10.0],
"uvlightmap": { "sky": 0.007, "block": 0.007 }
}
}
},
{
"name": "BO",
"from": [6.0, 7.0, 7.0],
"to": [10.0, 9.0, 9.0],
"faces": {
"north": {
"texture": "#1",
"uv": [5.0, 6.0, 9.0, 8.0],
"uvlightmap": { "sky": 0.007, "block": 0.007 }
},
"east": {
"texture": "#1",
"uv": [0.0, 0.0, 2.0, 2.0],
"uvlightmap": { "sky": 0.007, "block": 0.007 }
},
"south": {
"texture": "#1",
"uv": [5.0, 7.0, 9.0, 9.0],
"uvlightmap": { "sky": 0.007, "block": 0.007 }
},
"west": {
"texture": "#1",
"uv": [5.0, 3.0, 7.0, 5.0],
"uvlightmap": { "sky": 0.007, "block": 0.007 }
},
"up": {
"texture": "#1",
"uv": [4.0, 10.0, 8.0, 12.0],
"uvlightmap": { "sky": 0.007, "block": 0.007 }
},
"down": {
"texture": "#1",
"uv": [8.0, 8.0, 12.0, 10.0],
"uvlightmap": { "sky": 0.007, "block": 0.007 }
}
}
}
]
}
@@ -1,6 +1,6 @@
{
"parent": "uvlightmapjsontest:block/uvlblock",
"textures": {
"0": "block/diamond_block"
}
"parent": "uvlightmapjsontest:block/uvlblock",
"textures": {
"0": "block/diamond_block"
}
}
@@ -1,3 +1,3 @@
{
"parent": "uvlightmapjsontest:block/uvlblock"
"parent": "uvlightmapjsontest:block/uvlblock"
}