From 1ffbfdf48d9c23712932f6d25f1bc1529202412e Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Wed, 5 Jan 2022 17:56:23 +0000 Subject: Added Solar Tower & Solar Heater. Added Potassium Nitrate. Added Sodium Nitrate. Added Hot/Cold Solar Salt. Added recipes for the above. Added Solar Salt processing to Thermal Boiler. Re-added Assembly Line MKII, Tesla Tower. (WIP) --- .../java/gtPlusPlus/core/item/general/ItemAreaClear.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/main/java/gtPlusPlus/core/item') diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemAreaClear.java b/src/main/java/gtPlusPlus/core/item/general/ItemAreaClear.java index 5be184b3db..16d0c0253b 100644 --- a/src/main/java/gtPlusPlus/core/item/general/ItemAreaClear.java +++ b/src/main/java/gtPlusPlus/core/item/general/ItemAreaClear.java @@ -30,7 +30,7 @@ public class ItemAreaClear extends CoreItem { public IIcon[] mIcon = new IIcon[1]; public ItemAreaClear() { - super("itemDebugClearing", AddToCreativeTab.tabMachines, 1, 100, new String[] {EnumChatFormatting.OBFUSCATED+"F A M C Y N A M E"}, EnumRarity.rare, + super("itemDebugClearing", AddToCreativeTab.tabMachines, 1, 100, new String[] {EnumChatFormatting.OBFUSCATED+"F A N C Y N A M E"}, EnumRarity.rare, EnumChatFormatting.BOLD, false, null); } @@ -160,16 +160,16 @@ public class ItemAreaClear extends CoreItem { int y1 = pos.yPos; int z1 = pos.zPos; - int x2 = (x1-10); + int x2 = (x1-15); int y2 = (y1-1); - int z2 = (z1-10); + int z2 = (z1-15); fillBlockColumn(world, new BlockPos(x2, y2, z2, world)); return true; } public boolean fillBlockColumn(World world, BlockPos pos){ - for (int i=0; i<21; i++){ + for (int i=0; i<30; i++){ fillBlockRow(world, new BlockPos(pos.xPos, pos.yPos, pos.zPos+i, world)); } return true; @@ -177,9 +177,10 @@ public class ItemAreaClear extends CoreItem { public boolean fillBlockRow(World world, BlockPos pos){ for (int j=0; j<2; j++){ - for (int i=0; i<21; i++){ + for (int i=0; i<30; i++){ if (world.getBlock(pos.xPos+i, pos.yPos+j, pos.zPos) != Blocks.bedrock){ - world.setBlock(pos.xPos+i, pos.yPos+j, pos.zPos, Blocks.grass); + world.setBlock(pos.xPos+i, pos.yPos+j, pos.zPos, Blocks.dirt); + world.setBlockMetadataWithNotify(pos.xPos+i, pos.yPos+j, pos.zPos, 2, 2); } } } -- cgit From f7ba5299ea34a21254a8b4174c21c46869709892 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Thu, 6 Jan 2022 19:24:03 +0000 Subject: Made Chromatic Glass less eye-rapey. --- .../core/item/base/BaseItemComponent.java | 488 ++++++++++++++++++++- 1 file changed, 469 insertions(+), 19 deletions(-) (limited to 'src/main/java/gtPlusPlus/core/item') diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java index 9ad8ea3feb..3b0b868553 100644 --- a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java +++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java @@ -312,38 +312,38 @@ public class BaseItemComponent extends Item{ ((Map) extraData).put((int) Short.MAX_VALUE, new Short[] {0}); ((Map) extraData).put((int) Short.MAX_VALUE-1, new Short[] {0}); short[] er = this.componentMaterial.getRGBA(); - short value = 1; + short value = 0; Short[] ht = new Short[] {er[0], er[1], er[2]}; - for (int y = 0; y < 40; y++) { - if (y < 20) { + int aMaxCycles = 200; + for (int y = 0; y < aMaxCycles; y++) { + if (y < (50)) { value = 1; } - else { + else if (y < (100)) { + value = 0; + } + else if (y < (150)) { value = -1; } - short r = (short) (ht[0] + value); - short g = (short) (ht[1] + value); - short b = (short) (ht[2] + value); + else { + value = 0; + } + short r = (short) Math.max(Math.min(255, (ht[0] + value)), 0); + short g = (short) Math.max(Math.min(255, (ht[1] + value)), 0); + short b = (short) Math.max(Math.min(255, (ht[2] + value)), 0); Short[] qq = new Short[] {(short) Math.min(255, r), (short) Math.min(255, g), (short) Math.min(255, b)}; ht = qq; ((Map) extraData).put(y, qq); } + ((Map) extraData).put((int) Short.MAX_VALUE-2, new Short[] {(short) (((Map) extraData).size()-1)}); } if (extraData != null) { - Short aCurrentFrame = ((Map) extraData).get((int) Short.MAX_VALUE)[0]; - Short aSize = 40; + Short aSize = (short) (((Map) extraData).size() - 3); short nextFrame = (short) ((aCurrentFrame < aSize) ? (aCurrentFrame+1) : 0); Short[] aCurrentFrameRGB = ((Map) extraData).get(aCurrentFrame < aSize ? (int) aCurrentFrame : 0); - ((Map) extraData).put((int) Short.MAX_VALUE, new Short[] {nextFrame}); - return Utils.rgbtoHexValue(aCurrentFrameRGB[0], aCurrentFrameRGB[1], aCurrentFrameRGB[2]); - - - /*Short aCurrentFrame = ((Map) extraData).get((int) Short.MAX_VALUE)[0]; - Short[] aCurrentFrameRGB = ((Map) extraData).get((int) aCurrentFrame); - short nextFrame = aCurrentFrame < 40 ? aCurrentFrame++ : 0; - ((Map) extraData).put((int) Short.MAX_VALUE, new Short[] {nextFrame}); - return Utils.rgbtoHexValue(aCurrentFrameRGB[0], aCurrentFrameRGB[1], aCurrentFrameRGB[2]);*/ + ((Map) extraData).put((int) Short.MAX_VALUE, new Short[] {nextFrame}); + return Utils.rgbtoHexValue(aCurrentFrameRGB[0], aCurrentFrameRGB[1], aCurrentFrameRGB[2]); } } @@ -359,19 +359,109 @@ public class BaseItemComponent extends Item{ ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 0}); //Slowly start adding in some red to get to yellow: ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); ((Map) extraData).put(aSlot++, new Short[] {255, 255, 0}); @@ -379,15 +469,90 @@ public class BaseItemComponent extends Item{ ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 204, 0}); ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); ((Map) extraData).put(aSlot++, new Short[] {255, 0, 0}); @@ -395,15 +560,90 @@ public class BaseItemComponent extends Item{ ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); ((Map) extraData).put(aSlot++, new Short[] {255, 0, 255}); @@ -411,15 +651,90 @@ public class BaseItemComponent extends Item{ ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); ((Map) extraData).put(aSlot++, new Short[] { 0, 0, 255}); @@ -427,15 +742,90 @@ public class BaseItemComponent extends Item{ ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 255}); @@ -443,16 +833,76 @@ public class BaseItemComponent extends Item{ ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); ((Map) extraData).put(aSlot++, new Short[] { 0, 255, 51}); - ((Map) extraData).put((int) Byte.MAX_VALUE, new Short[] {(short) (((Map) extraData).size()-1)}); + ((Map) extraData).put((int) Short.MAX_VALUE-2, new Short[] {(short) (((Map) extraData).size()-1)}); } -- cgit From 53da73a35860acd285baa0ccab5aef4ff4f6bd98 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Fri, 7 Jan 2022 16:24:37 +0000 Subject: Rewrote and readded Bronze/Advanced Workbenches using GT Meta Tile system. --- src/main/java/gtPlusPlus/core/block/ModBlocks.java | 17 +- .../core/block/machine/Machine_Workbench.java | 152 ------ .../block/machine/Machine_WorkbenchAdvanced.java | 111 ----- .../core/container/Container_Workbench.java | 413 ---------------- .../container/Container_WorkbenchAdvanced.java | 377 -------------- .../gtPlusPlus/core/gui/machine/GUI_Workbench.java | 81 --- .../core/gui/machine/GUI_WorkbenchAdvanced.java | 42 -- .../java/gtPlusPlus/core/handler/GuiHandler.java | 43 +- .../core/item/general/ItemBlueprint.java | 6 +- .../core/tileentities/ModTileEntities.java | 14 +- .../tileentities/machines/TileEntityWorkbench.java | 172 ------- .../machines/TileEntityWorkbenchAdvanced.java | 245 --------- .../workbench/GT_Container_AdvancedWorkbench.java | 124 +++++ .../workbench/GT_Container_BronzeWorkbench.java | 120 +++++ .../GT_GUIContainer_AdvancedWorkbench.java | 84 ++++ .../workbench/GT_GUIContainer_BronzeWorkbench.java | 13 + .../common/blocks/textures/TexturesGtBlock.java | 17 +- .../GregtechMetaTileEntity_SteamCompressor.java | 163 ++++++ .../GT_MetaTileEntity_AdvancedCraftingTable.java | 550 +++++++++++++++++++++ .../GT_MetaTileEntity_BronzeCraftingTable.java | 91 ++++ .../registration/gregtech/Gregtech4Content.java | 17 +- .../blocks/TileEntities/gt4/bronze_bottom.png | Bin 0 -> 377 bytes .../blocks/TileEntities/gt4/bronze_side.png | Bin 0 -> 395 bytes .../blocks/TileEntities/gt4/bronze_top.png | Bin 0 -> 359 bytes .../TileEntities/gt4/bronze_top_crafting.png | Bin 0 -> 237 bytes .../TileEntities/gt4/machine_top_crafting.png | Bin 0 -> 263 bytes 26 files changed, 1227 insertions(+), 1625 deletions(-) delete mode 100644 src/main/java/gtPlusPlus/core/block/machine/Machine_Workbench.java delete mode 100644 src/main/java/gtPlusPlus/core/block/machine/Machine_WorkbenchAdvanced.java delete mode 100644 src/main/java/gtPlusPlus/core/container/Container_Workbench.java delete mode 100644 src/main/java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java delete mode 100644 src/main/java/gtPlusPlus/core/gui/machine/GUI_Workbench.java delete mode 100644 src/main/java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java delete mode 100644 src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbench.java delete mode 100644 src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbenchAdvanced.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_AdvancedWorkbench.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_BronzeWorkbench.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_AdvancedWorkbench.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_BronzeWorkbench.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_AdvancedCraftingTable.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_BronzeCraftingTable.java create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_bottom.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_side.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_top.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_top_crafting.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_top_crafting.png (limited to 'src/main/java/gtPlusPlus/core/item') diff --git a/src/main/java/gtPlusPlus/core/block/ModBlocks.java b/src/main/java/gtPlusPlus/core/block/ModBlocks.java index fdbb2bdf5b..a716366601 100644 --- a/src/main/java/gtPlusPlus/core/block/ModBlocks.java +++ b/src/main/java/gtPlusPlus/core/block/ModBlocks.java @@ -13,11 +13,22 @@ import gtPlusPlus.core.block.general.PlayerDoors; import gtPlusPlus.core.block.general.antigrief.BlockWitherProof; import gtPlusPlus.core.block.general.redstone.BlockGenericRedstoneDetector; import gtPlusPlus.core.block.general.redstone.BlockGenericRedstoneTest; -import gtPlusPlus.core.block.machine.*; +import gtPlusPlus.core.block.machine.CircuitProgrammer; +import gtPlusPlus.core.block.machine.DecayablesChest; +import gtPlusPlus.core.block.machine.EggBox; +import gtPlusPlus.core.block.machine.FishTrap; +import gtPlusPlus.core.block.machine.HeliumGenerator; +import gtPlusPlus.core.block.machine.Machine_ModularityTable; +import gtPlusPlus.core.block.machine.Machine_PestKiller; +import gtPlusPlus.core.block.machine.Machine_PooCollector; +import gtPlusPlus.core.block.machine.Machine_ProjectTable; +import gtPlusPlus.core.block.machine.Machine_RoundRobinator; +import gtPlusPlus.core.block.machine.Machine_SuperJukebox; +import gtPlusPlus.core.block.machine.Machine_TradeTable; +import gtPlusPlus.core.block.machine.VolumetricFlaskSetter; import gtPlusPlus.core.block.machine.bedrock.Mining_Head_Fake; import gtPlusPlus.core.block.machine.bedrock.Mining_Pipe_Fake; import gtPlusPlus.core.fluids.FluidRegistryHandler; -import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -110,8 +121,6 @@ public final class ModBlocks { FluidRegistryHandler.registerFluids(); //Workbench - blockWorkbench = new Machine_Workbench().setHardness(1.5F); - blockWorkbenchAdvanced = new Machine_WorkbenchAdvanced().setHardness(2.5F); blockHeliumGenerator = new HeliumGenerator(); blockFirePit = new FirePit(); blockFishTrap = new FishTrap(); diff --git a/src/main/java/gtPlusPlus/core/block/machine/Machine_Workbench.java b/src/main/java/gtPlusPlus/core/block/machine/Machine_Workbench.java deleted file mode 100644 index 5c08612042..0000000000 --- a/src/main/java/gtPlusPlus/core/block/machine/Machine_Workbench.java +++ /dev/null @@ -1,152 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import ic2.core.item.tool.ItemToolWrench; - -@Optional.Interface(iface = "crazypants.enderio.api.tool.ITool", modid = "EnderIO") -public class Machine_Workbench extends BlockContainer -{ - @SideOnly(Side.CLIENT) - private IIcon textureTop; - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - @SideOnly(Side.CLIENT) - private IIcon textureFront; - - @SuppressWarnings("deprecation") - public Machine_Workbench() - { - super(Material.iron); - this.setBlockName("blockWorkbenchGT"); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerBlock(this, "blockWorkbenchGT"); - LanguageRegistry.addName(this, "Bronze Workbench"); - - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) - { - return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister p_149651_1_) - { - this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "bronze_side_cabinet"); - this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "bronze_top_crafting"); - this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "bronze_side"); - this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "bronze_side_cabinet"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) - { - - ItemStack heldItem = null; - if (world.isRemote){ - heldItem = PlayerUtils.getItemStackInPlayersHand(); - } - - boolean holdingWrench = false; - - if (heldItem != null){ - holdingWrench = isWrench(heldItem); - } - - if (world.isRemote) { - return true; - } - - final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityWorkbench)) - { - if (!holdingWrench){ - player.openGui(GTplusplus.instance, 3, world, x, y, z); - return true; - } - Logger.INFO("Holding a Wrench, doing wrench things instead."); - } - return false; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - return new TileEntityWorkbench(); - } - - public static boolean isWrench(final ItemStack item){ - if (item.getItem() instanceof ItemToolWrench){ - return true; - } - if (LoadedMods.BuildCraft){ - return checkBuildcraftWrench(item); - } - if (LoadedMods.EnderIO){ - return checkEnderIOWrench(item); - } - return false; - } - - @Optional.Method(modid = "EnderIO") - private static boolean checkEnderIOWrench(final ItemStack item) { - if (ReflectionUtils.doesClassExist("crazypants.enderio.api.tool.ITool")) { - Class wrenchClass; - wrenchClass = ReflectionUtils.getClass("crazypants.enderio.api.tool.ITool"); - if (wrenchClass.isInstance(item.getItem())) { - return true; - } - } - return false; - } - - @Optional.Method(modid = "Buildcraft") - private static boolean checkBuildcraftWrench(final ItemStack item) { - if (ReflectionUtils.doesClassExist("buildcraft.api.tools.IToolWrench")) { - Class wrenchClass; - wrenchClass = ReflectionUtils.getClass("buildcraft.api.tools.IToolWrench"); - if (wrenchClass.isInstance(item.getItem())) { - return true; - } - } - return false; - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - -} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/machine/Machine_WorkbenchAdvanced.java b/src/main/java/gtPlusPlus/core/block/machine/Machine_WorkbenchAdvanced.java deleted file mode 100644 index af2f9f82e0..0000000000 --- a/src/main/java/gtPlusPlus/core/block/machine/Machine_WorkbenchAdvanced.java +++ /dev/null @@ -1,111 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; - -public class Machine_WorkbenchAdvanced extends BlockContainer -{ - @SideOnly(Side.CLIENT) - private IIcon textureTop; - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - @SideOnly(Side.CLIENT) - private IIcon textureFront; - - @SuppressWarnings("deprecation") - public Machine_WorkbenchAdvanced() - { - super(Material.iron); - this.setBlockName("blockWorkbenchGTAdvanced"); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerBlock(this, "blockWorkbenchGTAdvanced"); - LanguageRegistry.addName(this, "Advanced Workbench"); - - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) - { - return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister p_149651_1_) - { - this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "machine_top"); - this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "cover_crafting"); - this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "machine_top"); - this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "machine_top"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) - { - - /*final ItemStack heldItem = PlayerUtils.getItemStackInPlayersHand(player); - if (world.isRemote) { - return true; - } - boolean holdingWrench = false; - - if (heldItem != null){ - if (heldItem.getItem() instanceof ItemToolWrench){ - holdingWrench = true; - } - else if (heldItem.getItem() instanceof IToolWrench){ - holdingWrench = true; - } - else if (heldItem.getItem() instanceof ITool){ - holdingWrench = true; - } - else if (heldItem.getItem() instanceof GT_MetaGenerated_Tool){ - GT_MetaGenerated_Tool testTool = (GT_MetaGenerated_Tool) heldItem.getItem(); - if (testTool.canWrench(player, x, y, z)){ - holdingWrench = true; - } - } - else { - holdingWrench = false; - } - } - - - final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityWorkbenchAdvanced)) - { - if (!holdingWrench){ - player.openGui(GTplusplus.instance, 4, world, x, y, z); - return true; - } - Utils.LOG_INFO("Holding a Wrench, doing wrench things instead."); - }*/ - return false; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - return new TileEntityWorkbenchAdvanced(128000, 2); - } -} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/container/Container_Workbench.java b/src/main/java/gtPlusPlus/core/container/Container_Workbench.java deleted file mode 100644 index 55ef1a3d0c..0000000000 --- a/src/main/java/gtPlusPlus/core/container/Container_Workbench.java +++ /dev/null @@ -1,413 +0,0 @@ -package gtPlusPlus.core.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.*; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.world.World; - -import gregtech.api.gui.GT_Slot_Holo; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.interfaces.IItemBlueprint; -import gtPlusPlus.core.inventories.InventoryWorkbenchChest; -import gtPlusPlus.core.inventories.InventoryWorkbenchHoloSlots; -import gtPlusPlus.core.inventories.InventoryWorkbenchTools; -import gtPlusPlus.core.item.general.ItemBlueprint; -import gtPlusPlus.core.slots.*; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class Container_Workbench extends Container { - - protected TileEntityWorkbench tile_entity; - public InventoryCrafting craftMatrix = new InventoryCrafting(this, 3, 3); - public final InventoryWorkbenchChest inventoryChest; - public final InventoryWorkbenchTools inventoryTool; - public final InventoryWorkbenchHoloSlots inventoryHolo; - //public final InventoryWorkbenchHoloCrafting inventoryCrafting; - - private final World worldObj; - private final int posX; - private final int posY; - private final int posZ; - - public static int HoloSlotNumber = 6; - public static int InputSlotNumber = 0; //Number of Slots in the Crafting Grid - public static int StorageSlotNumber = 16; //Number of slots in storage area - public static int ToolSlotNumber = 5; // Number of slots in the tool area up top - public static int InOutputSlotNumber = InputSlotNumber + StorageSlotNumber + ToolSlotNumber + HoloSlotNumber; //Same plus Output Slot - public static int InventorySlotNumber = 36; //Inventory Slots (Inventory and Hotbar) - public static int InventoryOutSlotNumber = InventorySlotNumber + 1; //Inventory Slot Number + Output - public static int FullSlotNumber = InventorySlotNumber + InOutputSlotNumber; //All slots - - private final int slotOutput = 0; - private final int[] slotHolo = new int[5]; - private final int[] slotCrafting = new int[9]; - private final int[] slotStorage = new int[16]; - private final int[] slotTools = new int[5]; - - public void moveCraftingToChest(){ - //Check Chest Space - for (int i=0;i<9;i++){ - if (this.craftMatrix.getStackInSlot(i) != null){ - for (int r=0;r<16;r++){ - if ((this.inventoryChest.getStackInSlot(r) == null) || ((this.inventoryChest.getStackInSlot(r).getItem() == this.craftMatrix.getStackInSlot(i).getItem()) && ((64-this.craftMatrix.getStackInSlot(i).stackSize) <= (64-this.craftMatrix.getStackInSlot(i).stackSize)))){ - this.inventoryChest.setInventorySlotContents(r, this.craftMatrix.getStackInSlot(i)); - this.craftMatrix.setInventorySlotContents(i, null); - break; - } - } - } - } - //For Each Space or already existing itemstack, move one itemstack or fill current partial stack - //Remove old itemstack or partial stack from crafting grid - } - - public void moveChestToCrafting(){ - //Check Crafting items and slots - for (int i=0;i<9;i++){ - if ((this.craftMatrix.getStackInSlot(i) == null) || (this.craftMatrix.getStackInSlot(i).stackSize > 0)){ - for (int r=0;r<16;r++){ - if (this.inventoryChest.getStackInSlot(r) != null){ - this.craftMatrix.setInventorySlotContents(i, this.craftMatrix.getStackInSlot(r)); - this.inventoryChest.setInventorySlotContents(r, null); - } - } - } - } - //For Each already existing itemstack, fill current partial stack - //Remove partial stack from chest area - } - - - public Container_Workbench(final InventoryPlayer inventory, final TileEntityWorkbench tile){ - this.tile_entity = tile; - this.inventoryChest = tile.inventoryChest; - this.inventoryTool = tile.inventoryTool; - this.inventoryHolo = tile.inventoryHolo; - //this.inventoryCrafting = tile.inventoryCrafting; - - int var6; - int var7; - this.worldObj = tile.getWorldObj(); - this.posX = tile.xCoord; - this.posY = tile.yCoord; - this.posZ = tile.zCoord; - - int o=0; - - //Output slot - this.addSlotToContainer(new SlotOutput(inventory.player, this.craftMatrix, tile.inventoryCraftResult, 0, 136, 64)); - //Util Slots - this.addSlotToContainer(new SlotBlueprint(this.inventoryHolo, 1, 136, 28)); //Blueprint - this.addSlotToContainer(new SlotNoInput(this.inventoryHolo, 2, 154, 28)); //Hopper - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 3, 154, 64, false, false, 64)); //Parking - //Holo Slots - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 4, 154, 46, false, false, 1)); - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 5, 136, 46, false, false, 1)); - - for (int i=1; i<6; i++){ - this.slotHolo[o] = o+1; - o++; - } - - o=0; - - this.updateCraftingMatrix(); - - //Crafting Grid - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 3; ++var7) - { - //this.addSlotToContainer(new Slot(this.craftMatrix, var7 + (var6 * 3), 82 + (var7 * 18), 28 + (var6 * 18))); - - /*if (this.inventoryCrafting.getStackInSlot(o) != null){ - this.craftMatrix.setInventorySlotContents(o, inventoryCrafting.getStackInSlot(o)); - this.inventoryCrafting.setInventorySlotContents(o, null); - } */ - this.slotCrafting[o] = o+6; - o++; - } - } - - o=0; - - //Storage Side - for (var6 = 0; var6 < 4; ++var6) - { - for (var7 = 0; var7 < 4; ++var7) - { - //Utils.LOG_WARNING("Adding slots at var:"+(var7 + var6 * 4)+" x:"+(8 + var7 * 18)+" y:"+(7 + var6 * 18)); - this.addSlotToContainer(new Slot(this.inventoryChest, var7 + (var6 * 4), 8 + (var7 * 18), 7 + (var6 * 18))); - this.slotStorage[o] = o+15; - o++; - } - } - - o=0; - - //Tool Slots - for (var6 = 0; var6 < 1; ++var6) - { - for (var7 = 0; var7 < 5; ++var7) - { - this.addSlotToContainer(new SlotGtTool(this.inventoryTool, var7 + (var6 * 3), 82 + (var7 * 18), 8 + (var6 * 18))); - this.slotTools[o] = o+31; - o++; - } - } - - //Player Inventory - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 9; ++var7) - { - this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); - } - } - - //Player Hotbar - for (var6 = 0; var6 < 9; ++var6) - { - this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); - } - - this.onCraftMatrixChanged(this.craftMatrix); - - } - - @Override - public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer){ - - if (!aPlayer.worldObj.isRemote){ - if ((aSlotIndex == 999) || (aSlotIndex == -999)){ - //Utils.LOG_WARNING("??? - "+aSlotIndex); - } - - if (aSlotIndex == this.slotOutput){ - Logger.WARNING("Player Clicked on the output slot"); - //TODO - } - - for (final int x : this.slotHolo){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the Holo Grid"); - if (x == 1){ - Logger.WARNING("Player Clicked Blueprint slot in the Holo Grid"); - } - else if (x == 2){ - Logger.WARNING("Player Clicked Right Arrow slot in the Holo Grid"); - if (this.inventoryHolo.getStackInSlot(1) != null){ - Logger.WARNING("Found an ItemStack."); - if (this.inventoryHolo.getStackInSlot(1).getItem() instanceof IItemBlueprint){ - Logger.WARNING("Found a blueprint."); - final ItemStack tempBlueprint = this.inventoryHolo.getStackInSlot(1); - final ItemBlueprint tempItemBlueprint = (ItemBlueprint) tempBlueprint.getItem(); - if ((this.inventoryHolo.getStackInSlot(0) != null) && !tempItemBlueprint.hasBlueprint(tempBlueprint)){ - Logger.WARNING("Output slot was not empty."); - Logger.WARNING("Trying to manipulate NBT data on the blueprint stack, then replace it with the new one."); - tempItemBlueprint.setBlueprint(this.inventoryHolo.getStackInSlot(1), this.craftMatrix, this.inventoryHolo.getStackInSlot(0)); - final ItemStack newTempBlueprint = ItemUtils.getSimpleStack(tempItemBlueprint); - this.inventoryHolo.setInventorySlotContents(1, newTempBlueprint); - Logger.WARNING(ItemUtils.getArrayStackNames(tempItemBlueprint.getBlueprint(newTempBlueprint))); - } - else { - if (tempItemBlueprint.hasBlueprint(tempBlueprint)){ - Logger.WARNING("Blueprint already holds a recipe."); - } - else { - Logger.WARNING("Output slot was empty."); - } - } - } - else { - Logger.WARNING("ItemStack found was not a blueprint."); - } - } - else { - Logger.WARNING("No ItemStack found in Blueprint slot."); - } - } - else if (x == 3){ - Logger.WARNING("Player Clicked Big [P] slot in the Holo Grid"); - } - else if (x == 4){ - Logger.WARNING("Player Clicked Transfer to Crafting Grid slot in the Holo Grid"); - } - else if (x == 5){ - Logger.WARNING("Player Clicked Transfer to Storage Grid slot in the Holo Grid"); - } - } - } - - for (final int x : this.slotCrafting){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the crafting Grid"); - } - } - for (final int x : this.slotStorage){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the storage Grid"); - } - } - for (final int x : this.slotTools){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the tool Grid"); - } - } - } - //Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the Grid"); - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - - private void updateCraftingMatrix() { - for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) { - //this.craftMatrix.setInventorySlotContents(i, this.tile_entity.inventoryCrafting.getStackInSlot(i)); - } - } - - @Override - public void onCraftMatrixChanged(final IInventory iiventory) { - this.tile_entity.inventoryCraftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj)); - } - - @Override - public void onContainerClosed(final EntityPlayer par1EntityPlayer) - { - super.onContainerClosed(par1EntityPlayer); - this.saveCraftingMatrix(); - } - - private void saveCraftingMatrix() { - for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) { - //this.tile_entity.inventoryCrafting.setInventorySlotContents(i, this.craftMatrix.getStackInSlot(i)); - } - } - - - - - /*@Override - public void onCraftMatrixChanged(IInventory par1IInventory){ - //Custom Recipe Handler - //craftResult.setInventorySlotContents(0, Workbench_CraftingHandler.getInstance().findMatchingRecipe(craftMatrix, worldObj)); - - //Vanilla CraftingManager - Utils.LOG_WARNING("checking crafting grid for a valid output."); - ItemStack temp = CraftingManager.getInstance().findMatchingRecipe(craftMatrix, worldObj); - if (temp != null){ - Utils.LOG_WARNING("Output found. "+temp.getDisplayName()+" x"+temp.stackSize); - craftResult.setInventorySlotContents(slotOutput, temp); - } - else { - Utils.LOG_WARNING("No Valid output found."); - craftResult.setInventorySlotContents(slotOutput, null); - } - }*/ - - /*@Override - public void onContainerClosed(EntityPlayer par1EntityPlayer) - { - for (int o=0; o= InOutputSlotNumber) && (par2 < InventoryOutSlotNumber)) - { - if (!this.mergeItemStack(var5, InventoryOutSlotNumber, FullSlotNumber, false)) - { - return null; - } - } - else if ((par2 >= InventoryOutSlotNumber) && (par2 < FullSlotNumber)) - { - if (!this.mergeItemStack(var5, InOutputSlotNumber, InventoryOutSlotNumber, false)) - { - return null; - } - } - else if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, false)) - { - return null; - } - - if (var5.stackSize == 0) - { - var4.putStack((ItemStack)null); - } - else - { - var4.onSlotChanged(); - } - - if (var5.stackSize == var3.stackSize) - { - return null; - } - - var4.onPickupFromSlot(par1EntityPlayer, var5); - } - - return var3; - } - - //Can merge Slot - @Override - public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { - return (p_94530_2_.inventory != this.tile_entity.inventoryCraftResult) && super.func_94530_a(p_94530_1_, p_94530_2_); - } - - -} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java b/src/main/java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java deleted file mode 100644 index dc499c570f..0000000000 --- a/src/main/java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java +++ /dev/null @@ -1,377 +0,0 @@ -package gtPlusPlus.core.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.*; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.world.World; - -import gregtech.api.gui.GT_Slot_Holo; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.interfaces.IItemBlueprint; -import gtPlusPlus.core.inventories.*; -import gtPlusPlus.core.item.general.ItemBlueprint; -import gtPlusPlus.core.slots.*; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class Container_WorkbenchAdvanced extends Container { - - protected TileEntityWorkbenchAdvanced tile_entity; - public InventoryCrafting craftMatrix = new InventoryCrafting(this, 3, 3); - public final InventoryWorkbenchChest inventoryChest; - public final InventoryWorkbenchToolsElectric inventoryTool; - public final InventoryWorkbenchHoloSlots inventoryHolo; - public final InventoryWorkbenchHoloCrafting inventoryCrafting; - - private final World worldObj; - private final int posX; - private final int posY; - private final int posZ; - - public static int HoloSlotNumber = 6; - public static int InputSlotNumber = 9; //Number of Slots in the Crafting Grid - public static int StorageSlotNumber = 16; //Number of slots in storage area - public static int ToolSlotNumber = 5; // Number of slots in the tool area up top - public static int InOutputSlotNumber = InputSlotNumber + StorageSlotNumber + ToolSlotNumber + HoloSlotNumber; //Same plus Output Slot - public static int InventorySlotNumber = 36; //Inventory Slots (Inventory and Hotbar) - public static int InventoryOutSlotNumber = InventorySlotNumber + 1; //Inventory Slot Number + Output - public static int FullSlotNumber = InventorySlotNumber + InOutputSlotNumber; //All slots - - private final int slotOutput = 0; - private final int[] slotHolo = new int[5]; - private final int[] slotCrafting = new int[9]; - private final int[] slotStorage = new int[16]; - private final int[] slotTools = new int[5]; - - public Container_WorkbenchAdvanced(final InventoryPlayer inventory, final TileEntityWorkbenchAdvanced tile){ - this.tile_entity = tile; - this.inventoryChest = tile.inventoryChest; - this.inventoryTool = tile.inventoryTool; - this.inventoryHolo = tile.inventoryHolo; - this.inventoryCrafting = tile.inventoryCrafting; - - int var6; - int var7; - this.worldObj = tile.getWorldObj(); - this.posX = tile.xCoord; - this.posY = tile.yCoord; - this.posZ = tile.zCoord; - - int o=0; - - //Output slot - this.addSlotToContainer(new SlotOutput(inventory.player, this.craftMatrix, tile.inventoryCraftResult, 0, 136, 64)); - //Util Slots - this.addSlotToContainer(new SlotBlueprint(this.inventoryHolo, 1, 136, 28)); //Blueprint - this.addSlotToContainer(new SlotNoInput(this.inventoryHolo, 2, 154, 28)); //Hopper - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 3, 154, 64, false, false, 64)); //Parking - //Holo Slots - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 4, 154, 46, false, false, 1)); - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 5, 136, 46, false, false, 1)); - - for (int i=1; i<6; i++){ - this.slotHolo[o] = o+1; - o++; - } - - o=0; - - this.updateCraftingMatrix(); - - //Crafting Grid - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 3; ++var7) - { - this.addSlotToContainer(new Slot(this.craftMatrix, var7 + (var6 * 3), 82 + (var7 * 18), 28 + (var6 * 18))); - - /*if (this.inventoryCrafting.getStackInSlot(o) != null){ - this.craftMatrix.setInventorySlotContents(o, inventoryCrafting.getStackInSlot(o)); - this.inventoryCrafting.setInventorySlotContents(o, null); - } */ - this.slotCrafting[o] = o+6; - o++; - } - } - - o=0; - - //Storage Side - for (var6 = 0; var6 < 4; ++var6) - { - for (var7 = 0; var7 < 4; ++var7) - { - //Utils.LOG_WARNING("Adding slots at var:"+(var7 + var6 * 4)+" x:"+(8 + var7 * 18)+" y:"+(7 + var6 * 18)); - this.addSlotToContainer(new Slot(this.inventoryChest, var7 + (var6 * 4), 8 + (var7 * 18), 7 + (var6 * 18))); - this.slotStorage[o] = o+15; - o++; - } - } - - o=0; - - //Tool Slots - for (var6 = 0; var6 < 1; ++var6) - { - for (var7 = 0; var7 < 5; ++var7) - { - this.addSlotToContainer(new SlotGtToolElectric(this.inventoryTool, var7 + (var6 * 3), 82 + (var7 * 18), 8 + (var6 * 18), 3, false)); - this.slotTools[o] = o+31; - o++; - } - } - - //Player Inventory - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 9; ++var7) - { - this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); - } - } - - //Player Hotbar - for (var6 = 0; var6 < 9; ++var6) - { - this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); - } - - this.onCraftMatrixChanged(this.craftMatrix); - - } - - @Override - public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer){ - - if (!aPlayer.worldObj.isRemote){ - if ((aSlotIndex == 999) || (aSlotIndex == -999)){ - //Utils.LOG_WARNING("??? - "+aSlotIndex); - } - - if (aSlotIndex == this.slotOutput){ - Logger.WARNING("Player Clicked on the output slot"); - //TODO - } - - for (final int x : this.slotHolo){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the Holo Grid"); - if (x == 1){ - Logger.WARNING("Player Clicked Blueprint slot in the Holo Grid"); - } - else if (x == 2){ - Logger.WARNING("Player Clicked Right Arrow slot in the Holo Grid"); - if (this.inventoryHolo.getStackInSlot(1) != null){ - Logger.WARNING("Found an ItemStack."); - if (this.inventoryHolo.getStackInSlot(1).getItem() instanceof IItemBlueprint){ - Logger.WARNING("Found a blueprint."); - final ItemStack tempBlueprint = this.inventoryHolo.getStackInSlot(1); - final ItemBlueprint tempItemBlueprint = (ItemBlueprint) tempBlueprint.getItem(); - if ((this.inventoryHolo.getStackInSlot(0) != null) && !tempItemBlueprint.hasBlueprint(tempBlueprint)){ - Logger.WARNING("Output slot was not empty."); - Logger.WARNING("Trying to manipulate NBT data on the blueprint stack, then replace it with the new one."); - tempItemBlueprint.setBlueprint(this.inventoryHolo.getStackInSlot(1), this.craftMatrix, this.inventoryHolo.getStackInSlot(0)); - final ItemStack newTempBlueprint = ItemUtils.getSimpleStack(tempItemBlueprint); - this.inventoryHolo.setInventorySlotContents(1, newTempBlueprint); - Logger.WARNING(ItemUtils.getArrayStackNames(tempItemBlueprint.getBlueprint(newTempBlueprint))); - } - else { - if (tempItemBlueprint.hasBlueprint(tempBlueprint)){ - Logger.WARNING("Blueprint already holds a recipe."); - } - else { - Logger.WARNING("Output slot was empty."); - } - } - } - else { - Logger.WARNING("ItemStack found was not a blueprint."); - } - } - else { - Logger.WARNING("No ItemStack found in Blueprint slot."); - } - } - else if (x == 3){ - Logger.WARNING("Player Clicked Big [P] slot in the Holo Grid"); - } - else if (x == 4){ - Logger.WARNING("Player Clicked Transfer to Crafting Grid slot in the Holo Grid"); - } - else if (x == 5){ - Logger.WARNING("Player Clicked Transfer to Storage Grid slot in the Holo Grid"); - } - } - } - - for (final int x : this.slotCrafting){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the crafting Grid"); - } - } - for (final int x : this.slotStorage){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the storage Grid"); - } - } - for (final int x : this.slotTools){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the tool Grid"); - } - } - } - //Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the Grid"); - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - - private void updateCraftingMatrix() { - for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) { - this.craftMatrix.setInventorySlotContents(i, this.tile_entity.inventoryCrafting.getStackInSlot(i)); - } - } - - @Override - public void onCraftMatrixChanged(final IInventory iiventory) { - this.tile_entity.inventoryCraftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj)); - } - - @Override - public void onContainerClosed(final EntityPlayer par1EntityPlayer) - { - super.onContainerClosed(par1EntityPlayer); - this.saveCraftingMatrix(); - } - - private void saveCraftingMatrix() { - for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) { - this.tile_entity.inventoryCrafting.setInventorySlotContents(i, this.craftMatrix.getStackInSlot(i)); - } - } - - - - - /*@Override - public void onCraftMatrixChanged(IInventory par1IInventory){ - //Custom Recipe Handler - //craftResult.setInventorySlotContents(0, Workbench_CraftingHandler.getInstance().findMatchingRecipe(craftMatrix, worldObj)); - - //Vanilla CraftingManager - Utils.LOG_WARNING("checking crafting grid for a valid output."); - ItemStack temp = CraftingManager.getInstance().findMatchingRecipe(craftMatrix, worldObj); - if (temp != null){ - Utils.LOG_WARNING("Output found. "+temp.getDisplayName()+" x"+temp.stackSize); - craftResult.setInventorySlotContents(slotOutput, temp); - } - else { - Utils.LOG_WARNING("No Valid output found."); - craftResult.setInventorySlotContents(slotOutput, null); - } - }*/ - - /*@Override - public void onContainerClosed(EntityPlayer par1EntityPlayer) - { - for (int o=0; o= InOutputSlotNumber) && (par2 < InventoryOutSlotNumber)) - { - if (!this.mergeItemStack(var5, InventoryOutSlotNumber, FullSlotNumber, false)) - { - return null; - } - } - else if ((par2 >= InventoryOutSlotNumber) && (par2 < FullSlotNumber)) - { - if (!this.mergeItemStack(var5, InOutputSlotNumber, InventoryOutSlotNumber, false)) - { - return null; - } - } - else if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, false)) - { - return null; - } - - if (var5.stackSize == 0) - { - var4.putStack((ItemStack)null); - } - else - { - var4.onSlotChanged(); - } - - if (var5.stackSize == var3.stackSize) - { - return null; - } - - var4.onPickupFromSlot(par1EntityPlayer, var5); - } - - return var3; - } - - //Can merge Slot - @Override - public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { - return (p_94530_2_.inventory != this.tile_entity.inventoryCraftResult) && super.func_94530_a(p_94530_1_, p_94530_2_); - } - - -} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_Workbench.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_Workbench.java deleted file mode 100644 index 861c2ba6b6..0000000000 --- a/src/main/java/gtPlusPlus/core/gui/machine/GUI_Workbench.java +++ /dev/null @@ -1,81 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; - -import gtPlusPlus.core.container.Container_Workbench; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; - -@SideOnly(Side.CLIENT) -public class GUI_Workbench extends GuiContainer { - - private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/BronzeCraftingTable.png"); - - public boolean moveItemsToChest = false; - public boolean moveItemsToCrafting = false; - - public GUI_Workbench(final InventoryPlayer player_inventory, final TileEntityWorkbench tile){ - super(new Container_Workbench(player_inventory, tile)); - } - - - @Override - protected void drawGuiContainerForegroundLayer(final int i, final int j){ - //this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752); - //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); - - } - - - @Override - protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - this.mc.renderEngine.bindTexture(craftingTableGuiTextures); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } - - - //This method is called when the Gui is first called! - @Override - public void initGui() - { - //You have to add this line for the Gui to function properly! - super.initGui(); - - //The parameters of GuiButton are(id, x, y, width, height, text); - //this.buttonList.add(new GuiButton( 1, 367, 132, 18, 18, "X")); - //this.buttonList.add(new GuiButton( 2, 385, 132, 18, 18, "Y")); - //NOTE: the id always has to be different or else it might get called twice or never! - - //Add any other buttons here too! - } - - @Override - protected void actionPerformed(final GuiButton B) - { - //If the button id is different, or you have mrs buttons, create another if block for that too! - if(B.id == 1){ - System.out.println("Trying to empty crafting grid to the storage compartment."); - //moveItemsToChest = true; - ((Container_Workbench) this.inventorySlots).moveCraftingToChest(); - } - else if(B.id == 2){ - System.out.println("Trying to move items into the crafting grid."); - //moveItemsToCrafting = true; - ((Container_Workbench) this.inventorySlots).moveChestToCrafting(); - } - - - } - -} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java deleted file mode 100644 index 20183eb0b0..0000000000 --- a/src/main/java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java +++ /dev/null @@ -1,42 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; - -import gtPlusPlus.core.container.Container_WorkbenchAdvanced; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; - -@SideOnly(Side.CLIENT) -public class GUI_WorkbenchAdvanced extends GuiContainer { - - private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/AdvancedCraftingTable.png"); - - public GUI_WorkbenchAdvanced(final InventoryPlayer player_inventory, final TileEntityWorkbenchAdvanced tile){ - super(new Container_WorkbenchAdvanced(player_inventory, tile)); - } - - - @Override - protected void drawGuiContainerForegroundLayer(final int i, final int j){ - //this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752); - //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); - } - - - @Override - protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - this.mc.renderEngine.bindTexture(craftingTableGuiTextures); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } - -} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/handler/GuiHandler.java b/src/main/java/gtPlusPlus/core/handler/GuiHandler.java index 0567d6c5dd..1be3578ed0 100644 --- a/src/main/java/gtPlusPlus/core/handler/GuiHandler.java +++ b/src/main/java/gtPlusPlus/core/handler/GuiHandler.java @@ -5,7 +5,19 @@ import cpw.mods.fml.common.network.NetworkRegistry; import gtPlusPlus.GTplusplus; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.machine.Machine_SuperJukebox.TileEntitySuperJukebox; -import gtPlusPlus.core.container.*; +import gtPlusPlus.core.container.Container_BackpackBase; +import gtPlusPlus.core.container.Container_CircuitProgrammer; +import gtPlusPlus.core.container.Container_DecayablesChest; +import gtPlusPlus.core.container.Container_EggBox; +import gtPlusPlus.core.container.Container_FishTrap; +import gtPlusPlus.core.container.Container_Grindle; +import gtPlusPlus.core.container.Container_ModularityTable; +import gtPlusPlus.core.container.Container_PestKiller; +import gtPlusPlus.core.container.Container_ProjectTable; +import gtPlusPlus.core.container.Container_RoundRobinator; +import gtPlusPlus.core.container.Container_SuperJukebox; +import gtPlusPlus.core.container.Container_TradeTable; +import gtPlusPlus.core.container.Container_VolumetricFlaskSetter; import gtPlusPlus.core.container.box.LunchBoxContainer; import gtPlusPlus.core.container.box.MagicBagContainer; import gtPlusPlus.core.container.box.ToolBoxContainer; @@ -16,7 +28,17 @@ import gtPlusPlus.core.gui.item.GuiBaseGrindle; import gtPlusPlus.core.gui.item.box.LunchBoxGui; import gtPlusPlus.core.gui.item.box.MagicBagGui; import gtPlusPlus.core.gui.item.box.ToolBoxGui; -import gtPlusPlus.core.gui.machine.*; +import gtPlusPlus.core.gui.machine.GUI_CircuitProgrammer; +import gtPlusPlus.core.gui.machine.GUI_DecayablesChest; +import gtPlusPlus.core.gui.machine.GUI_EggBox; +import gtPlusPlus.core.gui.machine.GUI_FishTrap; +import gtPlusPlus.core.gui.machine.GUI_ModularityTable; +import gtPlusPlus.core.gui.machine.GUI_PestKiller; +import gtPlusPlus.core.gui.machine.GUI_ProjectTable; +import gtPlusPlus.core.gui.machine.GUI_RoundRobinator; +import gtPlusPlus.core.gui.machine.GUI_SuperJukebox; +import gtPlusPlus.core.gui.machine.GUI_TradeTable; +import gtPlusPlus.core.gui.machine.GUI_VolumetricFlaskSetter; import gtPlusPlus.core.interfaces.IGuiManager; import gtPlusPlus.core.inventories.BaseInventoryBackpack; import gtPlusPlus.core.inventories.BaseInventoryGrindle; @@ -24,14 +46,16 @@ import gtPlusPlus.core.inventories.box.LunchBoxInventory; import gtPlusPlus.core.inventories.box.MagicBagInventory; import gtPlusPlus.core.inventories.box.ToolBoxInventory; import gtPlusPlus.core.tileentities.base.TileEntityBase; -import gtPlusPlus.core.tileentities.general.*; +import gtPlusPlus.core.tileentities.general.TileEntityCircuitProgrammer; +import gtPlusPlus.core.tileentities.general.TileEntityDecayablesChest; +import gtPlusPlus.core.tileentities.general.TileEntityEggBox; +import gtPlusPlus.core.tileentities.general.TileEntityFishTrap; +import gtPlusPlus.core.tileentities.general.TileEntityVolumetricFlaskSetter; import gtPlusPlus.core.tileentities.machines.TileEntityModularityTable; import gtPlusPlus.core.tileentities.machines.TileEntityPestKiller; import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable; import gtPlusPlus.core.tileentities.machines.TileEntityRoundRobinator; import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChunkCoordinates; @@ -88,11 +112,10 @@ public class GuiHandler implements IGuiHandler { if (te != null) { if (ID == GUI4) { - return new Container_Workbench(player.inventory, (TileEntityWorkbench) te); + //return new Container_Workbench(player.inventory, (TileEntityWorkbench) te); } else if (ID == GUI5) { Logger.INFO("sad"); - return new Container_WorkbenchAdvanced(player.inventory, (TileEntityWorkbenchAdvanced) te); - + //return new Container_WorkbenchAdvanced(player.inventory, (TileEntityWorkbenchAdvanced) te); } else if (ID == GUI6) { return new Container_FishTrap(player.inventory, (TileEntityFishTrap) te); } else if (ID == GUI7) { @@ -154,10 +177,10 @@ public class GuiHandler implements IGuiHandler { if (te != null) { if (ID == GUI4) { - return new GUI_Workbench(player.inventory, (TileEntityWorkbench) te); + //return new GUI_Workbench(player.inventory, (TileEntityWorkbench) te); } else if (ID == GUI5) { Logger.INFO("sad"); - return new GUI_WorkbenchAdvanced(player.inventory, (TileEntityWorkbenchAdvanced) te); + //return new GUI_WorkbenchAdvanced(player.inventory, (TileEntityWorkbenchAdvanced) te); } else if (ID == GUI6) { return new GUI_FishTrap(player.inventory, (TileEntityFishTrap) te); } else if (ID == GUI7) { diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemBlueprint.java b/src/main/java/gtPlusPlus/core/item/general/ItemBlueprint.java index eded4e2585..5df17979a9 100644 --- a/src/main/java/gtPlusPlus/core/item/general/ItemBlueprint.java +++ b/src/main/java/gtPlusPlus/core/item/general/ItemBlueprint.java @@ -71,7 +71,7 @@ public class ItemBlueprint extends Item implements IItemBlueprint{ @Override public String getItemStackDisplayName(final ItemStack p_77653_1_) { - return "Blueprint [I am useless]"; + return "Blueprint"; } @Override @@ -103,7 +103,7 @@ public class ItemBlueprint extends Item implements IItemBlueprint{ ItemStack[] blueprint = new ItemStack[9]; if (itemStack.hasTagCompound()){ final NBTTagCompound nbt = itemStack.getTagCompound(); - final NBTTagList list = nbt.getTagList("Items", 10); + final NBTTagList list = nbt.getTagList("Inventory", 10); blueprint = new ItemStack[INV_SIZE]; for(int i = 0;i= 0) && (slot < this.inventoryCrafting.getSizeInventory())) { - this.inventoryCrafting.setInventorySlotContents(slot, ItemStack.loadItemStackFromNBT(tagCompound)); - } - }*/ - - - // Read craftingResult from NBT - final NBTTagCompound tagCraftResult = nbt.getCompoundTag("CraftingResult"); - this.inventoryCraftResult.setInventorySlotContents(0, ItemStack.loadItemStackFromNBT(tagCraftResult)); - - } - - @Override - public List getNetworkedFields(){ - final List ret = new Vector(2); - ret.add("facing"); - return ret; - } - - - @Override - public boolean wrenchCanSetFacing(final EntityPlayer entityPlayer, final int side) - { - return false; - } - - private short facing = 0; - public short prevFacing = 0; - - @Override - public void setFacing(final short facing1) - { - this.facing = facing1; - if (this.prevFacing != facing1) { - IC2.network.get().updateTileEntityField(this, "facing"); - } - this.prevFacing = facing1; - } - - @Override - public short getFacing() - { - return this.facing; - } - - - @Override - public boolean wrenchCanRemove(final EntityPlayer entityPlayer) - { - return true; - } - - @Override - public float getWrenchDropRate() - { - return 1.0F; - } - - @Override - public ItemStack getWrenchDrop(final EntityPlayer entityPlayer) - { - return new ItemStack(this.worldObj.getBlock(this.xCoord, this.yCoord, this.zCoord), 1, this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord)); - } - - @Override - public void onNetworkUpdate(final String field) { - - this.prevFacing = this.facing; - - } - - - -} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbenchAdvanced.java b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbenchAdvanced.java deleted file mode 100644 index 264323388f..0000000000 --- a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbenchAdvanced.java +++ /dev/null @@ -1,245 +0,0 @@ -package gtPlusPlus.core.tileentities.machines; - -import java.util.List; -import java.util.Vector; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.InventoryCraftResult; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.tileentity.TileEntity; - -import gtPlusPlus.core.inventories.*; -import ic2.api.energy.event.EnergyTileLoadEvent; -import ic2.api.energy.event.EnergyTileUnloadEvent; -import ic2.api.energy.tile.IEnergySink; -import ic2.api.network.INetworkDataProvider; -import ic2.api.network.INetworkUpdateListener; -import ic2.api.tile.IWrenchable; -import ic2.core.IC2; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.ForgeDirection; - -public class TileEntityWorkbenchAdvanced extends TileEntity implements IEnergySink, INetworkDataProvider, INetworkUpdateListener, IWrenchable{ - - //Credit to NovaViper in http://www.minecraftforge.net/forum/index.php?topic=26439.0 - Helped me restructure my Inventory system and now the crafting matrix works better. - - public InventoryWorkbenchChest inventoryChest; - public InventoryWorkbenchToolsElectric inventoryTool; - public InventoryWorkbenchHoloSlots inventoryHolo; - public InventoryWorkbenchHoloCrafting inventoryCrafting; - - public IInventory inventoryCraftResult = new InventoryCraftResult(); - - //Wrench Code - private short facing = 0; - public short prevFacing = 0; - - //E-Net Code - public double energy = 0.0D; - public int maxEnergy; - private boolean addedToEnergyNet = false; - private int tier; - private float guiChargeLevel; - - - public TileEntityWorkbenchAdvanced(final int maxenergy, final int tier1){ - this.inventoryTool = new InventoryWorkbenchToolsElectric();//number of slots - without product slot - this.inventoryChest = new InventoryWorkbenchChest();//number of slots - without product slot - this.inventoryHolo = new InventoryWorkbenchHoloSlots(); - this.inventoryCrafting = new InventoryWorkbenchHoloCrafting(); - this.canUpdate(); - - //Electric Stats - this.maxEnergy = maxenergy; - this.tier = tier1; - - } - - public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) - { - if(!nbt.hasKey(tag)) - { - nbt.setTag(tag, new NBTTagCompound()); - } - return nbt.getCompoundTag(tag); - } - - @Override - public void writeToNBT(final NBTTagCompound nbt) - { - super.writeToNBT(nbt); - nbt.setDouble("energy", this.energy); - nbt.setShort("facing", this.facing); - - this.inventoryChest.writeToNBT(this.getTag(nbt, "ContentsChest")); - this.inventoryTool.writeToNBT(this.getTag(nbt, "ContentsTools")); - //inventoryCrafting.writeToNBT(getTag(nbt, "ContentsCrafting")); - this.inventoryHolo.writeToNBT(this.getTag(nbt, "ContentsHolo")); - - // Write Crafting Matrix to NBT - final NBTTagList craftingTag = new NBTTagList(); - for (int currentIndex = 0; currentIndex < this.inventoryCrafting.getSizeInventory(); ++currentIndex) { - if (this.inventoryCrafting.getStackInSlot(currentIndex) != null) { - final NBTTagCompound tagCompound = new NBTTagCompound(); - tagCompound.setByte("Slot", (byte) currentIndex); - this.inventoryCrafting.getStackInSlot(currentIndex).writeToNBT(tagCompound); - craftingTag.appendTag(tagCompound); - } - } - - nbt.setTag("CraftingMatrix", craftingTag); - // Write craftingResult to NBT - if (this.inventoryCraftResult.getStackInSlot(0) != null) { - nbt.setTag("CraftingResult", this.inventoryCraftResult.getStackInSlot(0).writeToNBT(new NBTTagCompound())); - } - - } - - @Override - public void readFromNBT(final NBTTagCompound nbt) - { - super.readFromNBT(nbt); - this.energy = nbt.getDouble("energy"); - - this.prevFacing = (this.facing = nbt.getShort("facing")); - - this.inventoryChest.readFromNBT(nbt.getCompoundTag("ContentsChest")); - this.inventoryTool.readFromNBT(nbt.getCompoundTag("ContentsTools")); - //inventoryCrafting.readFromNBT(nbt.getCompoundTag("ContentsCrafting")); - this.inventoryHolo.readFromNBT(nbt.getCompoundTag("ContentsHolo")); - - // Read in the Crafting Matrix from NBT - final NBTTagList craftingTag = nbt.getTagList("CraftingMatrix", 10); - this.inventoryCrafting = new InventoryWorkbenchHoloCrafting(); //TODO: magic number - for (int i = 0; i < craftingTag.tagCount(); ++i) { - final NBTTagCompound tagCompound = craftingTag.getCompoundTagAt(i); - final byte slot = tagCompound.getByte("Slot"); - if ((slot >= 0) && (slot < this.inventoryCrafting.getSizeInventory())) { - this.inventoryCrafting.setInventorySlotContents(slot, ItemStack.loadItemStackFromNBT(tagCompound)); - } - } - - - // Read craftingResult from NBT - final NBTTagCompound tagCraftResult = nbt.getCompoundTag("CraftingResult"); - this.inventoryCraftResult.setInventorySlotContents(0, ItemStack.loadItemStackFromNBT(tagCraftResult)); - - } - - @Override - public boolean acceptsEnergyFrom(final TileEntity emitter, final ForgeDirection direction) - { - return true; - } - - @Override - public double getDemandedEnergy() - { - return this.maxEnergy - this.energy; - } - - @Override - public int getSinkTier() - { - return this.tier; - } - - @Override - public double injectEnergy(final ForgeDirection directionFrom, final double amount, final double voltage) - { - if (this.energy >= this.maxEnergy) { - return amount; - } - this.energy += amount; - return 0.0D; - } - - public final float getChargeLevel() - { - return this.guiChargeLevel; - } - - public void setTier(final int tier1) - { - if (this.tier == tier1) { - return; - } - final boolean addedToENet = this.addedToEnergyNet; - if (addedToENet) - { - MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this)); - this.addedToEnergyNet = false; - } - this.tier = tier1; - - for (int i=0; i getNetworkedFields(){ - final List ret = new Vector(2); - ret.add("facing"); - return ret; - } - - - @Override - public boolean wrenchCanSetFacing(final EntityPlayer entityPlayer, final int side) - { - return false; - } - - @Override - public void setFacing(final short facing1) - { - this.facing = facing1; - if (this.prevFacing != facing1) { - IC2.network.get().updateTileEntityField(this, "facing"); - } - this.prevFacing = facing1; - } - - @Override - public short getFacing() - { - return this.facing; - } - - - @Override - public boolean wrenchCanRemove(final EntityPlayer entityPlayer) - { - return true; - } - - @Override - public float getWrenchDropRate() - { - return 1.0F; - } - - @Override - public ItemStack getWrenchDrop(final EntityPlayer entityPlayer) - { - return new ItemStack(this.worldObj.getBlock(this.xCoord, this.yCoord, this.zCoord), 1, this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord)); - } - - @Override - public void onNetworkUpdate(final String field) { - - this.prevFacing = this.facing; - - } - -} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_AdvancedWorkbench.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_AdvancedWorkbench.java new file mode 100644 index 0000000000..d7ec19a9ac --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_AdvancedWorkbench.java @@ -0,0 +1,124 @@ +package gtPlusPlus.xmod.gregtech.api.gui.workbench; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.gui.GT_Slot_Holo; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.slots.SlotBlueprint; +import gtPlusPlus.core.slots.SlotElectric; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_AdvancedCraftingTable; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class GT_Container_AdvancedWorkbench extends GT_ContainerMetaTile_Machine { + + public GT_Container_AdvancedWorkbench(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new Slot(mTileEntity, 0, 8, 8)); + addSlotToContainer(new Slot(mTileEntity, 1, 26, 8)); + addSlotToContainer(new Slot(mTileEntity, 2, 44, 8)); + addSlotToContainer(new Slot(mTileEntity, 3, 62, 8)); + addSlotToContainer(new Slot(mTileEntity, 4, 8, 26)); + addSlotToContainer(new Slot(mTileEntity, 5, 26, 26)); + addSlotToContainer(new Slot(mTileEntity, 6, 44, 26)); + addSlotToContainer(new Slot(mTileEntity, 7, 62, 26)); + addSlotToContainer(new Slot(mTileEntity, 8, 8, 44)); + addSlotToContainer(new Slot(mTileEntity, 9, 26, 44)); + addSlotToContainer(new Slot(mTileEntity, 10, 44, 44)); + addSlotToContainer(new Slot(mTileEntity, 11, 62, 44)); + addSlotToContainer(new Slot(mTileEntity, 12, 8, 62)); + addSlotToContainer(new Slot(mTileEntity, 13, 26, 62)); + addSlotToContainer(new Slot(mTileEntity, 14, 44, 62)); + addSlotToContainer(new Slot(mTileEntity, 15, 62, 62)); + + addSlotToContainer(new SlotElectric(mTileEntity, 16, 82, 8)); + addSlotToContainer(new SlotElectric(mTileEntity, 17, 100, 8)); + addSlotToContainer(new SlotElectric(mTileEntity, 18, 118, 8)); + addSlotToContainer(new SlotElectric(mTileEntity, 19, 136, 8)); + addSlotToContainer(new SlotElectric(mTileEntity, 20, 154, 8)); + + addSlotToContainer(new Slot(mTileEntity, 21, 82, 28)); + addSlotToContainer(new Slot(mTileEntity, 22, 100, 28)); + addSlotToContainer(new Slot(mTileEntity, 23, 118, 28)); + addSlotToContainer(new Slot(mTileEntity, 24, 82, 46)); + addSlotToContainer(new Slot(mTileEntity, 25, 100, 46)); + addSlotToContainer(new Slot(mTileEntity, 26, 118, 46)); + addSlotToContainer(new Slot(mTileEntity, 27, 82, 64)); + addSlotToContainer(new Slot(mTileEntity, 28, 100, 64)); + addSlotToContainer(new Slot(mTileEntity, 29, 118, 64)); + + addSlotToContainer(new Slot(mTileEntity, 33, 154, 28)); + addSlotToContainer(new Slot(mTileEntity, 34, 154, 64)); + + addSlotToContainer(new SlotBlueprint(mTileEntity, 30, 136, 28)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 31, 136, 64, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 32, 154, 46, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 32, 136, 46, false, false, 1)); + + } + + public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { + Logger.INFO("Clicked on slot "+aSlotIndex); + if (aSlotIndex < 21 || aSlotIndex > 35) return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + if (mTileEntity == null || mTileEntity.getMetaTileEntity() == null) return null; + try { + ItemStack tStack = ((Slot)inventorySlots.get(aSlotIndex)).getStack(); + if (tStack != null && tStack.stackSize <= 0 && !GT_Utility.areStacksEqual(tStack, aPlayer.inventory.getItemStack())) { + return null; + } + if (aSlotIndex == 32) { + if (aMouseclick == 0 && aShifthold == 1) { + ((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).setBluePrint(null); + return null; + } + } else if (aSlotIndex == 33) { + ItemStack tStack2, tCraftedStack = ((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).getCraftingOutput(); + if (tCraftedStack != null) { + if (aShifthold == 1) { + for (byte i = 0; i < aPlayer.inventory.mainInventory.length; i++) { + for (byte j = 0; j < tCraftedStack.getMaxStackSize() / tCraftedStack.stackSize && ((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).canDoCraftingOutput(); j++) { + if (!GT_Utility.areStacksEqual(tStack2 = ((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).getCraftingOutput(), tCraftedStack) || tStack.stackSize != tStack2.stackSize) return aPlayer.inventory.getItemStack(); + aPlayer.inventory.mainInventory[i] = (((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).consumeMaterials(aPlayer, aPlayer.inventory.mainInventory[i])); + } + } + } else { + if (aMouseclick == 0) { + if (((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).canDoCraftingOutput()) aPlayer.inventory.setItemStack(((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).consumeMaterials(aPlayer, aPlayer.inventory.getItemStack())); + return aPlayer.inventory.getItemStack(); + } else { + for (int i = 0; i < tCraftedStack.getMaxStackSize() / tCraftedStack.stackSize && ((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).canDoCraftingOutput(); i++) { + if (!GT_Utility.areStacksEqual(tStack2 = ((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).getCraftingOutput(), tCraftedStack) || tStack.stackSize != tStack2.stackSize) return aPlayer.inventory.getItemStack(); + aPlayer.inventory.setItemStack(((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).consumeMaterials(aPlayer, aPlayer.inventory.getItemStack())); + } + return aPlayer.inventory.getItemStack(); + } + } + } + return null; + } else if (aSlotIndex == 34) { + ((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).mFlushMode = true; + return null; + } else if (aSlotIndex == 35) { + ((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).sortIntoTheInputSlots(); + return null; + } + } catch(Throwable e) { + //GT_Log.log.catching(e); + } + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + public int getSlotCount() { + return 33; + } + + public int getShiftClickSlotCount() { + return 21; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_BronzeWorkbench.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_BronzeWorkbench.java new file mode 100644 index 0000000000..f7cfd31e5d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_BronzeWorkbench.java @@ -0,0 +1,120 @@ +package gtPlusPlus.xmod.gregtech.api.gui.workbench; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.gui.GT_Slot_Holo; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_BronzeCraftingTable; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class GT_Container_BronzeWorkbench extends GT_ContainerMetaTile_Machine { + + public GT_Container_BronzeWorkbench(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new Slot(mTileEntity, 0, 8, 8)); + addSlotToContainer(new Slot(mTileEntity, 1, 26, 8)); + addSlotToContainer(new Slot(mTileEntity, 2, 44, 8)); + addSlotToContainer(new Slot(mTileEntity, 3, 62, 8)); + addSlotToContainer(new Slot(mTileEntity, 4, 8, 26)); + addSlotToContainer(new Slot(mTileEntity, 5, 26, 26)); + addSlotToContainer(new Slot(mTileEntity, 6, 44, 26)); + addSlotToContainer(new Slot(mTileEntity, 7, 62, 26)); + addSlotToContainer(new Slot(mTileEntity, 8, 8, 44)); + addSlotToContainer(new Slot(mTileEntity, 9, 26, 44)); + addSlotToContainer(new Slot(mTileEntity, 10, 44, 44)); + addSlotToContainer(new Slot(mTileEntity, 11, 62, 44)); + addSlotToContainer(new Slot(mTileEntity, 12, 8, 62)); + addSlotToContainer(new Slot(mTileEntity, 13, 26, 62)); + addSlotToContainer(new Slot(mTileEntity, 14, 44, 62)); + addSlotToContainer(new Slot(mTileEntity, 15, 62, 62)); + + addSlotToContainer(new Slot(mTileEntity, 16, 82, 8)); + addSlotToContainer(new Slot(mTileEntity, 17, 100, 8)); + addSlotToContainer(new Slot(mTileEntity, 18, 118, 8)); + addSlotToContainer(new Slot(mTileEntity, 19, 136, 8)); + addSlotToContainer(new Slot(mTileEntity, 20, 154, 8)); + + addSlotToContainer(new Slot(mTileEntity, 21, 82, 28)); + addSlotToContainer(new Slot(mTileEntity, 22, 100, 28)); + addSlotToContainer(new Slot(mTileEntity, 23, 118, 28)); + addSlotToContainer(new Slot(mTileEntity, 24, 82, 46)); + addSlotToContainer(new Slot(mTileEntity, 25, 100, 46)); + addSlotToContainer(new Slot(mTileEntity, 26, 118, 46)); + addSlotToContainer(new Slot(mTileEntity, 27, 82, 64)); + addSlotToContainer(new Slot(mTileEntity, 28, 100, 64)); + addSlotToContainer(new Slot(mTileEntity, 29, 118, 64)); + + addSlotToContainer(new Slot(mTileEntity, 33, 154, 28)); + addSlotToContainer(new Slot(mTileEntity, 34, 154, 64)); + + addSlotToContainer(new Slot(mTileEntity, 30, 136, 28)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 31, 136, 64, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 32, 154, 46, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 32, 136, 46, false, false, 1)); + + } + + public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { + if (aSlotIndex < 21 || aSlotIndex > 35) return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + if (mTileEntity == null || mTileEntity.getMetaTileEntity() == null) return null; + try { + ItemStack tStack = ((Slot)inventorySlots.get(aSlotIndex)).getStack(); + if (tStack != null && tStack.stackSize <= 0 && !GT_Utility.areStacksEqual(tStack, aPlayer.inventory.getItemStack())) { + return null; + } + if (aSlotIndex == 32) { + if (aMouseclick == 0 && aShifthold == 1) { + ((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).setBluePrint(null); + return null; + } + } else if (aSlotIndex == 33) { + ItemStack tStack2, tCraftedStack = ((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).getCraftingOutput(); + if (tCraftedStack != null) { + if (aShifthold == 1) { + for (byte i = 0; i < aPlayer.inventory.mainInventory.length; i++) { + for (byte j = 0; j < tCraftedStack.getMaxStackSize() / tCraftedStack.stackSize && ((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).canDoCraftingOutput(); j++) { + if (!GT_Utility.areStacksEqual(tStack2 = ((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).getCraftingOutput(), tCraftedStack) || tStack.stackSize != tStack2.stackSize) return aPlayer.inventory.getItemStack(); + aPlayer.inventory.mainInventory[i] = (((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).consumeMaterials(aPlayer, aPlayer.inventory.mainInventory[i])); + } + } + } else { + if (aMouseclick == 0) { + if (((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).canDoCraftingOutput()) aPlayer.inventory.setItemStack(((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).consumeMaterials(aPlayer, aPlayer.inventory.getItemStack())); + return aPlayer.inventory.getItemStack(); + } else { + for (int i = 0; i < tCraftedStack.getMaxStackSize() / tCraftedStack.stackSize && ((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).canDoCraftingOutput(); i++) { + if (!GT_Utility.areStacksEqual(tStack2 = ((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).getCraftingOutput(), tCraftedStack) || tStack.stackSize != tStack2.stackSize) return aPlayer.inventory.getItemStack(); + aPlayer.inventory.setItemStack(((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).consumeMaterials(aPlayer, aPlayer.inventory.getItemStack())); + } + return aPlayer.inventory.getItemStack(); + } + } + } + return null; + } else if (aSlotIndex == 34) { + ((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).mFlushMode = true; + return null; + } else if (aSlotIndex == 35) { + ((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).sortIntoTheInputSlots(); + return null; + } + } catch(Throwable e) { + //GT_Log.log.catching(e); + } + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + public int getSlotCount() { + return 33; + } + + public int getShiftClickSlotCount() { + return 21; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_AdvancedWorkbench.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_AdvancedWorkbench.java new file mode 100644 index 0000000000..fc3041f553 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_AdvancedWorkbench.java @@ -0,0 +1,84 @@ +package gtPlusPlus.xmod.gregtech.api.gui.workbench; + +import java.util.ArrayList; +import java.util.List; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.sys.KeyboardUtils; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_GUIContainer_AdvancedWorkbench extends GT_GUIContainerMetaTile_Machine { + + private final String mLocalName; + + public GT_GUIContainer_AdvancedWorkbench(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aLocalName) { + super(new GT_Container_AdvancedWorkbench(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + "AdvancedCraftingTable.png"); + mLocalName = aLocalName; + } + + public GT_GUIContainer_AdvancedWorkbench(GT_ContainerMetaTile_Machine aContainer, String aLocalName, String aResource) { + super(aContainer, aResource); + mLocalName = aLocalName; + } + + @Override + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + //fontRendererObj.drawString(mLocalName, 8, 4, 4210752); + this.drawTooltip(par1, par2); + } + + private void drawTooltip(final int x2, final int y2) { + final int xStart = (this.width - this.xSize) / 2; + final int yStart = (this.height - this.ySize) / 2; + final int x3 = x2 - xStart; + final int y3 = y2 - yStart + 5; + final List list = new ArrayList(); + //154 - 172 + + if (KeyboardUtils.isShiftKeyDown()) { + if (y3 >= 30 && y3 <= 49) { + if (x3 >= 135 && x3 <= 154) { + list.add("Blueprint Slot"); + list.add("Shift+Lmb Sets to crafting output"); + } + if (x3 >= 153 && x3 <= 170) { + list.add("Extraction Slot"); + list.add("Things can always be pulled from here"); + } + } + if (y3 >= 50 && y3 <= 67) { + if (x3 >= 135 && x3 <= 152) { + list.add("Flush"); + list.add("Empty crafting grid back to storage"); + } + if (x3 >= 153 && x3 <= 170) { + list.add("Automation"); + list.add("Allows output while"); + list.add("crafting grid is full"); + } + } + if (y3 >= 68 && y3 <= 85){ + if (x3 >= 135 && x3 <= 152) { + list.add("Output Slot"); + } + if (x3 >= 153 && x3 <= 170) { + list.add("Free Parking"); + } + } + } + if (!list.isEmpty()) { + this.drawHoveringText(list, x3, y3, this.fontRendererObj); + } + } + + @Override + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + int x = (width - xSize) / 2; + int y = (height - ySize) / 2; + drawTexturedModalRect(x, y, 0, 0, xSize, ySize); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_BronzeWorkbench.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_BronzeWorkbench.java new file mode 100644 index 0000000000..178c9241f1 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_BronzeWorkbench.java @@ -0,0 +1,13 @@ +package gtPlusPlus.xmod.gregtech.api.gui.workbench; + +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_GUIContainer_BronzeWorkbench extends GT_GUIContainer_AdvancedWorkbench { + + public GT_GUIContainer_BronzeWorkbench(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aLocalName) { + super(new GT_Container_BronzeWorkbench(aInventoryPlayer, aTileEntity), aLocalName, CORE.RES_PATH_GUI + "BronzeCraftingTable.png"); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index 2fa63e4568..7653224fd2 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -402,10 +402,17 @@ public class TexturesGtBlock { public static final CustomIcon Overlay_FluidReactor_Top_Active = new CustomIcon("TileEntities/FluidReactor/OVERLAY_TOP_ACTIVE"); //Crafting Overlays - private static final CustomIcon Internal_Overlay_Crafting_Bronze = new CustomIcon("TileEntities/bronze_top_crafting"); - public static final CustomIcon Overlay_Crafting_Bronze = Internal_Overlay_Crafting_Bronze; - private static final CustomIcon Internal_Overlay_Crafting_Steel = new CustomIcon("TileEntities/cover_crafting"); - public static final CustomIcon Overlay_Crafting_Steel = Internal_Overlay_Crafting_Steel; + public static final CustomIcon Overlay_Crafting_Bronze = new CustomIcon("TileEntities/bronze_top_crafting"); + public static final CustomIcon Overlay_Crafting_Steel = new CustomIcon("TileEntities/cover_crafting"); + + public static final CustomIcon Casing_Workbench_Crafting_Overlay = new CustomIcon("TileEntities/gt4/bronze_top_crafting"); + public static final CustomIcon Casing_Workbench_Top = new CustomIcon("TileEntities/gt4/bronze_top"); + public static final CustomIcon Casing_Workbench_Side = new CustomIcon("TileEntities/gt4/bronze_side"); + public static final CustomIcon Casing_Workbench_Bottom = new CustomIcon("TileEntities/gt4/bronze_bottom"); + public static final CustomIcon Casing_Adv_Workbench_Crafting_Overlay = new CustomIcon("TileEntities/gt4/machine_top_crafting"); + public static final CustomIcon Casing_Adv_Workbench_Top = new CustomIcon("TileEntities/gt4/machine_top"); + public static final CustomIcon Casing_Adv_Workbench_Side = new CustomIcon("TileEntities/gt4/machine_side"); + public static final CustomIcon Casing_Adv_Workbench_Bottom = new CustomIcon("TileEntities/gt4/machine_bottom"); //Covers private static final CustomIcon Internal_Overlay_Overflow_Valve = new CustomIcon("iconsets/OVERLAY_OVERFLOW_VALVE"); @@ -443,7 +450,7 @@ public class TexturesGtBlock { // Lapo Orb Hatch public static final CustomIcon Overlay_Hatch_Lapo_Orb = new CustomIcon("iconsets/OVERLAY_LAPO"); // Data Orb Hatch - public static final CustomIcon Overlay_Hatch_Data_Orb = new CustomIcon("iconsets/OVERYLAY_DATA_ORB"); + public static final CustomIcon Overlay_Hatch_Data_Orb = new CustomIcon("iconsets/OVERLAY_DATA_ORB"); // RTG Hatch private static final CustomIcon Internal_Overlay_Hatch_RTG_Off = new CustomIcon("iconsets/OVERLAY_ENERGY_RTG_OFF"); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java new file mode 100644 index 0000000000..92190521cd --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java @@ -0,0 +1,163 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.steam; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.GregTech_API.sBlockCasings1; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Steam_BusInput; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Steam_BusOutput; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GT_MetaTileEntity_Hatch_CustomFluidBase; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_SteamMultiBase; +import net.minecraft.item.ItemStack; + +public class GregtechMetaTileEntity_SteamCompressor extends GregtechMeta_SteamMultiBase { + + private String mCasingName = "Bronze Plated Bricks"; + private IStructureDefinition STRUCTURE_DEFINITION = null; + private int mCasing; + + public GregtechMetaTileEntity_SteamCompressor(String aName) { + super(aName); + } + + public GregtechMetaTileEntity_SteamCompressor(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity arg0) { + return new GregtechMetaTileEntity_SteamCompressor(this.mName); + } + + @Override + protected GT_RenderedTexture getFrontOverlay() { + return new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR); + } + + @Override + protected GT_RenderedTexture getFrontOverlayActive() { + return new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR_ACTIVE); + } + + @Override + public String getMachineType() { + return "Compressor"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Steam Macerator") + .addInfo("Macerates " + getMaxParallelRecipes() + " ores at a time") + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front center") + .addCasingInfo(mCasingName, 14) + .addStructureHint("Input Bus (Steam)", 1) + .addStructureHint("Output Bus (Steam)", 1) + .addStructureHint("Steam Hatch", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC", "CCC"}, + {"C~C", "C-C", "C-C", "CCC"}, + {"CCC", "CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_SteamCompressor::addSteamMultiList, 10, 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + sBlockCasings1, 10 + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + public final boolean addSteamMultiList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_CustomFluidBase && aMetaTileEntity.getBaseMetaTileEntity().getMetaTileID() == 31040){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusInput){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusOutput){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName, stackSize, hintsOnly, 1, 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + fixAllMaintenanceIssue(); + return checkPiece(mName, 1, 1, 0) && mCasing >= 14; + } + + @Override + public int getMaxParallelRecipes() { + return 8; + } + + + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return GT_Recipe.GT_Recipe_Map.sCompressorRecipes; + } + + @Override + public ItemStack[] getOutputItems(GT_Recipe aRecipe) { + // Collect output item types + ItemStack[] tOutputItems = new ItemStack[1]; + for (int h = 0; h < 1; h++) { + if (aRecipe.getOutput(h) != null) { + tOutputItems[h] = aRecipe.getOutput(h).copy(); + tOutputItems[h].stackSize = 0; + } + } + return tOutputItems; + } + + @Override + public int getOutputCount(ItemStack[] aOutputs) { + return 1; + } + + + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_AdvancedCraftingTable.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_AdvancedCraftingTable.java new file mode 100644 index 0000000000..b5aa916e54 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_AdvancedCraftingTable.java @@ -0,0 +1,550 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.storage; + +import java.util.ArrayList; + +import gregtech.api.enums.GT_Values; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.item.general.ItemBlueprint; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.xmod.gregtech.api.gui.workbench.GT_Container_AdvancedWorkbench; +import gtPlusPlus.xmod.gregtech.api.gui.workbench.GT_GUIContainer_AdvancedWorkbench; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +public class GT_MetaTileEntity_AdvancedCraftingTable extends GT_MetaTileEntity_BasicTank { + + public boolean mFlushMode = false; + + protected String mLocalName; + + public GT_MetaTileEntity_AdvancedCraftingTable(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription) { + super(aID, aName, aNameRegional, aTier, 35, aDescription); + mLocalName = aNameRegional; + } + + public GT_MetaTileEntity_AdvancedCraftingTable(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { + super(aName, aTier, 35, aDescription, aTextures); + } + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_AdvancedWorkbench(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_AdvancedWorkbench(aPlayerInventory, aBaseMetaTileEntity, mLocalName); + } + + @Override + public boolean isTransformerUpgradable() { + return true; + } + @Override + public boolean isSimpleMachine() { + return true; + } + @Override + public boolean isValidSlot(int aIndex) { + return aIndex < 31 || aIndex > 32; + } + @Override + public boolean isFacingValid(byte aFacing) { + return true; + } + @Override + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + @Override + public boolean isEnetInput() { + return isElectric(); + } + @Override + public boolean isInputFacing(byte aSide) { + return true; + } + @Override + public long maxEUInput() { + return isElectric() ? GT_Values.V[3] : 0; + } + @Override + public long maxEUStore() { + return isElectric() ? GT_Values.V[3] * 1024 : 0; + } + + @Override + public boolean isElectric() { + return isAdvanced(); + } + + @Override + public boolean isPneumatic() { + return false; + } + + @Override + public boolean isSteampowered() { + return false; + } + + @Override + public long maxAmperesIn() { + return isElectric() ? 2 : 0; + } + + @Override + public long getMinimumStoredEU() { + return isElectric() ? GT_Values.V[3] * 2 : 0; + } + + @Override + public int getSizeInventory() { + return 35; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_AdvancedCraftingTable(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + @Override + public boolean doesFillContainers() { + return false; + } + @Override + public boolean doesEmptyContainers() { + return false; + } + @Override + public boolean canTankBeFilled() { + return true; + } + @Override + public boolean canTankBeEmptied() { + return true; + } + @Override + public boolean displaysItemStack() { + return false; + } + @Override + public boolean displaysStackSize() { + return false; + } + + public void sortIntoTheInputSlots() { + for (byte i = 21; i < 30; i++) + if (mInventory[i] != null) { + if (mInventory[i].stackSize == 0) { + mInventory[i] = null; + } + if (mInventory[i] != null) + for (byte j = 0; j < 16; j++) { + if (GT_Utility.areStacksEqual( + mInventory[i], mInventory[j] + )) { + GT_Utility.moveStackFromSlotAToSlotB( + getBaseMetaTileEntity(), getBaseMetaTileEntity(), i, j, (byte) 64, (byte) 1, (byte) 64, (byte) 1 + ); + } + } + if (mInventory[i] != null) + for (byte j = 0; j < 16; j++) { + if (mInventory[j] == null) { + GT_Utility.moveStackFromSlotAToSlotB( + getBaseMetaTileEntity(), getBaseMetaTileEntity(), i, j, (byte) 64, (byte) 1, (byte) 64, (byte) 1 + ); + } + } + } + } + + private void fillLiquidContainers() { + for (byte i = 16; i < 21 && mFluid != null; i++) { + ItemStack tOutput = GT_Utility.fillFluidContainer(mFluid, mInventory[i], false, true); + if (tOutput != null) { + if (mInventory[i].stackSize == 1) { + mFluid.amount -= GT_Utility.getFluidForFilledItem( + tOutput, true + ).amount * tOutput.stackSize; + mInventory[i] = tOutput; + } + else + for (byte j = 16; j < 21; j++) { + if (mInventory[j] == null || (GT_Utility.areStacksEqual( + tOutput, mInventory[j] + ) && mInventory[j].stackSize + + tOutput.stackSize <= tOutput.getMaxStackSize())) { + mFluid.amount -= GT_Utility.getFluidForFilledItem( + tOutput, true + ).amount * tOutput.stackSize; + getBaseMetaTileEntity().decrStackSize(i, 1); + if (mInventory[j] == null) { + mInventory[j] = tOutput; + } + else { + mInventory[j].stackSize++; + } + break; + } + } + if (mFluid != null && mFluid.amount <= 0) + mFluid = null; + } + } + if (mFluid != null && mFluid.amount <= 0) + mFluid = null; + } + + public void setBluePrint(ItemStack aStack) { + if (aStack == null) { + aStack = mInventory[30]; + Logger.INFO("Using Slot 30 supply."); + } + if (mInventory[31] == null || aStack == null || aStack.getItem() == null + || aStack.getItemDamage() != 0 || aStack.stackSize != 1 + || !(aStack.getItem() instanceof ItemBlueprint)) { + try { + Logger.INFO( + "Could not set Blueprint. Slot 31: " + + (mInventory[31] != null ? mInventory[31].getDisplayName() : "Null") + + ", aStack: "+(aStack != null ? aStack.getDisplayName() : "Null") + + ", Damage: "+(aStack != null ? aStack.getItemDamage() : "Null")); + } + catch (Throwable t) { + t.printStackTrace(); + } + return; + } + if (!aStack.getTagCompound().hasKey("Inventory")) { + NBTTagCompound tNBT = new NBTTagCompound(); + NBTTagList tNBT_ItemList = new NBTTagList(); + for (int i = 0; i < 9; i++) { + ItemStack tStack = mInventory[i + 21]; + if (tStack != null) { + NBTTagCompound tag = new NBTTagCompound(); + tag.setByte("Slot", (byte) i); + tStack.writeToNBT(tag); + tNBT_ItemList.appendTag(tag); + } + } + tNBT.setTag("Inventory", tNBT_ItemList); + tNBT.setBoolean("mBlueprint", true); + tNBT.setInteger("mID", MathUtils.randInt(1, Short.MAX_VALUE)); + tNBT.setString("mName", mInventory[31].getDisplayName()); + aStack.setTagCompound(tNBT); + Logger.INFO("Set NBT of crafting table to Stack in slot 30."); + } + else { + Logger.INFO("Blueprint already has recipe tags."); + } + + } + + public ItemStack getCraftingOutput() { + if (mInventory[30] != null && mInventory[30].getItem() != null + && mInventory[30].getItemDamage() == 0 + && mInventory[30].hasTagCompound() && mInventory[30].getItem() instanceof ItemBlueprint) { + //Logger.INFO("Getting Blueprint Data in slot 30. "+mInventory[30].getDisplayName()); + NBTTagCompound tNBT = mInventory[30].getTagCompound(); + NBTTagList tNBT_ItemList = tNBT.getTagList("Blueprint", 10); + for (int i = 0; i < tNBT_ItemList.tagCount() && i < 9; i++) { + NBTTagCompound tag = (NBTTagCompound) tNBT_ItemList.getCompoundTagAt( + i + ); + byte slot = tag.getByte("Slot"); + if (slot >= 0 && slot < 9 && mInventory[slot + 21] == null) { + mInventory[slot + 21] = GT_Utility.loadItem(tag); + if (mInventory[slot + 21] != null) + mInventory[slot + 21].stackSize = 0; + } + } + } + mInventory[31] = GT_ModHandler.getAllRecipeOutput( + getBaseMetaTileEntity().getWorld(), new ItemStack[]{ + mInventory[21], mInventory[22], mInventory[23], + mInventory[24], mInventory[25], mInventory[26], + mInventory[27], mInventory[28], mInventory[29] + } + ); + return mInventory[31]; + } + + public boolean canDoCraftingOutput() { + if (mInventory[31] == null) + return false; + for (ItemStack tStack : recipeContent()) { + if (tStack.stackSize > getAmountOf(tStack)) { + return false; + } + } + return true; + } + + private int getAmountOf(ItemStack aStack) { + int tAmount = 0; + for (byte i = 0; i < 30 && tAmount < 9; i++) { + if (GT_Utility.areStacksOrToolsEqual(aStack, mInventory[i])) { + tAmount += mInventory[i].stackSize; + } + } + return tAmount; + } + + private ArrayList recipeContent() { + ArrayList tList = new ArrayList(); + for (byte i = 21; i < 30; i++) { + if (mInventory[i] != null) { + boolean temp = false; + for (byte j = 0; j < tList.size(); j++) { + if (GT_Utility.areStacksOrToolsEqual( + mInventory[i], tList.get(j) + )) { + tList.get(j).stackSize++; + temp = true; + break; + } + } + if (!temp) + tList.add(GT_Utility.copy(1, mInventory[i])); + } + } + return tList; + } + + public ItemStack consumeMaterials(EntityPlayer aPlayer, ItemStack aHoldStack) { + if (mInventory[31] == null) + return aHoldStack; + if (aHoldStack != null) { + if (!GT_Utility.areStacksEqual(aHoldStack, mInventory[31])) + return aHoldStack; + if (aHoldStack.stackSize + + mInventory[31].stackSize > aHoldStack.getMaxStackSize()) + return aHoldStack; + } + for (byte i = 21; i < 30; i++) + if (mInventory[i] != null) { + for (byte j = 0; j <= i; j++) { + if (j < 21 || j == i) { + if (GT_Utility.areStacksOrToolsEqual( + mInventory[i], mInventory[j] + ) && mInventory[j].stackSize > 0) { + ItemStack tStack = GT_Utility.getContainerItem( + mInventory[j], true + ); + if (tStack == null + || (tStack.isItemStackDamageable() + && tStack.getItemDamage() >= tStack.getMaxDamage())) { + getBaseMetaTileEntity().decrStackSize(j, 1); + } + else if (mInventory[j].stackSize == 1) { + mInventory[j] = tStack; + } + else { + getBaseMetaTileEntity().decrStackSize(j, 1); + for (byte k = 0; k < 21; k++) { + if (mInventory[k] == null) { + mInventory[k] = tStack; + break; + } + else { + if (GT_Utility.areStacksEqual( + tStack, mInventory[k] + )) { + if (tStack.stackSize + + mInventory[k].stackSize <= mInventory[k].getMaxStackSize()) { + mInventory[k].stackSize += tStack.stackSize; + break; + } + } + } + } + } + break; + } + } + } + } + if (aHoldStack == null) { + aHoldStack = GT_Utility.copy(mInventory[31]); + aHoldStack.onCrafting( + getBaseMetaTileEntity().getWorld(), aPlayer, mInventory[31].stackSize + ); + } + else { + aHoldStack.stackSize += mInventory[31].stackSize; + aHoldStack.onCrafting( + getBaseMetaTileEntity().getWorld(), aPlayer, mInventory[31].stackSize + ); + } + + fillLiquidContainers(); + + return aHoldStack; + } + + @Override + public int rechargerSlotStartIndex() { + return 16; + } + + @Override + public int rechargerSlotCount() { + return 5; + } + + @Override + public long getOutputTier() { + return GT_Utility.getTier(getBaseMetaTileEntity().getInputVoltage()); + } + + @Override + public int getCapacity() { + return 64000; + } + + @Override + public int getTankPressure() { + return -100; + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aIndex == 33 || (mFlushMode && aIndex >= 21 && aIndex < 30); + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + if (aIndex < 16) { + for (byte i = 0; i < 16; i++) + if (GT_Utility.areStacksOrToolsEqual(aStack, mInventory[i])) + return aIndex == i; + return true; + } + return false; + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPreTick(aBaseMetaTileEntity, aTick); + getCraftingOutput(); + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (getBaseMetaTileEntity().isServerSide()) { + if (getBaseMetaTileEntity().hasInventoryBeenModified()) + getCraftingOutput(); + fillLiquidContainers(); + if (mFlushMode) { + mFlushMode = false; + for (byte i = 21; i < 30; i++) { + if (mInventory[i] != null) { + if (mInventory[i].stackSize == 0) { + mInventory[i] = null; + } + else { + mFlushMode = true; + break; + } + } + } + } + } + /*if (aTick % 100 == 0) { + for (int i = 0; i < this.mInventory.length; i++) { + ItemStack aSlot = mInventory[i]; + Logger.INFO("Slot "+i+" "+(aSlot != null ? "contains "+aSlot.getDisplayName() : "is empty")); + } + }*/ + } + + @Override + public String[] getDescription() { + return new String[] { + "For the very large Projects", + this.mDescription, + CORE.GT_Tooltip }; + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getBack(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFront(i); + rTextures[6][i + 1] = this.getBack(i); + rTextures[7][i + 1] = this.getBottom(i); + rTextures[8][i + 1] = this.getTop(i); + rTextures[9][i + 1] = this.getSides(i); + } + return rTextures; + } + + protected boolean isAdvanced() { + return true; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 + : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + + 1]; + } + + public ITexture[] getFront(final byte aColor) { + return new ITexture[] { isAdvanced() ? new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Side) : new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Side)}; + } + + public ITexture[] getBack(final byte aColor) { + return new ITexture[] { isAdvanced() ? new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Side) : new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Side)}; + } + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[] { isAdvanced() ? new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Bottom) : new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Bottom)}; + } + + public ITexture[] getTop(final byte aColor) { + if (isAdvanced()) { + return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Top), + new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Crafting_Overlay) }; + } + else { + return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Top), + new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Crafting_Overlay) }; + } + } + + public ITexture[] getSides(final byte aColor) { + return new ITexture[] { isAdvanced() ? new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Side) : new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Side)}; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_BronzeCraftingTable.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_BronzeCraftingTable.java new file mode 100644 index 0000000000..75d46cbb53 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_BronzeCraftingTable.java @@ -0,0 +1,91 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.storage; + +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_ItemStack; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.gui.workbench.GT_Container_BronzeWorkbench; +import gtPlusPlus.xmod.gregtech.api.gui.workbench.GT_GUIContainer_BronzeWorkbench; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_MetaTileEntity_BronzeCraftingTable extends GT_MetaTileEntity_AdvancedCraftingTable { + + public GT_MetaTileEntity_BronzeCraftingTable(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription) { + super(aID, aName, aNameRegional, aTier, aDescription); + } + + public GT_MetaTileEntity_BronzeCraftingTable(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_BronzeWorkbench(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_BronzeWorkbench(aPlayerInventory, aBaseMetaTileEntity, mLocalName); + } + + @Override + public boolean isTransformerUpgradable() { + return false; + } + + @Override + public boolean isInputFacing(byte aSide) { + return false; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_BronzeCraftingTable(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + @SuppressWarnings("deprecation") + @Override + public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) { + return GregTech_API.getCoverBehavior(aStack.toStack()).isSimpleCover(); + } + + @Override + public int rechargerSlotStartIndex() { + return 0; + } + + @Override + public int rechargerSlotCount() { + return 0; + } + + @Override + public String[] getDescription() { + return new String[] { + "For the smaller Projects", + this.mDescription, + CORE.GT_Tooltip }; + } + + @Override + public int getCapacity() { + return 16000; + } + + @Override + protected boolean isAdvanced() { + return false; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java index 0817202e85..721dbd69c3 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java @@ -8,7 +8,14 @@ import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractTerminal; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_AutoCrafter; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_ThermalBoiler; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.*; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_AdvancedCraftingTable; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_BronzeCraftingTable; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_Compartment; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_Desk; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_FileCabinet; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_Iron; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_Large; public class Gregtech4Content { @@ -26,10 +33,10 @@ public class Gregtech4Content { private static void workbenches() { // Gregtech 4 Workbenches - //Utils.LOG_INFO("Gregtech 4 Content | Registering Workbenches."); - // Free //GregtechItemList.GT4_Workbench_Bronze.set(new - // GT_MetaTileEntity_BronzeCraftingTable(828, "workbench.bronze", - // "Bronze Workbench", 0).getStackForm(1L)); + Logger.INFO("Gregtech 4 Content | Registering Workbenches."); + GregtechItemList.GT4_Workbench_Bronze.set(new GT_MetaTileEntity_BronzeCraftingTable(29001, "workbench.basic", "Bronze Workbench", 0, "Stores 16000L of fluid").getStackForm(1L)); + GregtechItemList.GT4_Workbench_Advanced.set(new GT_MetaTileEntity_AdvancedCraftingTable(29002, "workbench.advanced", "Advanced Workbench", 3, "Stores 64000L of fluid").getStackForm(1L)); + } private static void tesseracts() { diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_bottom.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_bottom.png new file mode 100644 index 0000000000..faa25b4887 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_bottom.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_side.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_side.png new file mode 100644 index 0000000000..652245a61c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_side.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_top.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_top.png new file mode 100644 index 0000000000..568a7332ab Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_top.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_top_crafting.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_top_crafting.png new file mode 100644 index 0000000000..0e4219dbab Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_top_crafting.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_top_crafting.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_top_crafting.png new file mode 100644 index 0000000000..a8b157975c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_top_crafting.png differ -- cgit From d3c655a124b349fa7f78b52ca9651c2c4140198a Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sat, 15 Jan 2022 13:07:16 +0000 Subject: Added missing recipes for Rotors and Fine Wire. Hopefully remove bad plasma related recipes. Hopefully cleaned up Wire/Cable recipes. --- src/main/java/gtPlusPlus/core/item/ModItems.java | 287 +++++++------- .../core/item/base/wire/BaseItemFineWire.java | 12 + .../java/gtPlusPlus/core/material/Material.java | 75 +++- .../core/util/minecraft/MaterialUtils.java | 4 + .../xmod/gregtech/loaders/RecipeGen_Extruder.java | 153 ++++---- .../xmod/gregtech/loaders/RecipeGen_Fluids.java | 21 ++ .../gregtech/loaders/RecipeGen_MetalRecipe.java | 29 ++ .../xmod/gregtech/loaders/RecipeGen_Plasma.java | 23 +- .../gregtech/loaders/RecipeGen_ShapedCrafting.java | 15 + .../registration/gregtech/GregtechConduits.java | 414 +++++++++------------ 10 files changed, 558 insertions(+), 475 deletions(-) create mode 100644 src/main/java/gtPlusPlus/core/item/base/wire/BaseItemFineWire.java (limited to 'src/main/java/gtPlusPlus/core/item') diff --git a/src/main/java/gtPlusPlus/core/item/ModItems.java b/src/main/java/gtPlusPlus/core/item/ModItems.java index 47278c559d..99ecd96d87 100644 --- a/src/main/java/gtPlusPlus/core/item/ModItems.java +++ b/src/main/java/gtPlusPlus/core/item/ModItems.java @@ -439,27 +439,8 @@ public final class ModItems { try{ - - /** - * Try generate dusts for missing rare earth materials if they don't exist - */ - - if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustGadolinium", 1))){ - ItemUtils.generateSpecialUseDusts("Gadolinium", "Gadolinium", Materials.Gadolinium.mElement.name(), Utils.rgbtoHexValue(226, 172, 9)); - } - if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustYtterbium", 1))){ - ItemUtils.generateSpecialUseDusts("Ytterbium", "Ytterbium", Materials.Ytterbium.mElement.name(), Utils.rgbtoHexValue(Materials.Yttrium.mRGBa[0]-60, Materials.Yttrium.mRGBa[1]-60, Materials.Yttrium.mRGBa[2]-60)); - } - if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustSamarium", 1))){ - ItemUtils.generateSpecialUseDusts("Samarium", "Samarium", Materials.Samarium.mElement.name(), Utils.rgbtoHexValue(161, 168, 114)); - } - if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustLanthanum", 1))){ - ItemUtils.generateSpecialUseDusts("Lanthanum", "Lanthanum", Materials.Lanthanum.mElement.name(), Utils.rgbtoHexValue(106, 127, 163)); - } - if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustGermanium", 1))){ - ItemUtils.generateSpecialUseDusts("Germanium", "Germanium", "Ge", ELEMENT.getInstance().GERMANIUM.getRgbAsHex()); - } - + + registerCustomMaterialComponents(); //Elements generate first so they can be used in compounds. //Missing Elements @@ -843,36 +824,6 @@ public final class ModItems { if (!FluidRegistry.isFluidRegistered("xpjuice")){ FluidUtils.generateFluidNoPrefix("xpjuice", "xpjuice", 0, new short[]{50, 150, 50, 100}); } - - //Just an unusual plate needed for some black magic. - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateClay", 1) == null){ - itemPlateClay = new BaseItemPlate(NONMATERIAL.CLAY); - } - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateDoubleClay", 1) == null){ - itemDoublePlateClay = new BaseItemPlateDouble(NONMATERIAL.CLAY); - } - - //Need this for Mutagenic Frames - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilUranium235", 1) == null){ - itemFoilUranium235 = new BaseItemFoil(ELEMENT.getInstance().URANIUM235); - } - - //A small gear needed for wizardry. - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("gearGtSmallWroughtIron", 1) == null){ - itemSmallWroughtIronGear = new BaseItemSmallGear(NONMATERIAL.WROUGHT_IRON); - } - //Krypton Processing - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotHotTitanium", 1) == null){ - itemHotTitaniumIngot = ItemUtils.getSimpleStack(new BaseItemIngot(ELEMENT.getInstance().TITANIUM, ComponentTypes.HOTINGOT)); - } - else { - itemHotTitaniumIngot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotHotTitanium", 1); - } - - //Need this for Laurenium - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustIndium", 1) == null){ - itemDustIndium = new BaseItemDust(ELEMENT.getInstance().INDIUM); - } //Industrial Diamonds itemExquisiteIndustrialDiamond = new CoreItem("IndustrialDiamondExquisite", "High Quality Industrial Diamond", tabMisc); @@ -882,97 +833,7 @@ public final class ModItems { ItemUtils.addItemToOreDictionary(tempStack, "gemExquisiteDiamond"); ItemUtils.addItemToOreDictionary(tempStack, "craftingExquisiteIndustrialDiamond"); - //Custom GT++ Crafting Components - //Springs - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ELEMENT.STANDALONE.WHITE_METAL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ALLOY.NITINOL_60); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ALLOY.AQUATIC_STEEL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ALLOY.EGLIN_STEEL); - - //Small Springs - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.MARAGING250); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.NICHROME); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.STABALLOY); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.STEEL_BLACK); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.BLACK_TITANIUM); - - //Fine Wire - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ELEMENT.STANDALONE.WHITE_METAL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ELEMENT.getInstance().PALLADIUM); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ELEMENT.getInstance().ZIRCONIUM); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.LEAGRISIUM); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.BABBIT_ALLOY); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.KOBOLDITE); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.HG1223); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.QUANTUM); - - //Dense Plates - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.POTIN); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.AQUATIC_STEEL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.BRONZE); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.OSMIRIDIUM); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.QUANTUM); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.STEEL_BLACK); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.STAINLESS_STEEL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.EGLIN_STEEL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.MARAGING300); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.TALONITE); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.HYPOGEN); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.RHUGNOR); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.ADVANCED_NITINOL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.ASTRAL_TITANIUM); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.WHITE_METAL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.BLACK_METAL); - MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.GRANITE); - - - - - //Special Sillyness - if (true) { - - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateSodium", 1) == null){ - new BaseItemPlate(ELEMENT.getInstance().SODIUM); - } - - Material meatRaw = NONMATERIAL.MEAT; - // A plate of Meat. - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateMeatRaw", 1) == null){ - itemPlateRawMeat = new BaseItemPlate(meatRaw); - ItemUtils.registerFuel(ItemUtils.getSimpleStack(itemPlateRawMeat), 100); - } - // A Block of Meat. - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("blockMeatRaw", 1) == null){ - blockRawMeat = new BlockBaseModular(meatRaw, BlockTypes.STANDARD); - ItemUtils.registerFuel(ItemUtils.getSimpleStack(blockRawMeat), 900); - } - } - - - // A plate of Vanadium. - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateVanadium", 1) == null){ - itemPlateVanadium = new BaseItemPlate(ELEMENT.getInstance().VANADIUM); - } - - //A plate of Lithium. - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateLithium", 1) == null){ - itemPlateLithium = new BaseItemPlate(ELEMENT.getInstance().LITHIUM); - } - - //A plate of Europium. - if ((ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateEuropium", 1) == null) && CORE.ConfigSwitches.enableCustom_Pipes){ - itemPlateEuropium = new BaseItemPlate(ELEMENT.getInstance().EUROPIUM); - } - if ((ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateDoubleEuropium", 1) == null) && CORE.ConfigSwitches.enableCustom_Pipes){ - itemDoublePlateEuropium = new BaseItemPlateDouble(ELEMENT.getInstance().EUROPIUM); - } - - //Tumbaga Mix (For Simple Crafting) - dustTumbagaMix = ItemUtils.generateSpecialUseDusts("MixTumbaga", "Tumbaga Mix", "Au2Cu", Utils.rgbtoHexValue(255, 150, 80))[0]; - /* * Decayable Materials */ @@ -1229,4 +1090,148 @@ public final class ModItems { itemGenericToken.register(3, "Hand Pump Trade Token III", 1, "Craft into a Tier III Hand pump"); itemGenericToken.register(4, "Hand Pump Trade Token IV", 1, "Craft into a Tier IV Hand pump"); } + + public static void registerCustomMaterialComponents() { + //Custom GT++ Crafting Components + + /** + * Try generate dusts for missing rare earth materials if they don't exist + */ + + if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustGadolinium", 1))){ + ItemUtils.generateSpecialUseDusts("Gadolinium", "Gadolinium", Materials.Gadolinium.mElement.name(), Utils.rgbtoHexValue(226, 172, 9)); + } + if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustYtterbium", 1))){ + ItemUtils.generateSpecialUseDusts("Ytterbium", "Ytterbium", Materials.Ytterbium.mElement.name(), Utils.rgbtoHexValue(Materials.Yttrium.mRGBa[0]-60, Materials.Yttrium.mRGBa[1]-60, Materials.Yttrium.mRGBa[2]-60)); + } + if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustSamarium", 1))){ + ItemUtils.generateSpecialUseDusts("Samarium", "Samarium", Materials.Samarium.mElement.name(), Utils.rgbtoHexValue(161, 168, 114)); + } + if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustLanthanum", 1))){ + ItemUtils.generateSpecialUseDusts("Lanthanum", "Lanthanum", Materials.Lanthanum.mElement.name(), Utils.rgbtoHexValue(106, 127, 163)); + } + if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustGermanium", 1))){ + ItemUtils.generateSpecialUseDusts("Germanium", "Germanium", "Ge", ELEMENT.getInstance().GERMANIUM.getRgbAsHex()); + } + + //Just an unusual plate needed for some black magic. + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateClay", 1) == null){ + itemPlateClay = new BaseItemPlate(NONMATERIAL.CLAY); + } + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateDoubleClay", 1) == null){ + itemDoublePlateClay = new BaseItemPlateDouble(NONMATERIAL.CLAY); + } + + //Need this for Mutagenic Frames + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilUranium235", 1) == null){ + itemFoilUranium235 = new BaseItemFoil(ELEMENT.getInstance().URANIUM235); + } + + //A small gear needed for wizardry. + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("gearGtSmallWroughtIron", 1) == null){ + itemSmallWroughtIronGear = new BaseItemSmallGear(NONMATERIAL.WROUGHT_IRON); + } + //Krypton Processing + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotHotTitanium", 1) == null){ + itemHotTitaniumIngot = ItemUtils.getSimpleStack(new BaseItemIngot(ELEMENT.getInstance().TITANIUM, ComponentTypes.HOTINGOT)); + } + else { + itemHotTitaniumIngot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotHotTitanium", 1); + } + + //Need this for Laurenium + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustIndium", 1) == null){ + itemDustIndium = new BaseItemDust(ELEMENT.getInstance().INDIUM); + } + + //Springs + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ELEMENT.STANDALONE.WHITE_METAL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ALLOY.NITINOL_60); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ALLOY.AQUATIC_STEEL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ALLOY.EGLIN_STEEL); + + //Small Springs + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.MARAGING250); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.NICHROME); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.STABALLOY); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.STEEL_BLACK); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.BLACK_TITANIUM); + + //Fine Wire + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ELEMENT.STANDALONE.WHITE_METAL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ELEMENT.getInstance().PALLADIUM); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ELEMENT.getInstance().ZIRCONIUM); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.LEAGRISIUM); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.BABBIT_ALLOY); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.KOBOLDITE); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.HG1223); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.QUANTUM); + + //Dense Plates + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.POTIN); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.AQUATIC_STEEL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.BRONZE); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.OSMIRIDIUM); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.QUANTUM); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.STEEL_BLACK); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.STAINLESS_STEEL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.EGLIN_STEEL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.MARAGING300); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.TALONITE); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.HYPOGEN); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.RHUGNOR); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.ADVANCED_NITINOL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.ASTRAL_TITANIUM); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.WHITE_METAL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.BLACK_METAL); + MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.GRANITE); + + + + + //Special Sillyness + if (true) { + + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateSodium", 1) == null){ + new BaseItemPlate(ELEMENT.getInstance().SODIUM); + } + + Material meatRaw = NONMATERIAL.MEAT; + // A plate of Meat. + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateMeatRaw", 1) == null){ + itemPlateRawMeat = new BaseItemPlate(meatRaw); + ItemUtils.registerFuel(ItemUtils.getSimpleStack(itemPlateRawMeat), 100); + } + // A Block of Meat. + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("blockMeatRaw", 1) == null){ + blockRawMeat = new BlockBaseModular(meatRaw, BlockTypes.STANDARD); + ItemUtils.registerFuel(ItemUtils.getSimpleStack(blockRawMeat), 900); + } + } + + + // A plate of Vanadium. + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateVanadium", 1) == null){ + itemPlateVanadium = new BaseItemPlate(ELEMENT.getInstance().VANADIUM); + } + + //A plate of Lithium. + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateLithium", 1) == null){ + itemPlateLithium = new BaseItemPlate(ELEMENT.getInstance().LITHIUM); + } + + //A plate of Europium. + if ((ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateEuropium", 1) == null) && CORE.ConfigSwitches.enableCustom_Pipes){ + itemPlateEuropium = new BaseItemPlate(ELEMENT.getInstance().EUROPIUM); + } + if ((ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateDoubleEuropium", 1) == null) && CORE.ConfigSwitches.enableCustom_Pipes){ + itemDoublePlateEuropium = new BaseItemPlateDouble(ELEMENT.getInstance().EUROPIUM); + } + + //Tumbaga Mix (For Simple Crafting) + dustTumbagaMix = ItemUtils.generateSpecialUseDusts("MixTumbaga", "Tumbaga Mix", "Au2Cu", Utils.rgbtoHexValue(255, 150, 80))[0]; + + } } diff --git a/src/main/java/gtPlusPlus/core/item/base/wire/BaseItemFineWire.java b/src/main/java/gtPlusPlus/core/item/base/wire/BaseItemFineWire.java new file mode 100644 index 0000000000..846c282af3 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/base/wire/BaseItemFineWire.java @@ -0,0 +1,12 @@ +package gtPlusPlus.core.item.base.wire; + +import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.material.Material; + +public class BaseItemFineWire extends BaseItemComponent{ + + public BaseItemFineWire(final Material material) { + super(material, BaseItemComponent.ComponentTypes.FINEWIRE); + } + +} diff --git a/src/main/java/gtPlusPlus/core/material/Material.java b/src/main/java/gtPlusPlus/core/material/Material.java index 0e9eb9b376..64b705629e 100644 --- a/src/main/java/gtPlusPlus/core/material/Material.java +++ b/src/main/java/gtPlusPlus/core/material/Material.java @@ -25,6 +25,7 @@ import gtPlusPlus.core.util.minecraft.FluidUtils; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.minecraft.MaterialUtils; import gtPlusPlus.xmod.gregtech.api.enums.CustomOrePrefix; +import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechConduits; import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_Aspect_Wrapper; import gtPlusPlus.xmod.tinkers.material.BaseTinkersMaterial; import net.minecraft.block.Block; @@ -50,7 +51,7 @@ public class Material { private TextureSet textureSet; private Fluid mFluid; - private Fluid vPlasma; + private Fluid mPlasma; private boolean vGenerateCells; @@ -493,11 +494,14 @@ public class Material { mFluid = generateFluid(); } } - this.vPlasma = this.generatePlasma(); + // Don't generate plasma for composites + if (this.getComposites().isEmpty()) { + this.mPlasma = this.generatePlasma(); + } } else { this.mFluid = null; - this.vPlasma = null; + this.mPlasma = null; } String ratio = ""; if (this.vSmallestRatio != null) { @@ -869,6 +873,14 @@ public class Material { public final ItemStack getScrew(final int stacksize){ return getComponentByPrefix(OrePrefixes.screw, stacksize); } + + public final ItemStack getFineWire(final int stacksize){ + return getComponentByPrefix(OrePrefixes.wireFine, stacksize); + } + + public final ItemStack getFoil(final int stacksize){ + return getComponentByPrefix(OrePrefixes.foil, stacksize); + } public final ItemStack getRing(final int stacksize){ return getComponentByPrefix(OrePrefixes.ring, stacksize); @@ -893,6 +905,59 @@ public class Material { public final ItemStack getNugget(final int stacksize){ return getComponentByPrefix(OrePrefixes.nugget, stacksize); } + + public final ItemStack getWire01(final int stacksize) { + return getComponentByPrefix(OrePrefixes.wireGt01, stacksize); + } + + public final ItemStack getWire02(final int stacksize) { + return getComponentByPrefix(OrePrefixes.wireGt02, stacksize); + } + + public final ItemStack getWire04(final int stacksize) { + return getComponentByPrefix(OrePrefixes.wireGt04, stacksize); + } + + public final ItemStack getWire08(final int stacksize) { + return getComponentByPrefix(OrePrefixes.wireGt08, stacksize); + } + + public final ItemStack getWire12(final int stacksize) { + return getComponentByPrefix(OrePrefixes.wireGt12, stacksize); + } + + public final ItemStack getWire16(final int stacksize) { + return getComponentByPrefix(OrePrefixes.wireGt16, stacksize); + } + + public final ItemStack getCable01(final int stacksize) { + return getComponentByPrefix(OrePrefixes.cableGt01, stacksize); + } + + public final ItemStack getCable02(final int stacksize) { + return getComponentByPrefix(OrePrefixes.cableGt02, stacksize); + } + + public final ItemStack getCable04(final int stacksize) { + return getComponentByPrefix(OrePrefixes.cableGt04, stacksize); + } + + public final ItemStack getCable08(final int stacksize) { + return getComponentByPrefix(OrePrefixes.cableGt08, stacksize); + } + + public final ItemStack getCable12(final int stacksize) { + return getComponentByPrefix(OrePrefixes.cableGt12, stacksize); + } + + public final ItemStack getCable16(final int stacksize) { + if (GregtechConduits.cableGt16 != null) { + return getComponentByPrefix(GregtechConduits.cableGt16, stacksize); + } + else { + return ItemUtils.getErrorStack(stacksize); + } + } /** * Ore Components @@ -1281,6 +1346,10 @@ public class Material { public Fluid getFluid() { return mFluid; } + + public Fluid getPlasma() { + return mPlasma; + } final public FluidStack getFluidStack(final int fluidAmount) { if (this.mFluid == null){ diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/MaterialUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/MaterialUtils.java index 0323bf0161..0ccd752775 100644 --- a/src/main/java/gtPlusPlus/core/util/minecraft/MaterialUtils.java +++ b/src/main/java/gtPlusPlus/core/util/minecraft/MaterialUtils.java @@ -18,6 +18,7 @@ import gtPlusPlus.core.client.CustomTextureSet.TextureSets; import gtPlusPlus.core.item.base.BaseItemComponent; import gtPlusPlus.core.item.base.BaseItemComponent.ComponentTypes; import gtPlusPlus.core.item.base.plates.BaseItemPlateHeavy; +import gtPlusPlus.core.item.base.wire.BaseItemFineWire; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.MaterialStack; @@ -457,6 +458,9 @@ public class MaterialUtils { if (aType == ComponentTypes.PLATEHEAVY) { aGC = new BaseItemPlateHeavy(aMaterial); } + else if (aType == ComponentTypes.FINEWIRE) { + aGC = new BaseItemFineWire(aMaterial); + } else { aGC = new BaseItemComponent(aMaterial, aType); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java index cd43d6201c..54e9716520 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java @@ -3,23 +3,22 @@ package gtPlusPlus.xmod.gregtech.loaders; import java.util.HashSet; import java.util.Set; -import net.minecraft.item.ItemStack; - -import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; -import gregtech.api.util.GT_Recipe; - import gtPlusPlus.api.interfaces.RunnableWithInfo; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.MaterialGenerator; import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.item.ItemStack; public class RecipeGen_Extruder extends RecipeGen_Base { public final static Set> mRecipeGenMap = new HashSet>(); + private static boolean mRotorShapeEnabled = false; static { MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); + mRotorShapeEnabled = ItemUtils.doesItemListEntryExist("Shape_Extruder_Rotor"); } public RecipeGen_Extruder(final Material M){ @@ -48,10 +47,10 @@ public class RecipeGen_Extruder extends RecipeGen_Base { Logger.WARNING("Generating Extruder recipes for "+material.getLocalizedName()); - + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getBlock(1))) { //Ingot Recipe - if (addExtruderRecipe( + if (GT_Values.RA.addExtruderRecipe( material.getBlock(1), shape_Ingot, material.getIngot(9), @@ -64,7 +63,7 @@ public class RecipeGen_Extruder extends RecipeGen_Base { } //Block Recipe - if (addExtruderRecipe( + if (GT_Values.RA.addExtruderRecipe( material.getIngot(9), shape_Block, material.getBlock(1), @@ -80,97 +79,101 @@ public class RecipeGen_Extruder extends RecipeGen_Base { //Plate Recipe if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getPlate(1))) - if (addExtruderRecipe( - itemIngot, - shape_Plate, - itemPlate, - 10, - material.vVoltageMultiplier)){ - Logger.WARNING("Extruder Plate Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Extruder Plate Recipe: "+material.getLocalizedName()+" - Failed"); - } - - //Ring Recipe - if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getRing(1))) - if (!material.isRadioactive){ - if (addExtruderRecipe( + if (GT_Values.RA.addExtruderRecipe( itemIngot, - shape_Ring, - material.getRing(4), - (int) Math.max(material.getMass() * 2L * 1, 1), + shape_Plate, + itemPlate, + 10, material.vVoltageMultiplier)){ - Logger.WARNING("Extruder Ring Recipe: "+material.getLocalizedName()+" - Success"); + Logger.WARNING("Extruder Plate Recipe: "+material.getLocalizedName()+" - Success"); } else { - Logger.WARNING("Extruder Ring Recipe: "+material.getLocalizedName()+" - Failed"); + Logger.WARNING("Extruder Plate Recipe: "+material.getLocalizedName()+" - Failed"); + } + + //Ring Recipe + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getRing(1))) + if (!material.isRadioactive){ + if (GT_Values.RA.addExtruderRecipe( + itemIngot, + shape_Ring, + material.getRing(4), + (int) Math.max(material.getMass() * 2L * 1, 1), + material.vVoltageMultiplier)){ + Logger.WARNING("Extruder Ring Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Extruder Ring Recipe: "+material.getLocalizedName()+" - Failed"); + } } - } //Gear Recipe if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getGear(1))) - if (!material.isRadioactive){ - if (addExtruderRecipe( - material.getIngot(4), - shape_Gear, - itemGear, - (int) Math.max(material.getMass() * 5L, 1), - material.vVoltageMultiplier)){ - Logger.WARNING("Extruder Gear Recipe: "+material.getLocalizedName()+" - Success"); + if (!material.isRadioactive){ + if (GT_Values.RA.addExtruderRecipe( + material.getIngot(4), + shape_Gear, + itemGear, + (int) Math.max(material.getMass() * 5L, 1), + material.vVoltageMultiplier)){ + Logger.WARNING("Extruder Gear Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Extruder Gear Recipe: "+material.getLocalizedName()+" - Failed"); + } } - else { - Logger.WARNING("Extruder Gear Recipe: "+material.getLocalizedName()+" - Failed"); - } - } //Rod Recipe if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getRod(1))) - if (addExtruderRecipe( - itemIngot, - shape_Rod, - material.getRod(2), - (int) Math.max(material.getMass() * 2L * 1, 1), - material.vVoltageMultiplier)){ - Logger.WARNING("Extruder Rod Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Extruder Rod Recipe: "+material.getLocalizedName()+" - Failed"); - } - - - //Bolt Recipe - if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getBolt(1))) - if (!material.isRadioactive){ - if (addExtruderRecipe( + if (GT_Values.RA.addExtruderRecipe( itemIngot, - shape_Bolt, - material.getBolt(8), + shape_Rod, + material.getRod(2), (int) Math.max(material.getMass() * 2L * 1, 1), material.vVoltageMultiplier)){ - Logger.WARNING("Extruder Bolt Recipe: "+material.getLocalizedName()+" - Success"); + Logger.WARNING("Extruder Rod Recipe: "+material.getLocalizedName()+" - Success"); } else { - Logger.WARNING("Extruder Bolt Recipe: "+material.getLocalizedName()+" - Failed"); + Logger.WARNING("Extruder Rod Recipe: "+material.getLocalizedName()+" - Failed"); } - } - } + + //Bolt Recipe + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getBolt(1))) + if (!material.isRadioactive){ + if (GT_Values.RA.addExtruderRecipe( + itemIngot, + shape_Bolt, + material.getBolt(8), + (int) Math.max(material.getMass() * 2L * 1, 1), + material.vVoltageMultiplier)){ + Logger.WARNING("Extruder Bolt Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Extruder Bolt Recipe: "+material.getLocalizedName()+" - Failed"); + } + } + + //Rotor Recipe + // Shape_Extruder_Rotor + if (mRotorShapeEnabled && ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getRotor(1))) + if (GT_Values.RA.addExtruderRecipe( + material.getIngot(5), + ItemUtils.getValueOfItemList("Shape_Extruder_Rotor", 0, ItemUtils.getErrorStack(1)), + material.getRotor(1), + 200, + 60)){ + Logger.WARNING("Extruder Rotor Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Extruder Rotor Recipe: "+material.getLocalizedName()+" - Failed"); + } - public static boolean addExtruderRecipe(final ItemStack aInput, final ItemStack aShape, final ItemStack aOutput, int aDuration, final int aEUt) { - if ((aInput == null) || (aShape == null) || (aOutput == null)) { - return false; - } - if ((aDuration = GregTech_API.sRecipeFile.get("extruder", aOutput, aDuration)) <= 0) { - return false; - } - GT_Recipe.GT_Recipe_Map.sExtruderRecipes.addRecipe(true, new ItemStack[]{aInput, aShape}, new ItemStack[]{aOutput}, null, null, null, aDuration, aEUt, 0); - return true; - } + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java index ec71cb6b57..0661ea5ea4 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java @@ -5,6 +5,8 @@ import java.util.Set; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_OreDictUnificator; import gtPlusPlus.api.interfaces.RunnableWithInfo; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; @@ -15,8 +17,10 @@ import gtPlusPlus.core.util.minecraft.ItemUtils; public class RecipeGen_Fluids extends RecipeGen_Base { public final static Set> mRecipeGenMap = new HashSet>(); + private static boolean mRotorShapeEnabled = false; static { MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); + mRotorShapeEnabled = ItemUtils.doesItemListEntryExist("Shape_Extruder_Rotor"); } public RecipeGen_Fluids(final Material M) { @@ -136,6 +140,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base { ItemList mold_Bolt = ItemUtils.getValueOfItemList("Shape_Mold_Bolt", null); ItemList mold_Screw = ItemUtils.getValueOfItemList("Shape_Mold_Screw", null); ItemList mold_Ring = ItemUtils.getValueOfItemList("Shape_Mold_Ring", null); + ItemList mold_Rotor = ItemUtils.getValueOfItemList("Shape_Mold_Rotor", null); // Rod if (ItemUtils.checkForInvalidItems(material.getRod(1))) @@ -212,7 +217,23 @@ public class RecipeGen_Fluids extends RecipeGen_Base { Logger.WARNING((144 * 9) + "l fluid molder from 1 ring Recipe: " + material.getLocalizedName() + " - Failed"); } + + // Rotor + if (ItemUtils.checkForInvalidItems(material.getRotor(1))) + if (mold_Rotor != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Rotor.get(0), // Item Shape + material.getFluidStack(612), // Fluid Input + material.getRotor(1), // output + 100, // Duration + material.vVoltageMultiplier // Eu Tick + )) { + Logger.WARNING((144 * 9) + "l fluid molder from 1 rotor Recipe: " + material.getLocalizedName() + + " - Success"); + } else { + Logger.WARNING((144 * 9) + "l fluid molder from 1 rotor Recipe: " + material.getLocalizedName() + + " - Failed"); + } + } } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java index 830fae78ab..bcf3ef1f9f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java @@ -1,7 +1,10 @@ package gtPlusPlus.xmod.gregtech.loaders; import gregtech.api.enums.GT_Values; +import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; import gtPlusPlus.api.interfaces.RunnableWithInfo; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; @@ -114,6 +117,32 @@ public class RecipeGen_MetalRecipe extends RecipeGen_Base { else { Logger.WARNING("Lathe Screw Recipe: "+material.getLocalizedName()+" - Failed"); } + + // Fine Wire + if (ItemUtils.checkForInvalidItems(material.getFineWire(1)) && (ItemUtils.checkForInvalidItems(material.getIngot(1)) || ItemUtils.checkForInvalidItems(material.getWire01(1)))) + if (GT_Values.RA.addWiremillRecipe( + ItemUtils.checkForInvalidItems(material.getWire01(1)) ? material.getWire01(1) : material.getIngot(1), + material.getFineWire(ItemUtils.checkForInvalidItems(material.getWire01(1)) ? 4 : 8), + 100, + 4)){ + Logger.WARNING("Wiremill Fine Wire Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Wiremill Fine Wire Recipe: "+material.getLocalizedName()+" - Failed"); + } + // Fine Wire + if (ItemUtils.checkForInvalidItems(material.getFineWire(1)) && (ItemUtils.checkForInvalidItems(material.getRod(1)))) + if (GT_Values.RA.addWiremillRecipe( + material.getRod(1), + material.getFineWire(4), + 50, + 4)){ + Logger.WARNING("Wiremill Fine Wire Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Wiremill Fine Wire Recipe: "+material.getLocalizedName()+" - Failed"); + } + } } \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java index 5f53defc2f..7355ac7dc0 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java @@ -8,6 +8,8 @@ import gregtech.api.util.GT_Utility; import gtPlusPlus.api.interfaces.RunnableWithInfo; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.ItemUtils; import net.minecraft.item.ItemStack; public class RecipeGen_Plasma extends RecipeGen_Base { @@ -27,15 +29,18 @@ public class RecipeGen_Plasma extends RecipeGen_Base { generateRecipes(this.toGenerate); } - private void generateRecipes(final Material material) { - // Cool Plasma - ItemStack aPlasmaCell = material.getPlasmaCell(1); - ItemStack aCell = material.getCell(1); - if (material.getPlasmaCell(1) != null){ - GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aPlasmaCell), GT_Utility.getFluidForFilledItem(aPlasmaCell, true) == null ? GT_Utility.getContainerItem(aPlasmaCell, true) : null, (int) Math.max(1024L, 1024L * material.getMass()), 4); - } - if (material.getCell(1) != null && material.getPlasmaCell(1) != null){ - GT_Values.RA.addVacuumFreezerRecipe(aPlasmaCell, aCell, (int) Math.max(material.getMass() * 2L, 1L)); + private void generateRecipes(final Material material) { + if (material.getPlasma() != null) { + // Cool Plasma + ItemStack aPlasmaCell = material.getPlasmaCell(1); + ItemStack aCell = material.getCell(1); + ItemStack aContainerItem = GT_Utility.getFluidForFilledItem(aPlasmaCell, true) == null ? GT_Utility.getContainerItem(aPlasmaCell, true) : CI.emptyCells(1); + if (ItemUtils.checkForInvalidItems(new ItemStack[] {aPlasmaCell, aContainerItem})){ + GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aPlasmaCell), aContainerItem, (int) Math.max(1024L, 1024L * material.getMass()), 4); + } + if (ItemUtils.checkForInvalidItems(new ItemStack[] {aCell, aPlasmaCell})){ + GT_Values.RA.addVacuumFreezerRecipe(aPlasmaCell, aCell, (int) Math.max(material.getMass() * 2L, 1L)); + } } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java index ea129a2b0e..7a596c3c42 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java @@ -9,6 +9,7 @@ import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.minecraft.RecipeUtils; import net.minecraft.item.ItemStack; @@ -177,6 +178,20 @@ public class RecipeGen_ShapedCrafting extends RecipeGen_Base { Logger.WARNING("Bolt Recipe: "+material.getLocalizedName()+" - Failed"); } } + + //Shaped Recipe - Fine Wire + if (!material.isRadioactive && ItemUtils.checkForInvalidItems(material.getFoil(1)) && ItemUtils.checkForInvalidItems(material.getFineWire(1))) { + if (RecipeUtils.addShapedRecipe( + material.getFoil(1), CI.craftingToolWireCutter, null, + null, null, null, + null, null, null, + material.getFineWire(1))){ + Logger.WARNING("Fine Wire Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Fine Wire Recipe: "+material.getLocalizedName()+" - Failed"); + } + } //Shaped Recipe - Ingot to Rod diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java index 9a5fa6f6de..3c1140fea0 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java @@ -40,7 +40,7 @@ public class GregtechConduits { * */ - private static OrePrefixes cableGt16; + public static OrePrefixes cableGt16; static{ if(GTNH) { try { @@ -52,7 +52,7 @@ public class GregtechConduits { } //30000-30999 - + private static int BaseWireID = 30600; private static int BasePipeID = 30700; private static int BasePipeHexadecupleID = 30100; @@ -74,7 +74,7 @@ public class GregtechConduits { } private static void run3() { - + if (Utils.getGregtechVersionAsInt() >= 50930) { try { Class aPipeEntity = GT_MetaPipeEntity_Fluid.class; @@ -103,17 +103,17 @@ public class GregtechConduits { e.printStackTrace(); } } - - + + //Generate Heat Pipes //GregtechItemList.HeatPipe_Tier_1.set(new GT_MetaPipeEntity_Heat(31021, "gtpp.pipe.heat.basic.01", "Lead Heat Pipe (500C)", Materials.Lead, 500).getStackForm(1L)); //GregtechItemList.HeatPipe_Tier_2.set(new GT_MetaPipeEntity_Heat(31022, "gtpp.pipe.heat.basic.02", "Iron Heat Pipe (500C)", Materials.Iron, 500).getStackForm(1L)); //GregtechItemList.HeatPipe_Tier_3.set(new GT_MetaPipeEntity_Heat(31023, "gtpp.pipe.heat.basic.03", "Silver Heat Pipe (1500C)", Materials.Silver, 1500).getStackForm(1L)); - - - + + + } - + private static void generateFluidMultiPipes(Constructor aClazz, Materials aMaterial, String name, String displayName, int startID, int baseCapacity, int heatCapacity, boolean gasProof){ GT_MetaPipeEntity_Fluid aPipe; try { @@ -453,245 +453,165 @@ public class GregtechConduits { return true; } - public static boolean generateWireRecipes(Material aMaterial){ + public static boolean generateWireRecipes(Material aMaterial) { + + ItemStack aPlate = aMaterial.getPlate(1); + ItemStack aIngot = aMaterial.getIngot(1); + ItemStack aWire01 = aMaterial.getWire01(1); + ItemStack aWire02 = aMaterial.getWire02(1); + ItemStack aWire04 = aMaterial.getWire04(1); + ItemStack aWire08 = aMaterial.getWire08(1); + ItemStack aWire12 = aMaterial.getWire12(1); + ItemStack aWire16 = aMaterial.getWire16(1); + ItemStack aCable01 = aMaterial.getCable01(1); + ItemStack aCable02 = aMaterial.getCable02(1); + ItemStack aCable04 = aMaterial.getCable04(1); + ItemStack aCable08 = aMaterial.getCable08(1); + ItemStack aCable12 = aMaterial.getCable12(1); + ItemStack aCable16 = aMaterial.getCable16(1); + + // Adds manual crafting recipe + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aPlate, aWire01})) { + RecipeUtils.addShapedRecipe(aPlate, CI.craftingToolWireCutter, null, null, null, null, null, null, null, aWire01); + } - //Adds manual crafting recipe - RecipeUtils.addShapedRecipe( - Utils.sanitizeString("plate"+aMaterial.getLocalizedName()), CI.craftingToolWireCutter, null, - null, null, null, - null, null, null, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1)); - - //Wire mill - GT_Values.RA.addWiremillRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("ingot"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), - 5*20, - 4); - - //Extruder - GT_Values.RA.addExtruderRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("ingot"+aMaterial.getLocalizedName()), 1), - ItemList.Shape_Extruder_Wire.get(0), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), - 196, - 96); - - GT_Values.RA.addUnboxingRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - null, - 100, - 8); - - //Shapeless Down-Crafting - //2x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1)}, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2) - ); - //4x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1)}, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 4) - ); - //8x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1)}, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 8) - ); - //12x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1)}, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 12) - ); - //16x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1)}, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 16) - ); - - - //1x -> 2x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1) - }, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1) - ); - - //2x -> 4x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1) - }, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1) - ); - - //4x -> 8x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1) - }, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1) - ); - - //8x -> 12x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1) - }, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1) - ); - - //12x -> 16x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1) - }, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1) - ); - - //8x -> 16x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1) - }, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1) - ); - - //1x -> 4x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1) - }, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1) - ); - - //1x -> 8x - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1) - }, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1) - ); - - - //Wire to Cable - //1x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - CI.getNumberedCircuit(24), - FluidUtils.getFluidStack("molten.rubber", 144), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt01"+aMaterial.getLocalizedName()), 1), - 100, - 8); - //2x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1), - CI.getNumberedCircuit(24), - FluidUtils.getFluidStack("molten.rubber", 144), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt02"+aMaterial.getLocalizedName()), 1), - 100, - 8); - //4x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), - CI.getNumberedCircuit(24), - FluidUtils.getFluidStack("molten.rubber", 288), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt04"+aMaterial.getLocalizedName()), 1), - 100, - 8); - //8x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1), - CI.getNumberedCircuit(24), - FluidUtils.getFluidStack("molten.rubber", 432), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt08"+aMaterial.getLocalizedName()), 1), - 100, - 8); - //12x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1), - CI.getNumberedCircuit(24), - FluidUtils.getFluidStack("molten.rubber", 576), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt12"+aMaterial.getLocalizedName()), 1), - 100, - 8); - - if(GTNH){ - //16x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1), - CI.getNumberedCircuit(24), - FluidUtils.getFluidStack("molten.rubber", 720), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt16"+aMaterial.getLocalizedName()), 1), - 100, - 8); - } - - //Assemble small wires into bigger wires - - //2x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), - CI.getNumberedCircuit(2), - null, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1), - 100, - 8); - - //4x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), - CI.getNumberedCircuit(4), - null, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), - 100, - 8); - - //8x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), - CI.getNumberedCircuit(8), - null, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1), - 100, - 8); - - //12x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), - CI.getNumberedCircuit(12), - null, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1), - 100, - 8); - - //16x - GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), - CI.getNumberedCircuit(16), - null, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1), - 100, - 8); + // Wire mill + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aIngot, aWire01})) { + GT_Values.RA.addWiremillRecipe(aIngot, aMaterial.getWire01(2), 5 * 20, 4); + } + + // Extruder + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aIngot, aWire01})) { + GT_Values.RA.addExtruderRecipe(aIngot, ItemList.Shape_Extruder_Wire.get(0), aMaterial.getWire01(2), 196, 96); + } + + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aCable01, aWire01})) { + GT_Values.RA.addUnboxingRecipe(aCable01, aWire01, null, 100, 8); + } + + // Shapeless Down-Crafting + // 2x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire01, aWire02})) { + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{aWire02}, aMaterial.getWire01(2)); + } + + // 4x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire01, aWire04})) { + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{aWire04}, aMaterial.getWire01(4)); + } + + // 8x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire01, aWire08})) { + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{aWire08}, aMaterial.getWire01(8)); + } + + // 12x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire01, aWire12})) { + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{aWire12}, aMaterial.getWire01(12)); + } + + // 16x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire01, aWire16})) { + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{aWire16}, aMaterial.getWire01(16)); + } + + // 1x -> 2x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire01, aWire02})) { + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{aWire01, aWire01}, aWire02); + } + + // 2x -> 4x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire02, aWire04})) { + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{aWire02, aWire02}, aWire04); + } + + // 4x -> 8x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire04, aWire08})) { + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{aWire04, aWire04}, aWire08); + } + + // 8x -> 12x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire04, aWire08, aWire12})) { + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{aWire04, aWire08}, aWire12); + } + + // 12x -> 16x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire04, aWire12, aWire16})) { + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{aWire04, aWire12}, aWire16); + } + + // 8x -> 16x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire08, aWire16})) { + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{aWire08, aWire08}, aWire16); + } + + // 1x -> 4x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire01, aWire04})) { + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{aWire01, aWire01, aWire01, aWire01}, aWire04); + } + + // 1x -> 8x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire01, aWire08})) { + RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{aWire01, aWire01, aWire01, aWire01, aWire01, aWire01, aWire01, aWire01}, aWire08); + } + + // Wire to Cable + // 1x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire01, aCable01})) { + GT_Values.RA.addAssemblerRecipe(aWire01, CI.getNumberedCircuit(24), FluidUtils.getFluidStack("molten.rubber", 144), aCable01, 100, 8); + } + + // 2x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire02, aCable02})) { + GT_Values.RA.addAssemblerRecipe(aWire02, CI.getNumberedCircuit(24), FluidUtils.getFluidStack("molten.rubber", 144), aCable02, 100, 8); + } + + // 4x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire04, aCable04})) { + GT_Values.RA.addAssemblerRecipe(aWire04, CI.getNumberedCircuit(24), FluidUtils.getFluidStack("molten.rubber", 288), aCable04, 100, 8); + } + + // 8x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire08, aCable08})) { + GT_Values.RA.addAssemblerRecipe(aWire08, CI.getNumberedCircuit(24), FluidUtils.getFluidStack("molten.rubber", 432), aCable08, 100, 8); + } + + // 12x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire12, aCable12})) { + GT_Values.RA.addAssemblerRecipe(aWire12, CI.getNumberedCircuit(24), FluidUtils.getFluidStack("molten.rubber", 576), aCable12, 100, 8); + } + + // 16x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire16, aCable16})) { + GT_Values.RA.addAssemblerRecipe(aWire16, CI.getNumberedCircuit(24), FluidUtils.getFluidStack("molten.rubber", 720), aCable16, 100, 8); + } + + // Assemble small wires into bigger wires + + // 2x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire01, aWire02})) { + GT_Values.RA.addAssemblerRecipe(aMaterial.getWire01(2), CI.getNumberedCircuit(2), null, aWire02, 100, 8); + } + + // 4x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire01, aWire02})) { + GT_Values.RA.addAssemblerRecipe(aMaterial.getWire01(4), CI.getNumberedCircuit(4), null, aWire04, 100, 8); + } + + // 8x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire01, aWire02})) { + GT_Values.RA.addAssemblerRecipe(aMaterial.getWire01(8), CI.getNumberedCircuit(8), null, aWire08, 100, 8); + } + + // 12x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire01, aWire02})) { + GT_Values.RA.addAssemblerRecipe(aMaterial.getWire01(12), CI.getNumberedCircuit(12), null, aWire12, 100, 8); + } + + // 16x + if (ItemUtils.checkForInvalidItems(new ItemStack[]{aWire01, aWire02})) { + GT_Values.RA.addAssemblerRecipe(aMaterial.getWire01(16), CI.getNumberedCircuit(16), null, aWire16, 100, 8); + } return true; } -- cgit From 860bded5892357e4575595c71ccce5a0351abe12 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sat, 15 Jan 2022 13:29:00 +0000 Subject: Added ability for GT++ Plates and Foils to be used as covers. Added missing foil recipes. --- .../gtPlusPlus/core/item/base/BaseItemComponent.java | 9 ++++++++- .../xmod/gregtech/loaders/RecipeGen_Plates.java | 18 +++++++++++++++++- .../gregtech/loaders/RecipeGen_ShapedCrafting.java | 14 ++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) (limited to 'src/main/java/gtPlusPlus/core/item') diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java index 3b0b868553..af03fd2b83 100644 --- a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java +++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java @@ -7,15 +7,16 @@ import java.util.Map; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.TextureSet; +import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_OreDictUnificator; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.creative.AddToCreativeTab; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.state.MaterialState; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.data.StringUtils; import gtPlusPlus.core.util.math.MathUtils; @@ -117,6 +118,12 @@ public class BaseItemComponent extends Item{ aMap.put(aKey, ItemUtils.getSimpleStack(this)); Logger.MATERIALS("Registering a material component. Item: ["+componentMaterial.getUnlocalizedName()+"] Map: ["+aKey+"]"); Material.mComponentMap.put(componentMaterial.getUnlocalizedName(), aMap); + if (componentType == ComponentTypes.PLATE) { + GregTech_API.registerCover(componentMaterial.getPlate(1), new GT_RenderedTexture(componentMaterial.getTextureSet().mTextures[71], componentMaterial.getRGBA(), false), null); + } + else if (componentType == ComponentTypes.PLATEDOUBLE) { + GregTech_API.registerCover(componentMaterial.getPlateDouble(1), new GT_RenderedTexture(componentMaterial.getTextureSet().mTextures[72], componentMaterial.getRGBA(), false), null); + } return true; } else { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java index 56d11520d0..6b512f4b3a 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java @@ -6,6 +6,8 @@ import java.util.Set; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Recipe; import gtPlusPlus.api.interfaces.RunnableWithInfo; import gtPlusPlus.api.objects.Logger; @@ -93,7 +95,7 @@ public class RecipeGen_Plates extends RecipeGen_Base { Logger.WARNING("Cutting Machine Recipe: "+material.getLocalizedName()+" - Success"); } else { - Logger.WARNING("ACutting Machine Recipe: "+material.getLocalizedName()+" - Failed"); + Logger.WARNING("Cutting Machine Recipe: "+material.getLocalizedName()+" - Failed"); } @@ -121,6 +123,20 @@ public class RecipeGen_Plates extends RecipeGen_Base { else { Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Failed"); } + + //Bender + if (ItemUtils.checkForInvalidItems(material.getPlate(1)) && ItemUtils.checkForInvalidItems(material.getFoil(1))) + if (addBenderRecipe( + material.getPlate(1), + material.getFoil(4), + (int) Math.max(material.getMass(), 1L), + material.vVoltageMultiplier)){ + GregTech_API.registerCover(material.getFoil(1), new GT_RenderedTexture(material.getTextureSet().mTextures[70], material.getRGBA(), false), null); + Logger.WARNING("Bender Foil Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Bender Foil Recipe: "+material.getLocalizedName()+" - Failed"); + } } public static boolean addBenderRecipe(final ItemStack aInput1, final ItemStack aOutput1, int aDuration, final int aEUt) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java index 7a596c3c42..1a6221b09e 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java @@ -192,6 +192,20 @@ public class RecipeGen_ShapedCrafting extends RecipeGen_Base { Logger.WARNING("Fine Wire Recipe: "+material.getLocalizedName()+" - Failed"); } } + + //Shaped Recipe - Foil + if (ItemUtils.checkForInvalidItems(material.getFoil(1)) && ItemUtils.checkForInvalidItems(material.getPlate(1))) { + if (RecipeUtils.addShapedRecipe( + CI.craftingToolHammer_Hard, material.getPlate(1), null, + null, null, null, + null, null, null, + material.getFoil(2))){ + Logger.WARNING("Foil Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Foil Recipe: "+material.getLocalizedName()+" - Failed"); + } + } //Shaped Recipe - Ingot to Rod -- cgit From 8bde0c540d0f59923e2411356491b0f0dc0d5926 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sat, 15 Jan 2022 18:22:32 +0000 Subject: Added recipes for Generator Array Controller, Multi Forge Hammer, Multi Molecular Transformer. Added recipes for Crop Managers, Inventory Managers, Electric Crafting Tables. Added recipes for Redstone Lamps, Redstone Gauges, Redstone Scales & Redstone Button Panels. Finished Multi Forge Hammer structure check. Changed tiering of Energy Crystal down to EV. --- .../core/item/crafting/ItemDummyResearch.java | 3 +- src/main/java/gtPlusPlus/core/material/ALLOY.java | 8 +- .../gtPlusPlus/core/recipe/RECIPES_Machines.java | 311 +++++++++++++++++++++ .../java/gtPlusPlus/core/recipe/common/CI.java | 11 + .../blocks/GregtechMetaSpecialMultiCasings.java | 2 +- .../common/blocks/textures/TexturesGtBlock.java | 3 +- ...egtechMetaTileEntity_IndustrialForgeHammer.java | 29 +- .../registration/gregtech/Gregtech4Content.java | 2 +- .../textures/blocks/metro/TEXTURE_MAGIC_B.png | Bin 0 -> 2174 bytes .../blocks/metro/TEXTURE_MAGIC_B.png.mcmeta | 6 + 10 files changed, 352 insertions(+), 23 deletions(-) create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_B.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_B.png.mcmeta (limited to 'src/main/java/gtPlusPlus/core/item') diff --git a/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java b/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java index d8ddb26675..b7bf8a7c8e 100644 --- a/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java +++ b/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java @@ -29,7 +29,8 @@ public class ItemDummyResearch extends ItemGenericToken { RESEARCH_7_ADV_METALLURGY("Advanced Metallurgy", "Advanced Material Sciences!"), RESEARCH_8_TURBINE_AUTOMATION("Turbine Automation", "You really don't want to share this with anyone!"), RESEARCH_9_CLOAKING("Cloaking Technologies", "Sneaking around like a mouse"), - RESEARCH_10_SPARGING("Gas Sparging", "Blowing gas for results"); + RESEARCH_10_SPARGING("Gas Sparging", "Blowing gas for results"), + RESEARCH_11_MOLECULAR_TRANSFORMER("Molecular Transformation", "Turning things into something better"); diff --git a/src/main/java/gtPlusPlus/core/material/ALLOY.java b/src/main/java/gtPlusPlus/core/material/ALLOY.java index fd7547970c..ba0963397c 100644 --- a/src/main/java/gtPlusPlus/core/material/ALLOY.java +++ b/src/main/java/gtPlusPlus/core/material/ALLOY.java @@ -22,10 +22,10 @@ public final class ALLOY { "Energy Crystal", //Material Name MaterialState.SOLID, //State new short[]{228, 255, 0, 0}, //Material Colour - 5660, //Melting Point in C - 7735, //Boiling Point in C - 150, //Protons - 80, //Neutrons + 4660, //Melting Point in C + 5735, //Boiling Point in C + 90, //Protons + 40, //Neutrons true, //Uses Blast furnace? "⬟ ⯂ ⬢ ⬣ ⯃ ⯄", //Material Stacks with Percentage of required elements. diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java index 54a30327a8..f8c027bc40 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java @@ -254,9 +254,320 @@ public class RECIPES_Machines { zyngen(); milling(); sparging(); + + gt4FarmManager(); + gt4Redstone(); + gt4Inventory(); + + multiGeneratorArray(); + multiForgeHammer(); + multiMolecularTransformer(); + multiXlTurbines(); + multiSolarTower(); + multiElementalDuplicator(); + + resonanceChambers(); + modulators(); + + + } + + + private static void gt4FarmManager() { + + + + ItemList[] aInputHatches = new ItemList[] { + ItemList.Hatch_Input_LV, ItemList.Hatch_Input_MV, ItemList.Hatch_Input_HV, + ItemList.Hatch_Input_EV, ItemList.Hatch_Input_IV, ItemList.Hatch_Input_LuV, + ItemList.Hatch_Input_ZPM, ItemList.Hatch_Input_UV + }; + GregtechItemList[] aOutputMachines = new GregtechItemList[] { + GregtechItemList.GT4_Crop_Harvester_LV, GregtechItemList.GT4_Crop_Harvester_MV, GregtechItemList.GT4_Crop_Harvester_HV, + GregtechItemList.GT4_Crop_Harvester_EV, GregtechItemList.GT4_Crop_Harvester_IV, GregtechItemList.GT4_Crop_Harvester_LuV, + GregtechItemList.GT4_Crop_Harvester_ZPM, GregtechItemList.GT4_Crop_Harvester_UV + }; + + int aTier = 1; + for (int i=0;i<8;i++) { + RecipeUtils.addShapedRecipe( + CI.getRobotArm(aTier, 1), CI.getSensor(aTier, 1), CI.getRobotArm(aTier, 1), + ItemUtils.getOrePrefixStack(OrePrefixes.toolHeadSense, CI.tieredMaterials[aTier], 1), CI.getTieredMachineHull(aTier, 1), ItemUtils.getOrePrefixStack(OrePrefixes.toolHeadSense, CI.tieredMaterials[aTier], 1), + CI.getTieredCircuitOreDictName(aTier), aInputHatches[i].get(1), CI.getTieredCircuitOreDictName(aTier), + aOutputMachines[i].get(1)); + aTier++; + } + + } + private static void gt4Redstone() { + + RecipeUtils.addShapedRecipe( + "plateIron", "plateGlass", "plateIron", + "plateGlass", ItemUtils.getSimpleStack(Blocks.redstone_lamp), "plateGlass", + "plateIron", "plateGlass", "plateIron", + GregtechItemList.GT4_Redstone_Lamp.get(2)); + RecipeUtils.addShapedRecipe( + "plateAluminium", "plateGlass", "plateAluminium", + "plateGlass", ItemUtils.getSimpleStack(Blocks.redstone_lamp), "plateGlass", + "plateAluminium", "plateGlass", "plateAluminium", + GregtechItemList.GT4_Redstone_Lamp.get(8)); + + RecipeUtils.addShapedRecipe( + "plateIron", "plateIron", "plateIron", + ItemUtils.getSimpleStack(Items.comparator), ItemList.Cover_Screen.get(1), ItemUtils.getSimpleStack(Items.comparator), + "plateIron", "plateIron", "plateIron", + GregtechItemList.GT4_Redstone_Display.get(2)); + RecipeUtils.addShapedRecipe( + "plateAluminium", "plateAluminium", "plateAluminium", + ItemUtils.getSimpleStack(Items.comparator), ItemList.Cover_Screen.get(1), ItemUtils.getSimpleStack(Items.comparator), + "plateAluminium", "plateAluminium", "plateAluminium", + GregtechItemList.GT4_Redstone_Display.get(8)); + + RecipeUtils.addShapedRecipe( + "plateIron", "plateIron", "plateIron", + ItemUtils.getSimpleStack(Items.comparator), ItemList.Cover_EnergyDetector.get(1), ItemUtils.getSimpleStack(Items.comparator), + "plateIron", "plateIron", "plateIron", + GregtechItemList.GT4_Redstone_Scale.get(2)); + RecipeUtils.addShapedRecipe( + "plateAluminium", "plateAluminium", "plateAluminium", + ItemUtils.getSimpleStack(Items.comparator), ItemList.Cover_EnergyDetector.get(1), ItemUtils.getSimpleStack(Items.comparator), + "plateAluminium", "plateAluminium", "plateAluminium", + GregtechItemList.GT4_Redstone_Scale.get(8)); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getTieredMachineHull(1), + ItemUtils.getSimpleStack(Blocks.stone_button, 16) + }, + null, + GregtechItemList.GT4_Redstone_Button_Panel.get(1), + 800, + 4); + + } + private static void gt4Inventory() { + + ItemList[] aEnergyHatches = new ItemList[] { + ItemList.Hatch_Energy_LV, ItemList.Hatch_Energy_MV, ItemList.Hatch_Energy_HV, + ItemList.Hatch_Energy_EV, ItemList.Hatch_Energy_IV, ItemList.Hatch_Energy_LuV, + ItemList.Hatch_Energy_ZPM, ItemList.Hatch_Energy_UV + }; + + ItemList[] aRegulators = new ItemList[] { + ItemList.Automation_Regulator_LV, ItemList.Automation_Regulator_MV, ItemList.Automation_Regulator_HV, + ItemList.Automation_Regulator_EV, ItemList.Automation_Regulator_IV, ItemList.Automation_Regulator_LuV, + ItemList.Automation_Regulator_ZPM, ItemList.Automation_Regulator_UV + }; + + GregtechItemList[] aOutputInventoryManager = new GregtechItemList[] { + GregtechItemList.GT4_Electric_Inventory_Manager_LV, GregtechItemList.GT4_Electric_Inventory_Manager_MV, GregtechItemList.GT4_Electric_Inventory_Manager_HV, + GregtechItemList.GT4_Electric_Inventory_Manager_EV, GregtechItemList.GT4_Electric_Inventory_Manager_IV, GregtechItemList.GT4_Electric_Inventory_Manager_LuV, + GregtechItemList.GT4_Electric_Inventory_Manager_ZPM, GregtechItemList.GT4_Electric_Inventory_Manager_UV + }; + + int aTier = 1; + for (int i=0;i<8;i++) { + RecipeUtils.addShapedRecipe( + CI.getTieredCircuitOreDictName(aTier), aRegulators[i].get(1), CI.getTieredCircuitOreDictName(aTier), + CI.getRobotArm(aTier, 1), CI.getTieredMachineHull(aTier), CI.getRobotArm(aTier, 1), + CI.getTieredCircuitOreDictName(aTier), aEnergyHatches[i].get(1), CI.getTieredCircuitOreDictName(aTier), + aOutputInventoryManager[i].get(1)); + aTier++; + } + + GregtechItemList[] aOutputElectricCraftingTable = new GregtechItemList[] { + GregtechItemList.GT4_Electric_Auto_Workbench_LV, GregtechItemList.GT4_Electric_Auto_Workbench_MV, GregtechItemList.GT4_Electric_Auto_Workbench_HV, + GregtechItemList.GT4_Electric_Auto_Workbench_EV, GregtechItemList.GT4_Electric_Auto_Workbench_IV, GregtechItemList.GT4_Electric_Auto_Workbench_LuV, + GregtechItemList.GT4_Electric_Auto_Workbench_ZPM, GregtechItemList.GT4_Electric_Auto_Workbench_UV + }; + + aTier = 1; + for (int i=0;i<8;i++) { + RecipeUtils.addShapedRecipe( + ItemUtils.getOrePrefixStack(OrePrefixes.plate, CI.tieredMaterials[aTier], 1), ItemUtils.getSimpleStack(Blocks.crafting_table), ItemUtils.getOrePrefixStack(OrePrefixes.plate, CI.tieredMaterials[aTier], 1), + CI.getTieredCircuitOreDictName(aTier), CI.getTieredMachineHull(aTier), CI.getTieredCircuitOreDictName(aTier), + ItemUtils.getOrePrefixStack(OrePrefixes.plate, CI.tieredMaterials[aTier], 1), CI.getRobotArm(aTier, 1), ItemUtils.getOrePrefixStack(OrePrefixes.plate, CI.tieredMaterials[aTier], 1), + aOutputElectricCraftingTable[i].get(1)); + aTier++; + } + + } + + private static void multiGeneratorArray() { + + GT_ModHandler.addCraftingRecipe( + ItemList.Processing_Array.get(1L), + CI.bitsd, + new Object[]{"CTC", "FMF", "CBC", + 'M', CI.getTieredGTPPMachineCasing(4, 1), + 'B', OrePrefixes.pipeHuge.get(Materials.StainlessSteel), + 'C', OrePrefixes.circuit.get(Materials.Data), + 'F', ItemList.Electric_Pump_EV, + 'T', CI.getSensor(4, 1)}); + } + + private static void multiForgeHammer() { + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getTieredGTPPMachineCasing(4, 1), + ItemList.Machine_IV_Hammer.get(1), + CI.getPlate(4, 8), + CI.getBolt(5, 32), + ELEMENT.getInstance().ZIRCONIUM.getFineWire(32), + ItemUtils.getItemStackOfAmountFromOreDict("circuitElite", 4) + }, + CI.getTieredFluid(4, 144 * 12), + GregtechItemList.Controller_IndustrialForgeHammer.get(1), + 20 * 30, + MaterialUtils.getVoltageForTier(5)); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getTieredGTPPMachineCasing(3, 1), + ItemList.Casing_HeatProof.get(1), + CI.getPlate(4, 2), + CI.getBolt(4, 8), + ALLOY.BABBIT_ALLOY.getFineWire(16), + ItemUtils.getItemStackOfAmountFromOreDict("circuitGood", 4) + }, + CI.getTieredFluid(4, 144 * 2), + GregtechItemList.Casing_IndustrialForgeHammer.get(1), + 20 * 30, + MaterialUtils.getVoltageForTier(4)); + + } + + private static void multiMolecularTransformer() { + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getTieredGTPPMachineCasing(6, 1), + CI.getPlate(5, 16), + CI.getBolt(5, 32), + ALLOY.HG1223.getFineWire(64), + CI.getEmitter(4, 8), + ItemUtils.getItemStackOfAmountFromOreDict("circuitMaster", 10) + }, + CI.getTieredFluid(5, 144 * 16), + ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_11_MOLECULAR_TRANSFORMER, 1), + 20 * 60, + MaterialUtils.getVoltageForTier(5)); + + CORE.RA.addAssemblylineRecipe( + ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_11_MOLECULAR_TRANSFORMER, 1), + 20 * 60 * 30, + new Object[] { + ALLOY.HG1223.getFineWire(64), + ALLOY.HG1223.getFineWire(64), + ItemList.Electric_Motor_IV.get(GTNH ? 32 : 16), + ItemList.Energy_LapotronicOrb.get(GTNH ? 32 : 16), + CI.getTieredComponent(OrePrefixes.cableGt12, 6, GTNH ? 32 : 16), + CI.getTieredComponent(OrePrefixes.wireGt16, 5, GTNH ? 64 : 32), + ALLOY.ZERON_100.getFrameBox(4), + ALLOY.ZIRCONIUM_CARBIDE.getPlateDouble(32), + ALLOY.BABBIT_ALLOY.getPlate(64), + ALLOY.LEAGRISIUM.getGear(GTNH ? 16 : 8), + new Object[] {CI.getTieredCircuitOreDictName(4), 64}, + new Object[] {CI.getTieredCircuitOreDictName(5), 32}, + new Object[] {CI.getTieredCircuitOreDictName(6), 16}, + GregtechItemList.Laser_Lens_WoodsGlass.get(1), + }, + new FluidStack[] { + ALLOY.NITINOL_60.getFluidStack(144 * 9 * (GTNH ? 4 : 2)), + ALLOY.INCOLOY_MA956.getFluidStack(144 * 9 * (GTNH ? 32 : 8)), + ALLOY.KANTHAL.getFluidStack(144 * 1 * (GTNH ? 16 : 4)), + }, + GregtechItemList.Controller_MolecularTransformer.get(1), + 20 * 60 * 10 * (GTNH ? 2 : 1), + (int) MaterialUtils.getVoltageForTier(6)); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(16), + CI.getPlate(6, 4), + CI.getScrew(6, 8), + ELEMENT.getInstance().PALLADIUM.getFineWire(16), + CI.getSensor(5, 2), + ItemUtils.getItemStackOfAmountFromOreDict("circuitElite", 4) + }, + CI.getTieredFluid(5, 144 * 4), + GregtechItemList.Casing_Molecular_Transformer_1.get(1), + 20 * 20, + MaterialUtils.getVoltageForTier(5)); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(16), + CI.getPlate(5, 4), + CI.getScrew(5, 8), + ItemList.Casing_Coil_Nichrome.get(2), + CI.getFieldGenerator(3, 2), + ItemUtils.getItemStackOfAmountFromOreDict("circuitData", 8) + }, + CI.getTieredFluid(5, 144 * 4), + GregtechItemList.Casing_Molecular_Transformer_2.get(1), + 20 * 20, + MaterialUtils.getVoltageForTier(5)); + + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(16), + ItemUtils.getSimpleStack(Blocks.glowstone, 16), + CI.getGear(5, 8), + ELEMENT.getInstance().TITANIUM.getWire04(4), + CI.getFieldGenerator(4, 2), + ItemUtils.getItemStackOfAmountFromOreDict("circuitData", 8) + }, + CI.getTieredFluid(5, 144 * 4), + GregtechItemList.Casing_Molecular_Transformer_3.get(1), + 20 * 60, + MaterialUtils.getVoltageForTier(5)); + + } + + private static void multiXlTurbines() { + + } + + private static void multiSolarTower() { + + } + + private static void multiElementalDuplicator() { + + } + + private static void resonanceChambers() { + int aFieldTier = 1; + int aCasingTier = 4; + for (int i = 0; i < 4; i++) { + RecipeUtils.addShapedRecipe( + CI.getDoublePlate(aCasingTier, 1), CI.getFieldGenerator(aFieldTier, 1), CI.getDoublePlate(aCasingTier, 1), + CI.getFieldGenerator(aFieldTier, 1), CI.getTieredMachineCasing(aCasingTier), CI.getFieldGenerator(aFieldTier, 1), + CI.getDoublePlate(aCasingTier, 1), CI.getFieldGenerator(aFieldTier, 1), CI.getDoublePlate(aCasingTier, 1), + ItemUtils.simpleMetaStack(ModBlocks.blockSpecialMultiCasings2, i, 1)); + aCasingTier++; + aFieldTier++; + } + } + + private static void modulators() { + int aCasingTier = 4; + for (int i = 4; i < 8; i++) { + RecipeUtils.addShapedRecipe( + CI.getTieredCircuitOreDictName(aCasingTier), CI.getPlate(aCasingTier, 1), CI.getTieredCircuitOreDictName(aCasingTier), + CI.getPlate(aCasingTier, 1), CI.getTieredMachineCasing(aCasingTier), CI.getPlate(aCasingTier, 1), + CI.getTieredCircuitOreDictName(aCasingTier), CI.getPlate(aCasingTier, 1), CI.getTieredCircuitOreDictName(aCasingTier), + ItemUtils.simpleMetaStack(ModBlocks.blockSpecialMultiCasings2, i, 1)); + aCasingTier++; + } + } + private static void zyngen() { CORE.RA.addSixSlotAssemblingRecipe( new ItemStack[] { diff --git a/src/main/java/gtPlusPlus/core/recipe/common/CI.java b/src/main/java/gtPlusPlus/core/recipe/common/CI.java index 0a1b762a97..7746885ba2 100644 --- a/src/main/java/gtPlusPlus/core/recipe/common/CI.java +++ b/src/main/java/gtPlusPlus/core/recipe/common/CI.java @@ -181,6 +181,13 @@ public class CI { public static ItemStack explosiveTNT; public static ItemStack explosiveITNT; + public static Materials[] tieredMaterials = new Materials[] { + Materials.Iron, Materials.Steel, Materials.Aluminium, + Materials.StainlessSteel, Materials.Titanium, Materials.TungstenSteel, + Materials.Chrome, Materials.Iridium, Materials.Osmium, + Materials.Neutronium + };; + public static void preInit(){ //Tiered Components @@ -672,6 +679,10 @@ public class CI { public static ItemStack getBolt(int aTier, int aAmount) { return getTieredComponent(OrePrefixes.bolt, aTier, aAmount); } + + public static ItemStack getScrew(int aTier, int aAmount) { + return getTieredComponent(OrePrefixes.screw, aTier, aAmount); + } public static ItemStack getTieredComponent(OrePrefixes aPrefix, int aTier, int aAmount) { aTier = Math.max(0, aTier); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java index 38d8b38f88..a9c8a1e9bc 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java @@ -113,7 +113,7 @@ public class GregtechMetaSpecialMultiCasings extends GregtechMetaCasingBlocksAbs case 12: return TexturesGtBlock.Casing_Redox_5.getIcon(); case 13: - return TexturesGtBlock.TEXTURE_MAGIC_PANEL_A.getIcon(); + return TexturesGtBlock.TEXTURE_MAGIC_PANEL_B.getIcon(); } return Textures.BlockIcons.RENDERING_ERROR.getIcon(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index 8f68b646f9..5642baa32d 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -563,8 +563,9 @@ public class TexturesGtBlock { public static final CustomIcon TEXTURE_METAL_PANEL_G = new CustomIcon("metro/TEXTURE_METAL_PANEL_G"); public static final CustomIcon TEXTURE_METAL_PANEL_H = new CustomIcon("metro/TEXTURE_METAL_PANEL_H"); public static final CustomIcon TEXTURE_METAL_PANEL_I = new CustomIcon("metro/TEXTURE_METAL_PANEL_I"); - + public static final CustomIcon TEXTURE_MAGIC_PANEL_A = new CustomIcon("metro/TEXTURE_MAGIC_A"); + public static final CustomIcon TEXTURE_MAGIC_PANEL_B = new CustomIcon("metro/TEXTURE_MAGIC_B"); public static final CustomIcon TEXTURE_ORGANIC_PANEL_A = new CustomIcon("metro/TEXTURE_ORGANIC_PANEL_A"); public static final CustomIcon TEXTURE_ORGANIC_PANEL_A_GLOWING = new CustomIcon("metro/TEXTURE_ORGANIC_PANEL_A_GLOWING"); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialForgeHammer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialForgeHammer.java index 89e1e303a8..b354d55a83 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialForgeHammer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialForgeHammer.java @@ -1,9 +1,6 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; import java.util.ArrayList; @@ -18,15 +15,9 @@ import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; +import gregtech.api.metatileentity.implementations.*; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.*; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; @@ -37,9 +28,10 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -public class GregtechMetaTileEntity_IndustrialForgeHammer extends GregtechMeta_MultiBlockBase { +public class GregtechMetaTileEntity_IndustrialForgeHammer extends GregtechMeta_MultiBlockBase { private int mCasing; + private int mAnvil; private IStructureDefinition STRUCTURE_DEFINITION = null; public GregtechMetaTileEntity_IndustrialForgeHammer(final int aID, final String aName, final String aNameRegional) { @@ -106,7 +98,14 @@ public class GregtechMetaTileEntity_IndustrialForgeHammer extends GregtechMeta_M ) ) ) - + .addElement('A', ofChain( + onElementPass(x -> ++x.mAnvil, ofBlock(sAnvil, 1)), + onElementPass(x -> ++x.mAnvil, ofBlock(sSteelAnvil, 1)), + onElementPass(x -> ++x.mAnvil, ofBlock(sDarkSteelAnvil, 1)), + onElementPass(x -> ++x.mAnvil, ofBlock(sThaumiumAnvil, 1)), + onElementPass(x -> ++x.mAnvil, ofBlock(sVoidAnvil, 1)) + ) + ) //.addElement('A', ofBlockAdder(GregtechMetaTileEntity_IndustrialForgeHammer::isBlockAnvil, Blocks.anvil, 1)) .build(); @@ -188,7 +187,7 @@ public class GregtechMetaTileEntity_IndustrialForgeHammer extends GregtechMeta_M tBusItems.add(tBus.getBaseMetaTileEntity().getStackInSlot(i)); } } - if (checkRecipeGeneric(tBusItems.toArray(new ItemStack[]{}), new FluidStack[]{}, getMaxParallelRecipes(), 100, 100 * aAnvilTier, 10000)) { + if (checkRecipeGeneric(tBusItems.toArray(new ItemStack[]{}), new FluidStack[]{}, getMaxParallelRecipes() * aAnvilTier, 100, 100, 10000)) { return true; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java index c4a27079f7..75128392ea 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java @@ -74,7 +74,7 @@ public class Gregtech4Content { GregtechItemList.GT4_Electric_Auto_Workbench_LV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31091, 1, "Automatic crafting machine").getStackForm(1L)); GregtechItemList.GT4_Electric_Auto_Workbench_MV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31092, 2, "Automatic crafting machine").getStackForm(1L)); GregtechItemList.GT4_Electric_Auto_Workbench_HV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31093, 3, "Automatic crafting machine").getStackForm(1L)); - GregtechItemList.GT4_Electric_Auto_Workbench_LV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31094, 4, "Automatic crafting machine").getStackForm(1L)); + GregtechItemList.GT4_Electric_Auto_Workbench_EV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31094, 4, "Automatic crafting machine").getStackForm(1L)); GregtechItemList.GT4_Electric_Auto_Workbench_IV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31095, 5, "Automatic crafting machine").getStackForm(1L)); GregtechItemList.GT4_Electric_Auto_Workbench_LuV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31096, 6, "Automatic crafting machine").getStackForm(1L)); GregtechItemList.GT4_Electric_Auto_Workbench_ZPM.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31097, 7, "Automatic crafting machine").getStackForm(1L)); diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_B.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_B.png new file mode 100644 index 0000000000..265d18b0f7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_B.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_B.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_B.png.mcmeta new file mode 100644 index 0000000000..d0b9e70fe5 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_B.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":4, + "frames": [0, 2, 3, 3, 4, 5, 6, 7, 7, 6, 5, 4, 3, 2, 1, 0] + } +} \ No newline at end of file -- cgit From 8b30aa2f33741a9782cb9a1ef8628c4671723a58 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Thu, 20 Jan 2022 20:04:40 +0000 Subject: Add way to make Sunnarium without MT. Fix early init of FmlCommonHandler. --- .../block/general/BlockCompressedObsidian.java | 14 ++- src/main/java/gtPlusPlus/core/item/ModItems.java | 4 + .../core/item/general/ItemSunnariumBit.java | 16 ++++ .../gtPlusPlus/core/recipe/RECIPES_GREGTECH.java | 106 ++++++++++++--------- .../gtPlusPlus/core/recipe/RECIPES_General.java | 29 +++++- .../preloader/asm/Preloader_FMLLoadingPlugin.java | 2 +- .../resources/assets/miscutils/lang/en_US.lang | 5 + .../textures/blocks/compressed/glowstone1.png | Bin 0 -> 900 bytes .../textures/blocks/compressed/glowstone2.png | Bin 0 -> 997 bytes .../textures/blocks/compressed/glowstone3.png | Bin 0 -> 1138 bytes .../textures/blocks/compressed/glowstone4.png | Bin 0 -> 1175 bytes .../textures/blocks/compressed/glowstone5.png | Bin 0 -> 1276 bytes .../miscutils/textures/items/itemSunnariumBit.png | Bin 0 -> 276 bytes 13 files changed, 125 insertions(+), 51 deletions(-) create mode 100644 src/main/java/gtPlusPlus/core/item/general/ItemSunnariumBit.java create mode 100644 src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone5.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemSunnariumBit.png (limited to 'src/main/java/gtPlusPlus/core/item') diff --git a/src/main/java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java b/src/main/java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java index 03ca846b7d..2cf40160a3 100644 --- a/src/main/java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java +++ b/src/main/java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java @@ -23,7 +23,7 @@ import gtPlusPlus.core.lib.CORE; public class BlockCompressedObsidian extends BlockObsidian { - private final IIcon textureArray[] = new IIcon[6]; + private final IIcon textureArray[] = new IIcon[11]; public BlockCompressedObsidian() { this.setBlockName("blockCompressedObsidian"); @@ -36,9 +36,12 @@ public class BlockCompressedObsidian extends BlockObsidian { @Override public MapColor getMapColor(final int meta) { - if (meta != 5) { + if (meta < 5) { return MapColor.obsidianColor; } + if (meta > 5) { + return MapColor.goldColor; + } else { return MapColor.sandColor; } @@ -53,6 +56,11 @@ public class BlockCompressedObsidian extends BlockObsidian { this.textureArray[3] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "obsidian4"); this.textureArray[4] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "obsidian5"); this.textureArray[5] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "obsidian_invert"); + this.textureArray[6] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "glowstone1"); + this.textureArray[7] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "glowstone2"); + this.textureArray[8] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "glowstone3"); + this.textureArray[9] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "glowstone4"); + this.textureArray[10] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "glowstone5"); } /** @@ -71,7 +79,7 @@ public class BlockCompressedObsidian extends BlockObsidian { @Override public void getSubBlocks(final Item item, final CreativeTabs tab, final List list) { - for (int i = 0; i < 6; i++) { + for (int i = 0; i < 11; i++) { list.add(new ItemStack(item, 1, i)); } } diff --git a/src/main/java/gtPlusPlus/core/item/ModItems.java b/src/main/java/gtPlusPlus/core/item/ModItems.java index 99ecd96d87..fd3d8c7a2b 100644 --- a/src/main/java/gtPlusPlus/core/item/ModItems.java +++ b/src/main/java/gtPlusPlus/core/item/ModItems.java @@ -305,6 +305,8 @@ public final class ModItems { public static ItemGenericToken itemGenericToken; public static Item itemControlCore; + + public static Item itemSunnariumBit; public static ItemStack itemHotTitaniumIngot; @@ -867,6 +869,8 @@ public final class ModItems { itemDragonJar = new ItemEntityCatcher(); itemControlCore = new ItemControlCore(); + + itemSunnariumBit = new ItemSunnariumBit(); //Chemistry new CoalTar(); diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemSunnariumBit.java b/src/main/java/gtPlusPlus/core/item/general/ItemSunnariumBit.java new file mode 100644 index 0000000000..fb713d4962 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/ItemSunnariumBit.java @@ -0,0 +1,16 @@ +package gtPlusPlus.core.item.general; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.CoreItem; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.item.EnumRarity; +import net.minecraft.util.EnumChatFormatting; + +public class ItemSunnariumBit extends CoreItem { + + public ItemSunnariumBit() { + super("item.SunnariumBit", "Sunnarium Bit", AddToCreativeTab.tabMisc, 64, 0, new String[] {}, EnumRarity.uncommon, EnumChatFormatting.GOLD, false, null); + this.setTextureName(CORE.MODID+":"+"itemSunnariumBit"); + } + +} diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java index adf93c0f69..57c44207a5 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java @@ -4,15 +4,13 @@ import static gtPlusPlus.core.lib.CORE.GTNH; import java.util.ArrayList; +import advsolar.common.AdvancedSolarPanel; import cpw.mods.fml.common.Loader; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.HotFuel; -import gregtech.api.util.ThermalFuel; +import gregtech.api.util.*; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.item.ModItems; @@ -93,6 +91,7 @@ public class RECIPES_GREGTECH { fluidheaterRecipes(); chemplantRecipes(); packagerRecipes(); + implosionRecipes(); /** @@ -112,8 +111,18 @@ public class RECIPES_GREGTECH { private static void packagerRecipes() { - - + + + } + + private static void implosionRecipes() { + + GT_Values.RA.addImplosionRecipe( + ItemUtils.getSimpleStack(ModItems.itemSunnariumBit, 9), + 16, + ItemUtils.getSimpleStack(AdvancedSolarPanel.itemSunnariumPart, 1), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glowstone, 8)); + } private static void chemplantRecipes() { @@ -358,7 +367,7 @@ public class RECIPES_GREGTECH { CI.getTertiaryTieredFluid(aLaureniumTier-2, 6 * 144) }, new ItemStack[] { - GregtechItemList.Casing_Machine_Custom_3.get(1) + GregtechItemList.Casing_Machine_Custom_3.get(1) }, new FluidStack[] { @@ -366,7 +375,7 @@ public class RECIPES_GREGTECH { 20 * 20, MaterialUtils.getVoltageForTier(aLaureniumTier-2), 5); - + int aBotmiumTier = ALLOY.BOTMIUM.vTier; // Adding Recipes for Casings CORE.RA.addChemicalPlantRecipe( @@ -382,7 +391,7 @@ public class RECIPES_GREGTECH { CI.getTertiaryTieredFluid(aBotmiumTier-2, 6 * 144) }, new ItemStack[] { - GregtechItemList.Casing_Machine_Custom_4.get(1) + GregtechItemList.Casing_Machine_Custom_4.get(1) }, new FluidStack[] { @@ -390,7 +399,7 @@ public class RECIPES_GREGTECH { 20 * 20, MaterialUtils.getVoltageForTier(aBotmiumTier-2), 6); - + //Refine GT HF into GT++ HF if (FluidUtils.doesHydrofluoricAcidGtExist()) { @@ -873,7 +882,12 @@ public class RECIPES_GREGTECH { 20 * 60 * 5, MaterialUtils.getVoltageForTier(5)); - + GT_Values.RA.addLaserEngraverRecipe( + GregtechItemList.Laser_Lens_WoodsGlass.get(0), + ItemUtils.simpleMetaStack(ModBlocks.blockCompressedObsidian, 8, 1), + ItemUtils.getSimpleStack(ModItems.itemSunnariumBit, 3), + 20 * 60 * 5, + MaterialUtils.getVoltageForTier(3)); } @@ -1682,7 +1696,7 @@ public class RECIPES_GREGTECH { final FluidStack[] sulfurdioxideOutput = { FluidUtils.getFluidStack("oxygen", 2000) - }; + }; GT_Values.RA.addDistillationTowerRecipe( FluidUtils.getFluidStack("sulfurdioxide", 144 * 3), sulfurdioxideOutput, @@ -1718,7 +1732,7 @@ public class RECIPES_GREGTECH { ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTungstate", 1), ItemUtils.getSimpleStack(Blocks.obsidian) }, new int[] { 750, 250, 250, 250, 1850 }, 0); - + HotFuel.addNewHotFuel( MISC_MATERIALS.SOLAR_SALT_HOT.getFluidStack(1000), MISC_MATERIALS.SOLAR_SALT_COLD.getFluidStack(1000), @@ -1751,15 +1765,15 @@ public class RECIPES_GREGTECH { } private static void fluidExtractorRecipes() { - + } private static void chemicalBathRecipes() { - + } private static void centrifugeRecipes() { - + GT_Values.RA.addCentrifugeRecipe( CI.getNumberedAdvancedCircuit(2), MISC_MATERIALS.SOLAR_SALT_COLD.getCell(10), @@ -1774,11 +1788,11 @@ public class RECIPES_GREGTECH { null, 20 * 30, 120); - + } private static void mixerRecipes() { - + GT_Values.RA.addMixerRecipe( ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 1), null, @@ -1789,7 +1803,7 @@ public class RECIPES_GREGTECH { null, 600, 60); - + GT_Values.RA.addMixerRecipe( CI.getNumberedAdvancedCircuit(2), CI.emptyCells(10), @@ -1800,13 +1814,13 @@ public class RECIPES_GREGTECH { MISC_MATERIALS.SOLAR_SALT_COLD.getCell(10), 20 * 10, 120); - - - + + + } private static void chemicalReactorRecipes() { - + //Bombs GT_Values.RA.addChemicalRecipe( ItemUtils.getSimpleStack(ModItems.itemBombCasing, 4), @@ -1823,7 +1837,7 @@ public class RECIPES_GREGTECH { null, ItemUtils.getSimpleStack(ModItems.itemBomb, 4), 10 * 20); - + GT_Values.RA.addChemicalRecipe( CI.getNumberedAdvancedCircuit(21), ItemUtils.getItemStackOfAmountFromOreDict("dustApatite", 32), @@ -1832,24 +1846,24 @@ public class RECIPES_GREGTECH { ItemUtils.getItemStackOfAmountFromOreDict("dustSmallSulfur", 8), 20 * 20); - GT_Values.RA.addChemicalRecipe( - Materials.Potassium.getDust(1), - CI.getNumberedAdvancedCircuit(1), - Materials.NitricAcid.getFluid(1000), - GT_Values.NF, - MISC_MATERIALS.POTASSIUM_NITRATE.getDust(1), - 100, - 30); - - GT_Values.RA.addChemicalRecipe( - ItemUtils.getSimpleStack(AgriculturalChem.mSodiumCarbonate, 1), - CI.getNumberedAdvancedCircuit(1), - Materials.NitricAcid.getFluid(1000), - GT_Values.NF, - MISC_MATERIALS.SODIUM_NITRATE.getDust(1), - 100, - 30); - + GT_Values.RA.addChemicalRecipe( + Materials.Potassium.getDust(1), + CI.getNumberedAdvancedCircuit(1), + Materials.NitricAcid.getFluid(1000), + GT_Values.NF, + MISC_MATERIALS.POTASSIUM_NITRATE.getDust(1), + 100, + 30); + + GT_Values.RA.addChemicalRecipe( + ItemUtils.getSimpleStack(AgriculturalChem.mSodiumCarbonate, 1), + CI.getNumberedAdvancedCircuit(1), + Materials.NitricAcid.getFluid(1000), + GT_Values.NF, + MISC_MATERIALS.SODIUM_NITRATE.getDust(1), + 100, + 30); + } @@ -1903,7 +1917,7 @@ public class RECIPES_GREGTECH { } private static void autoclaveRecipes() { - + } private static void benderRecipes() { @@ -1926,7 +1940,7 @@ public class RECIPES_GREGTECH { } private static void macerationRecipes() { - + GT_ModHandler.addPulverisationRecipe(ItemUtils.getItemStackOfAmountFromOreDict("blockMeatRaw", 1), ItemUtils.getItemStackOfAmountFromOreDict("dustMeatRaw", 9)); @@ -2266,11 +2280,11 @@ public class RECIPES_GREGTECH { } private static void sifterRecipes() { - + } private static void electroMagneticSeperatorRecipes() { - + if (!GTNH) { // Trinium GT_Values.RA.addElectromagneticSeparatorRecipe( diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java index 61bae54b31..218c3a1408 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java @@ -381,11 +381,12 @@ public class RECIPES_General { private static boolean addCompressedObsidian(){ //Invert Obsidian + ItemStack aInvertedObsidian = ItemUtils.simpleMetaStack(ModBlocks.blockCompressedObsidian, 5, 1); if (RecipeUtils.addShapedRecipe( getSimpleStack(Items.redstone), getSimpleStack(Items.glowstone_dust), getSimpleStack(Items.redstone), getSimpleStack(Items.glowstone_dust), ItemUtils.simpleMetaStack(ModBlocks.blockCompressedObsidian, 1, 1), getSimpleStack(Items.glowstone_dust), getSimpleStack(Items.redstone), getSimpleStack(Items.glowstone_dust), getSimpleStack(Items.redstone), - ItemUtils.simpleMetaStack(ModBlocks.blockCompressedObsidian, 5, 1))){ + aInvertedObsidian)){ Logger.INFO("Added a recipe for Inverted Obsidian."); } @@ -394,6 +395,12 @@ public class RECIPES_General { for (int r=0;r<5;r++){ mItems[r+1] = ItemUtils.simpleMetaStack(ModBlocks.blockCompressedObsidian, r, 1); } + + final ItemStack[] mItems2 = new ItemStack[6]; + mItems2[0] = ItemUtils.getSimpleStack(Blocks.glowstone); + for (int r=0;r<5;r++){ + mItems2[r+1] = ItemUtils.simpleMetaStack(ModBlocks.blockCompressedObsidian, 6+r, 1); + } //Compressed Obsidian 1-5 for (int r=0;r<5;r++){ @@ -413,6 +420,26 @@ public class RECIPES_General { Logger.INFO("Added a shapeless recipe for Compressed Obsidian ["+r+"]"); } + } + + //Compressed Glowstone 1-5 + for (int r=0;r<5;r++){ + + final ItemStack input = mItems2[r]; + final ItemStack output = mItems2[r+1]; + + if (RecipeUtils.addShapedRecipe( + input, input, input, + input, aInvertedObsidian, input, + input, input, input, + output)){ + Logger.INFO("Added a recipe for Compressed Glowstone ["+r+"]"); + } + + if (RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{output}, ItemUtils.getSimpleStack(input, 9))){ + Logger.INFO("Added a shapeless recipe for Compressed Glowstone ["+r+"]"); + } + } return true; } diff --git a/src/main/java/gtPlusPlus/preloader/asm/Preloader_FMLLoadingPlugin.java b/src/main/java/gtPlusPlus/preloader/asm/Preloader_FMLLoadingPlugin.java index c93b37e6fb..5ff001ea2a 100644 --- a/src/main/java/gtPlusPlus/preloader/asm/Preloader_FMLLoadingPlugin.java +++ b/src/main/java/gtPlusPlus/preloader/asm/Preloader_FMLLoadingPlugin.java @@ -76,7 +76,7 @@ public class Preloader_FMLLoadingPlugin implements IFMLLoadingPlugin { CORE_Preloader.DEV_ENVIRONMENT = (Boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment"); CORE_Preloader.DEBUG_MODE = AsmConfig.debugMode; Preloader_Logger.INFO("Running on "+gtPlusPlus.preloader.CORE_Preloader.JAVA_VERSION+" | Development Environment: "+CORE_Preloader.DEV_ENVIRONMENT); - Preloader_Logger.INFO("Is Client? "+Utils.isClient()+" | Is Server? "+Utils.isServer()); + //Preloader_Logger.INFO("Is Client? "+Utils.isClient()+" | Is Server? "+Utils.isServer()); Locale aDefaultLocale = Locale.getDefault(); NumberFormat aFormat = NumberFormat.getInstance(); Locale aDisplayLocale = (Locale) ReflectionUtils.getFieldValue(ReflectionUtils.getField(Locale.class, "defaultDisplayLocale")); diff --git a/src/main/resources/assets/miscutils/lang/en_US.lang b/src/main/resources/assets/miscutils/lang/en_US.lang index 7a021cbc26..679211cbf1 100644 --- a/src/main/resources/assets/miscutils/lang/en_US.lang +++ b/src/main/resources/assets/miscutils/lang/en_US.lang @@ -107,6 +107,11 @@ tile.blockCompressedObsidian.2.name=Triple Compressed Obsidian (729) tile.blockCompressedObsidian.3.name=Quadruple Compressed Obsidian (6561) tile.blockCompressedObsidian.4.name=Quintuple Compressed Obsidian (59049) tile.blockCompressedObsidian.5.name=Inverted Obsidian +tile.blockCompressedObsidian.6.name=Compressed Glowstone (9) +tile.blockCompressedObsidian.7.name=Double Compressed Glowstone (81) +tile.blockCompressedObsidian.8.name=Triple Compressed Glowstone (729) +tile.blockCompressedObsidian.9.name=Quadruple Compressed Glowstone (6561) +tile.blockCompressedObsidian.10.name=Quintuple Compressed Glowstone (59049) tile.blockNet.name=Net diff --git a/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone1.png b/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone1.png new file mode 100644 index 0000000000..17010ff1a3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone2.png b/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone2.png new file mode 100644 index 0000000000..72befd9bfd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone3.png b/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone3.png new file mode 100644 index 0000000000..8af7fb854c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone4.png b/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone4.png new file mode 100644 index 0000000000..3def965ce9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone5.png b/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone5.png new file mode 100644 index 0000000000..b97c9add06 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone5.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemSunnariumBit.png b/src/main/resources/assets/miscutils/textures/items/itemSunnariumBit.png new file mode 100644 index 0000000000..acf4cbd064 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemSunnariumBit.png differ -- cgit From 9f45806e6e5dd86fcd752bfc2084a0f673850935 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Fri, 21 Jan 2022 18:55:36 +0000 Subject: Did MT stuff. --- .../gtPlusPlus/core/handler/COMPAT_IntermodStaging.java | 2 ++ .../core/handler/events/GeneralTooltipEventHandler.java | 17 +++++++++++++++++ .../gtPlusPlus/core/item/general/ItemSunnariumBit.java | 2 +- src/main/resources/assets/miscutils/lang/en_US.lang | 3 +++ 4 files changed, 23 insertions(+), 1 deletion(-) (limited to 'src/main/java/gtPlusPlus/core/item') diff --git a/src/main/java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java b/src/main/java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java index 9a1b551d30..166c0f228b 100644 --- a/src/main/java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java +++ b/src/main/java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java @@ -4,6 +4,7 @@ import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLLoadCompleteEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import gtPlusPlus.xmod.advsolar.HANDLER_AdvSolar; import gtPlusPlus.xmod.bartcrops.HANDLER_CropsPlusPlus; import gtPlusPlus.xmod.bop.HANDLER_BiomesOPlenty; import gtPlusPlus.xmod.computronics.HANDLER_Computronics; @@ -81,6 +82,7 @@ public class COMPAT_IntermodStaging { HANDLER_Reliquary.postInit(); HANDLER_OpenBlocks.postInit(); HANDLER_SpiceOfLife.postInit(); + HANDLER_AdvSolar.postInit(); } public static void onLoadComplete(FMLLoadCompleteEvent event) { diff --git a/src/main/java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java b/src/main/java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java index 10dea8a7bf..de3e958b2d 100644 --- a/src/main/java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java +++ b/src/main/java/gtPlusPlus/core/handler/events/GeneralTooltipEventHandler.java @@ -1,16 +1,22 @@ package gtPlusPlus.core.handler.events; +import static gregtech.api.enums.GT_Values.MOD_ID_APC; + +import advsolar.common.AdvancedSolarPanel; +import cpw.mods.fml.common.Optional; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import gregtech.api.enums.ItemList; import gtPlusPlus.GTplusplus; import gtPlusPlus.GTplusplus.INIT_PHASE; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.sys.KeyboardUtils; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import net.minecraft.block.Block; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.event.entity.player.ItemTooltipEvent; @@ -80,6 +86,10 @@ public class GeneralTooltipEventHandler { event.toolTip.add("Max Capacity: "+MathUtils.formatNumbers(32000)+"L"); } + if (LoadedMods.AdvancedSolarPanel) { + molecularTransformer(event); + } + if (CORE.ConfigSwitches.enableAnimatedTurbines) { boolean shift = false; @@ -114,4 +124,11 @@ public class GeneralTooltipEventHandler { } + @Optional.Method(modid = "AdvancedSolarPanel") + public static void molecularTransformer(ItemTooltipEvent event) { + if (event.itemStack.getItem() == Item.getItemFromBlock(AdvancedSolarPanel.blockMolecularTransformer)) { + event.toolTip.add(""+EnumChatFormatting.RED+"Disabled, Use the multiblock"); + } + } + } diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemSunnariumBit.java b/src/main/java/gtPlusPlus/core/item/general/ItemSunnariumBit.java index fb713d4962..0b61a06934 100644 --- a/src/main/java/gtPlusPlus/core/item/general/ItemSunnariumBit.java +++ b/src/main/java/gtPlusPlus/core/item/general/ItemSunnariumBit.java @@ -9,7 +9,7 @@ import net.minecraft.util.EnumChatFormatting; public class ItemSunnariumBit extends CoreItem { public ItemSunnariumBit() { - super("item.SunnariumBit", "Sunnarium Bit", AddToCreativeTab.tabMisc, 64, 0, new String[] {}, EnumRarity.uncommon, EnumChatFormatting.GOLD, false, null); + super("SunnariumBit", "Sunnarium Bit", AddToCreativeTab.tabMisc, 64, 0, new String[] {}, EnumRarity.uncommon, EnumChatFormatting.GOLD, false, null); this.setTextureName(CORE.MODID+":"+"itemSunnariumBit"); } diff --git a/src/main/resources/assets/miscutils/lang/en_US.lang b/src/main/resources/assets/miscutils/lang/en_US.lang index 679211cbf1..a4b2b8c5a3 100644 --- a/src/main/resources/assets/miscutils/lang/en_US.lang +++ b/src/main/resources/assets/miscutils/lang/en_US.lang @@ -3370,3 +3370,6 @@ item.itemGearPraseodymium.name=Praseodymium Gear item.itemCellPraseodymium.name=Praseodymium Cell item.milledMonazite.name=Milled Monazite item.FrothMonaziteflotation.name=Monazite Flotation Froth Cell + +//Added 19/01/22 +item.SunnariumBit.name=Sunnarium Bit -- cgit