diff options
author | Technus <daniel112092@gmail.com> | 2017-05-15 10:48:43 +0200 |
---|---|---|
committer | Technus <daniel112092@gmail.com> | 2017-05-15 10:48:43 +0200 |
commit | a4df98236750c828c26b8711b3b3ee7e5c04df42 (patch) | |
tree | 07186b68f7ec64d0a938e599c2bda13924dd4304 /src | |
parent | 2251b83addc77486de618ffa7203a31590205e01 (diff) | |
download | GT5-Unofficial-a4df98236750c828c26b8711b3b3ee7e5c04df42.tar.gz GT5-Unofficial-a4df98236750c828c26b8711b3b3ee7e5c04df42.tar.bz2 GT5-Unofficial-a4df98236750c828c26b8711b3b3ee7e5c04df42.zip |
implement constructable interfaces
Diffstat (limited to 'src')
18 files changed, 184 insertions, 57 deletions
diff --git a/src/main/java/com/github/technus/tectech/Util.java b/src/main/java/com/github/technus/tectech/Util.java index 4335791e77..853c622709 100644 --- a/src/main/java/com/github/technus/tectech/Util.java +++ b/src/main/java/com/github/technus/tectech/Util.java @@ -63,11 +63,13 @@ public class Util { for (String __structure : _structure) {//top to bottom a = -horizontalOffset; for (char block : __structure.toCharArray()) {//left to right - if (block > '@') {//characters allow to skip check a-1 skip, b-2 skips etc. + if (block > '@')//characters allow to skip check a-1 skip, b-2 skips etc. a += block - '@'; - } else if (block < '+') {//used to mark THINGS + else if (block < '+')//used to mark THINGS a++; - } else { + else if (block=='.') + a++; + else { //get x y z from rotation switch (facing) {//translation case 4: @@ -178,11 +180,13 @@ public class Util { for (String __structure : _structure) {//top to bottom a = -horizontalOffset; for (char block : __structure.toCharArray()) {//left to right - if (block > '@') {//characters allow to skip check a-1 skip, b-2 skips etc. + if (block > '@') //characters allow to skip check a-1 skip, b-2 skips etc. a += block - '@'; - //} else if (block < '+') {//used to mark THINGS - // a++; - } else { + //else if (block < '+')//used to mark THINGS + // a++; + else if (block=='.') + a++; + else { //get x y z from rotation switch (facing) {//translation case 4: @@ -289,7 +293,7 @@ public class Util { World world = aBaseMetaTileEntity.getWorld(); if (world.isRemote) return false; - int x, y, z, a, b, c; + int x, y, z, a, b, c, pointer; //a,b,c - relative to block face! //x,y,z - relative to block position on map! @@ -300,11 +304,13 @@ public class Util { for (String __structure : _structure) {//top to bottom a = -horizontalOffset; for (char block : __structure.toCharArray()) {//left to right - if (block > '@') {//characters allow to skip check a-1 skip, b-2 skips etc. + if (block > '@')//characters allow to skip check a-1 skip, b-2 skips etc. a += block - '@'; - } else if (block < '+') {//used to mark THINGS + //else if (block < '+')//used to mark THINGS + // a++; + else if (block=='.')// this TE a++; - } else { + else { //get x y z from rotation switch (facing) {//translation case 4: @@ -352,13 +358,29 @@ public class Util { world.setBlock(x, y, z, Blocks.air, 0, 2); break; case '+'://must not be air - world.setBlock(x, y, z, Blocks.wool, 15, 2); + world.setBlock(x, y, z, Blocks.stone, 15, 2); break; - default: {//check for block (countable) - int pointer = block - '0'; - //countable air -> net.minecraft.block.BlockAir - world.setBlock(x, y, z, blockType[pointer], blockMeta[pointer], 2); - } + default: //check for block + if ((pointer = block - '0') >= 0) { + world.setBlock(x, y, z, blockType[pointer], blockMeta[pointer], 2); + } else if ((pointer = block - ' ') >= 0) { + switch(pointer){ + case 0: world.setBlock(x, y, z, Blocks.wool, 11, 2); break; + case 1: world.setBlock(x, y, z, Blocks.wool, 3, 2); break; + case 2: world.setBlock(x, y, z, Blocks.wool, 0, 2); break; + case 3: world.setBlock(x, y, z, Blocks.wool, 8, 2); break; + case 4: world.setBlock(x, y, z, Blocks.wool, 7, 2); break; + case 5: world.setBlock(x, y, z, Blocks.wool, 15, 2); break; + case 6: world.setBlock(x, y, z, Blocks.stained_hardened_clay, 11, 2); break; + case 7: world.setBlock(x, y, z, Blocks.stained_hardened_clay, 3, 2); break; + case 8: world.setBlock(x, y, z, Blocks.stained_hardened_clay, 0, 2); break; + case 9: world.setBlock(x, y, z, Blocks.stained_hardened_clay, 8, 2); break; + case 10:world.setBlock(x, y, z, Blocks.stained_hardened_clay, 7, 2); break; + case 11:world.setBlock(x, y, z, Blocks.stained_hardened_clay, 15, 2); break; + default:world.setBlock(x, y, z, Blocks.lapis_block, 0, 2); + } + + } } } a++;//block in horizontal layer @@ -535,7 +557,7 @@ public class Util { int meta = world.getBlockMetadata(x, y, z); if (a == 0 && b == 0 && c == 0) { - line += '+'; + line += '.'; } else if (block.getMaterial() == Material.air) { line += '-'; } else if (block.hasTileEntity(meta)) { diff --git a/src/main/java/com/github/technus/tectech/thing/item/DebugBuilder.java b/src/main/java/com/github/technus/tectech/thing/item/DebugBuilder.java index c0ecf3b7c0..2209a7722b 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/DebugBuilder.java +++ b/src/main/java/com/github/technus/tectech/thing/item/DebugBuilder.java @@ -25,7 +25,7 @@ public class DebugBuilder extends Item { DebugBuilder() { super(); - setMaxStackSize(1); + //setMaxStackSize(1); setUnlocalizedName("em.debugBuilder"); setTextureName(MODID + ":itemDebugBuilder"); } @@ -49,7 +49,7 @@ public class DebugBuilder extends Item { public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { aList.add(CommonValues.tecMark); aList.add("Constructs Multiblocks"); - aList.add(EnumChatFormatting.BLUE + "Quantity Matters"); + aList.add(EnumChatFormatting.BLUE + "Quantity affects construction"); } public static void run() { diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java index 13ecbdb149..6c79cc0f5d 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java @@ -2,22 +2,24 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.thing.block.QuantumGlassBlock; +import com.github.technus.tectech.thing.metaTileEntity.constructableTT; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; +import static com.github.technus.tectech.Util.StructureBuilder; import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT; import static gregtech.api.enums.GT_Values.E; /** * Created by danie_000 on 17.12.2016. */ -public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_MultiblockBase_EM { +public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_MultiblockBase_EM implements constructableTT { //region structure private static final String[][] shape = new String[][]{ - {E,E,E,"D000","C0 0","C0 + 0","C0 0","D000",E,E,E,}, + {E,E,E,"D000","C0 0","C0 . 0","C0 0","D000",E,E,E,}, {"C01A10","C01A10","D1A1","00B101B00","11111111111","C01110","11111111111","00B101B00","D1A1","C01A10","C01A10",}, {"C01A10","A223222322","A244242442","03442424430","12225252221","A244222442","12225252221","03442424430","A244242442","A223222322","C01A10",}, {"D111","A244222442","A4G4","A4G4","12G21","12G21","12G21","A4G4","A4G4","A244222442","D111",}, @@ -55,6 +57,11 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl } @Override + public void construct(int qty) { + StructureBuilder(shape, blockType, blockMeta, 5, 5, 0,getBaseMetaTileEntity()); + } + + @Override public String[] getDescription() { return new String[]{ CommonValues.tecMark, diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java index 2d85d63339..9a17fb0351 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java @@ -143,6 +143,11 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB } @Override + public boolean isFacingValid(byte aFacing) { + return aFacing >= 2; + } + + @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); aNBT.setByte("eTier", eTier); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java index 63de676b59..cee33b99c6 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java @@ -5,6 +5,7 @@ import com.github.technus.tectech.TecTech; import com.github.technus.tectech.Util; import com.github.technus.tectech.auxiliary.TecTechConfig; import com.github.technus.tectech.dataFramework.quantumDataPacket; +import com.github.technus.tectech.thing.metaTileEntity.constructableTT; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputData; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_OutputData; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Rack; @@ -22,18 +23,19 @@ import net.minecraft.util.EnumChatFormatting; import java.util.ArrayList; +import static com.github.technus.tectech.Util.StructureBuilder; import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT; import static gregtech.api.enums.GT_Values.V; /** * Created by danie_000 on 17.12.2016. */ -public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockBase_EM { +public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockBase_EM implements constructableTT { private final ArrayList<GT_MetaTileEntity_Hatch_Rack> eRacks = new ArrayList<>(); private int maxTemp = 0; //region Structure - private static final String[][] front = new String[][]{{"A ", "A ", "A+ ", "A ",},}; + private static final String[][] front = new String[][]{{"A ", "A ", "A. ", "A ",},}; private static final String[][] terminator = new String[][]{{"A ", "A ", "A ", "A ",},}; private static final String[][] cap = new String[][]{{"-01", "A22", "A22", "-01",},}; private static final String[][] slice = new String[][]{{"-01", "A!2", "A!2", "-01",},}; @@ -187,19 +189,19 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB return false; if (!EM_StructureCheckAdvanced(cap, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, -1)) return false; - byte i = -2, slices = 4; - for (; i > -16; ) { - if (!EM_StructureCheckAdvanced(slice, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, i)) + byte offset = -2, totalLen = 4; + for (; offset > -16; ) { + if (!EM_StructureCheckAdvanced(slice, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, offset)) break; - slices++; - i--; + totalLen++; + offset--; } - if (slices > 16) return false; - if (!EM_StructureCheckAdvanced(cap, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, ++i)) + if (totalLen > 16) return false; + if (!EM_StructureCheckAdvanced(cap, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, ++offset)) return false; - if (!EM_StructureCheckAdvanced(terminator, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, --i)) + if (!EM_StructureCheckAdvanced(terminator, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, --offset)) return false; - eCertainMode = (byte) Math.min(slices / 3, 5); + eCertainMode = (byte) Math.min(totalLen / 3, 5); for (GT_MetaTileEntity_Hatch_Rack rack : eRacks) if (isValidMetaTileEntity(rack)) rack.getBaseMetaTileEntity().setActive(iGregTechTileEntity.isActive()); @@ -207,6 +209,21 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB } @Override + public void construct(int qty) { + IGregTechTileEntity igt=getBaseMetaTileEntity(); + StructureBuilder(front, blockType, blockMeta, 1, 2, 0, igt); + StructureBuilder(cap, blockType, blockMeta, 1, 2, -1, igt); + + byte offset=-2; + for (int rackSlices = qty>12?12:qty; rackSlices>0 ; rackSlices--) { + StructureBuilder(slice, blockType, blockMeta, 1, 2, offset--, igt); + } + + StructureBuilder(cap, blockType, blockMeta, 1, 2, offset--, igt); + StructureBuilder(terminator, blockType, blockMeta, 1, 2, offset,igt); + } + + @Override protected void EM_extraExplosions() { for (MetaTileEntity tTileEntity : eRacks) tTileEntity.getBaseMetaTileEntity().doExplosion(V[9]); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafter.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafter.java index 579e2467ae..af05295883 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafter.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafter.java @@ -2,21 +2,23 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.thing.block.QuantumGlassBlock; +import com.github.technus.tectech.thing.metaTileEntity.constructableTT; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; +import static com.github.technus.tectech.Util.StructureBuilder; import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT; /** * Created by danie_000 on 17.12.2016. */ -public class GT_MetaTileEntity_EM_crafter extends GT_MetaTileEntity_MultiblockBase_EM { +public class GT_MetaTileEntity_EM_crafter extends GT_MetaTileEntity_MultiblockBase_EM implements constructableTT { //region structure private static final String[][] shape = new String[][]{ - {"A000","0 0","0 + 0","0 0","A000",}, + {"A000","0 0","0 . 0","0 0","A000",}, {"00000","00000","00000","00000","00000",}, {"0C0","A!!!","A!1!","A!!!","0C0",}, {"22222","22222","22122","22222","22222",}, @@ -54,6 +56,11 @@ public class GT_MetaTileEntity_EM_crafter extends GT_MetaTileEntity_MultiblockBa } @Override + public void construct(int qty) { + StructureBuilder(shape, blockType, blockMeta,2, 2, 0, getBaseMetaTileEntity()); + } + + @Override public String[] getDescription() { return new String[]{ CommonValues.tecMark, diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java index 2c0d4c5349..30fce86183 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java @@ -1,21 +1,23 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; +import com.github.technus.tectech.thing.metaTileEntity.constructableTT; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; +import static com.github.technus.tectech.Util.StructureBuilder; import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT; /** * Created by danie_000 on 17.12.2016. */ -public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase_EM { +public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase_EM implements constructableTT { //region structure private static final String[][] shape = new String[][]{ - {"0C0","A ","A + ","A ","0C0",}, + {"0C0","A ","A . ","A ","0C0",}, {"00000","00000","00000","00000","00000",}, {"0C0","A!!!","A!0!","A!!!","0C0",}, {"01110","12221","12221","12221","01110",}, @@ -51,6 +53,11 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase } @Override + public void construct(int qty) { + StructureBuilder(shape, blockType, blockMeta,2, 2, 0, getBaseMetaTileEntity()); + } + + @Override public String[] getDescription() { return new String[]{ CommonValues.tecMark, diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java index ac862b855a..ba652ed7ef 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java @@ -3,6 +3,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.casing.GT_Container_CasingsTT; +import com.github.technus.tectech.thing.metaTileEntity.constructableTT; import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; @@ -14,18 +15,19 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.common.util.ForgeDirection; +import static com.github.technus.tectech.Util.StructureBuilder; import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT; import static gregtech.api.enums.GT_Values.E; /** * Created by danie_000 on 17.12.2016. */ -public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_MultiblockBase_EM { +public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_MultiblockBase_EM implements constructableTT { //region Structure //use multi A energy inputs, use less power the longer it runs private static final String[][] shape = new String[][]{ - {"!!!", "!+!", "!!!",}, + {"!!!", "!.!", "!!!",}, {"010", "111", "010",}, {"\"\"\"", "\"1\"", "\"\"\"",}, {"121", "2 2", "121",}, @@ -56,6 +58,11 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo } @Override + public void construct(int qty) { + StructureBuilder(shape, blockType, blockMeta,1, 1, 0, getBaseMetaTileEntity()); + } + + @Override public String[] getDescription() { return new String[]{ CommonValues.tecMark, diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java index 9ae9883265..e3f5116ace 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java @@ -4,26 +4,29 @@ import cofh.api.energy.IEnergyContainerItem; import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.auxiliary.TecTechConfig; +import com.github.technus.tectech.thing.metaTileEntity.constructableTT; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import ic2.api.item.ElectricItem; import ic2.api.item.IElectricItem; import net.minecraft.block.Block; +import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.common.util.ForgeDirection; +import static com.github.technus.tectech.Util.StructureBuilder; import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT; import static gregtech.api.GregTech_API.mEUtoRF; /** * Created by danie_000 on 17.12.2016. */ -public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBase_EM { +public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBase_EM implements constructableTT { //region Structure private static final String[][] shape = new String[][]{ - {" ", "000", "1+1", "000", " ",}, + {" ", "000", "1.1", "000", " ",}, {" ", "010", "111", "010", " ",}, {" ", "000", "111", "000", " ",}, }; @@ -60,6 +63,11 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa } @Override + public void construct(int qty) { + StructureBuilder(shape, blockType, blockMeta,1, 2, 0, getBaseMetaTileEntity()); + } + + @Override public boolean EM_checkRecipe(ItemStack itemStack) { if (itemStack != null && itemStack.stackSize == 1) { Item ofThis = itemStack.getItem(); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java index 27392663c6..23762abc27 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java @@ -3,6 +3,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.casing.GT_Container_CasingsTT; +import com.github.technus.tectech.thing.metaTileEntity.constructableTT; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_OutputElemental; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -12,17 +13,18 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.common.util.ForgeDirection; +import static com.github.technus.tectech.Util.StructureBuilder; import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT; import static gregtech.api.enums.GT_Values.V; /** * Created by danie_000 on 17.12.2016. */ -public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockBase_EM { +public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockBase_EM implements constructableTT { //region Structure //use multi A energy inputs, use less power the longer it runs private static final String[][] shape = new String[][]{ - {" ", " + ", " ",}, + {" ", " . ", " ",}, {"000", "000", "000",}, {"!!!", "!0!", "!!!",}, {"!!!", "!!!", "!!!",}, @@ -53,6 +55,11 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB } @Override + public void construct(int qty) { + StructureBuilder(shape, blockType, blockMeta,1, 1, 0, getBaseMetaTileEntity()); + } + + @Override public String[] getDescription() { return new String[]{ CommonValues.tecMark, diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java index 87fae176e9..6053d8fede 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java @@ -11,6 +11,7 @@ import com.github.technus.tectech.elementalMatter.definitions.dAtomDefinition; import com.github.technus.tectech.elementalMatter.definitions.dHadronDefinition; import com.github.technus.tectech.elementalMatter.definitions.eLeptonDefinition; import com.github.technus.tectech.thing.block.QuantumGlassBlock; +import com.github.technus.tectech.thing.metaTileEntity.constructableTT; import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; @@ -24,6 +25,7 @@ import net.minecraftforge.oredict.OreDictionary; import java.util.HashMap; +import static com.github.technus.tectech.Util.StructureBuilder; import static com.github.technus.tectech.Util.isInputEqual; import static com.github.technus.tectech.elementalMatter.definitions.dAtomDefinition.getBestUnstableIsotope; import static com.github.technus.tectech.elementalMatter.definitions.dAtomDefinition.getFirstStableIsotope; @@ -33,7 +35,7 @@ import static gregtech.api.enums.GT_Values.V; /** * Created by danie_000 on 17.12.2016. */ -public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_MultiblockBase_EM { +public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_MultiblockBase_EM implements constructableTT { public static HashMap<Integer, cElementalDefinitionStack> itemBinds = new HashMap<>(32); public static HashMap<Integer, cElementalDefinitionStack> fluidBind = new HashMap<>(8); private static float refMass, refUnstableMass; @@ -41,7 +43,7 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock //region Structure //use multi A energy inputs, use less power the longer it runs private static final String[][] shape = new String[][]{ - {"!!!", "!+!", "!!!",}, + {"!!!", "!.!", "!!!",}, {"010", "101", "010",}, {"\"\"\"", "\"0\"", "\"\"\"",}, {"202", "0 0", "202",}, @@ -72,6 +74,11 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock } @Override + public void construct(int qty) { + StructureBuilder(shape, blockType, blockMeta,1, 1, 0, getBaseMetaTileEntity()); + } + + @Override public String[] getDescription() { return new String[]{ CommonValues.tecMark, diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java index 8ea6ac0258..7b5916808b 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java @@ -3,6 +3,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.auxiliary.TecTechConfig; import com.github.technus.tectech.thing.block.QuantumGlassBlock; +import com.github.technus.tectech.thing.metaTileEntity.constructableTT; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Holder; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Rack; import gregtech.api.enums.Textures; @@ -19,6 +20,7 @@ import net.minecraft.util.EnumChatFormatting; import java.util.ArrayList; +import static com.github.technus.tectech.Util.StructureBuilder; import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT; import static gregtech.api.enums.GT_Values.E; import static gregtech.api.enums.GT_Values.V; @@ -26,7 +28,7 @@ import static gregtech.api.enums.GT_Values.V; /** * Created by danie_000 on 17.12.2016. */ -public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockBase_EM { +public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockBase_EM implements constructableTT { private final ArrayList<GT_MetaTileEntity_Hatch_Holder> eHolders = new ArrayList<>(); //region structure @@ -35,7 +37,7 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB {"A0", "010", "A1", "A!", "A1", "010", "A0",}, {"A0", "010", E, E, E, "010", "A0",}, {"000", "010", E, E, E, "010", "000",}, - {"000", "212", "010", "0+0", "010", "212", "000",}, + {"000", "212", "010", "0.0", "010", "212", "000",}, {"000", "212", "111", "111", "111", "212", "000",}, {"000", "222", " ", " ", " ", "222", "000",}, }; @@ -76,6 +78,11 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB } @Override + public void construct(int qty) { + StructureBuilder(shape, blockType, blockMeta,1, 3, 4, getBaseMetaTileEntity()); + } + + @Override public boolean EM_checkRecipe(ItemStack itemStack) { //for (GT_MetaTileEntity_Hatch_Holder r : eHolders) { // r.getBaseMetaTileEntity().setActive(true); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java index 219bbc5fbd..ef67325990 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java @@ -2,22 +2,24 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.thing.block.QuantumGlassBlock; +import com.github.technus.tectech.thing.metaTileEntity.constructableTT; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; +import static com.github.technus.tectech.Util.StructureBuilder; import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT; /** * Created by danie_000 on 17.12.2016. */ -public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBase_EM { +public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBase_EM implements constructableTT { //region structure private static final String[][] shape = new String[][]{ - {" ", " 222 ", " 2+2 ", " 222 ", " ",}, + {" ", " 222 ", " 2.2 ", " 222 ", " ",}, {"00000", "00000", "00000", "00000", "00000",}, {"00100", "01110", "11111", "01110", "00100",}, {"01110", "1C1", "1C1", "1C1", "01110",}, @@ -58,6 +60,11 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa } @Override + public void construct(int qty) { + StructureBuilder(shape, blockType, blockMeta,2, 2, 0, getBaseMetaTileEntity()); + } + + @Override public String[] getDescription() { return new String[]{ CommonValues.tecMark, diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java index dba8688cce..87bedff949 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java @@ -2,21 +2,23 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.thing.block.QuantumGlassBlock; +import com.github.technus.tectech.thing.metaTileEntity.constructableTT; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; +import static com.github.technus.tectech.Util.StructureBuilder; import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT; /** * Created by danie_000 on 17.12.2016. */ -public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_MultiblockBase_EM { +public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_MultiblockBase_EM implements constructableTT { //region structure private static final String[][] shape = new String[][]{ - {"A010","0 0","1 + 1","0 0","A010",}, + {"A010","0 0","1 . 1","0 0","A010",}, {"23232","32223","22222","32223","23232",}, {"12!21","22422","!444!","22422","12!21",}, {"23232","32223","22222","32223","23232",}, @@ -48,6 +50,11 @@ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_Multibloc } @Override + public void construct(int qty) { + StructureBuilder(shape, blockType, blockMeta,2, 2, 0, getBaseMetaTileEntity()); + } + + @Override public String[] getDescription() { return new String[]{ CommonValues.tecMark, diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java index d3dddc4c86..a6839b5871 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java @@ -2,6 +2,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.thing.block.QuantumGlassBlock; +import com.github.technus.tectech.thing.metaTileEntity.constructableTT; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -12,19 +13,20 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; +import static com.github.technus.tectech.Util.StructureBuilder; import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT; import static gregtech.api.enums.GT_Values.E; /** * Created by danie_000 on 17.12.2016. */ -public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockBase_EM {//TODO MAKE COMPATIBLE WITH STARGATES XD +public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockBase_EM implements constructableTT {//TODO MAKE COMPATIBLE WITH STARGATES XD private static Textures.BlockIcons.CustomIcon ScreenOFF; private static Textures.BlockIcons.CustomIcon ScreenON; //region structure private static final String[][] shape = new String[][]{ - {E,E,E,"C ","C + ","C ",E,E,E,}, + {E,E,E,"C ","C . ","C ",E,E,E,}, {E,E,"D0","C000","B00100","C000","D0",E,E,}, {E,E,"D0","C2A2","B0C0","C2A2","D0",E,E,}, {E,"D0","D0",E,"A00C00",E,"D0","D0",E,}, @@ -77,6 +79,11 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB } @Override + public void construct(int qty) { + StructureBuilder(shape, blockType, blockMeta,4, 4, 0, getBaseMetaTileEntity()); + } + + @Override public String[] getDescription() { return new String[]{ CommonValues.tecMark, diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/other todo b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/other todo index 8bc860ab84..c326250de2 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/other todo +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/other todo @@ -1,8 +1,13 @@ microwave grinder -research station forcefields colorizer -> aka colorable 'bloodmoon' in a box gravity wells/entity accelerators reverse expand ore processing by scanning ores XD quark laseration -color separator
\ No newline at end of file +color separator +antimatter weaponry + +starter manual book? +design reader station - singleblock + +quantum dislocator - to move GT tiles?
\ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_FIELD.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_FIELD.png.mcmeta index dfae8cae16..97596ba817 100644 --- a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_FIELD.png.mcmeta +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_FIELD.png.mcmeta @@ -1,5 +1,5 @@ { "animation":{ - "frametime":1 + "frametime":2 } }
\ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_ULTIMATE_FIELD.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_ULTIMATE_FIELD.png.mcmeta index dfae8cae16..97596ba817 100644 --- a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_ULTIMATE_FIELD.png.mcmeta +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_ULTIMATE_FIELD.png.mcmeta @@ -1,5 +1,5 @@ { "animation":{ - "frametime":1 + "frametime":2 } }
\ No newline at end of file |