aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorTechnus <daniel112092@gmail.com>2017-10-09 23:24:33 +0200
committerTechnus <daniel112092@gmail.com>2017-10-09 23:24:33 +0200
commit2925808690e683ec4c659dc91338cfebeb37c6a2 (patch)
treeccf513bad61cda1552f9d7b3f5f9f5f59f58d403 /src/main/java
parent02325678a563849ac5f82d908794945ca7c1bd55 (diff)
downloadGT5-Unofficial-2925808690e683ec4c659dc91338cfebeb37c6a2.tar.gz
GT5-Unofficial-2925808690e683ec4c659dc91338cfebeb37c6a2.tar.bz2
GT5-Unofficial-2925808690e683ec4c659dc91338cfebeb37c6a2.zip
Add structure to EM Machine.
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_machine.java52
1 files changed, 42 insertions, 10 deletions
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_machine.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_machine.java
index f380fcebda..533807984b 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_machine.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_machine.java
@@ -1,27 +1,48 @@
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.IConstructable;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.common.blocks.GT_Block_Machines;
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_Block_CasingsTT.textureOffset;
+import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
+
/**
* Created by danie_000 on 17.12.2016.
*/
-public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBase_EM {
+public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable {
public final static String machine="EM Machinery";
-
+
+ //region structure
private static final String[][] shape = new String[][]{
- {"",//left to right top
- "",
- ""},//front
- {},//behind front
- {} //behind
+ {"B0","A ","0 - 0","A ","B0",},
+ {"A000","00000","00.00","00000","A000",},
+ {"A121","1C1","2C2","1C1","A121",},
+ {"A131","1C1","3C3","1C1","A131",},
+ {"A121","1C1","2C2","1C1","A121",},
+ {"A000","00000","00A00","00000","A000",},
+ {"B0","A!!!","0!\"!0","A!!!","B0",},
+ };
+ private static final Block[] blockType = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT};
+ private static final byte[] blockMeta = new byte[]{4, 0, 5, 6};
+ private static final String[] addingMethods = new String[]{"addClassicToMachineList", "addElementalToMachineList", "addElementalInputToMachineList"};
+ private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4, textureOffset + 4};
+ private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
+ private static final byte[] blockMetaFallback = new byte[]{0, 4, 4};
+ private static final String[] description = new String[]{
+ EnumChatFormatting.AQUA+"Hint Details:",
+ "1 - Classic Hatches or High Power Casing",
+ "2 - Elemental Hatches or Molecular Casing",
+ "2 - Elemental Input Hatch",
};
- private static final Block[] blockType = new Block[]{};
- private static final byte[] blockMeta = new byte[]{};
+ //endregion
public GT_MetaTileEntity_EM_machine(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -37,7 +58,18 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa
@Override
public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
- return false;
+ return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 1)
+ && eInputHatches.size()==1 && iGregTechTileEntity.getBlockAtSideAndDistance(iGregTechTileEntity.getBackFacing(),5) instanceof GT_Block_Machines;
+ }
+
+ @Override
+ public void construct(int stackSize, boolean hintsOnly) {
+ StructureBuilder(shape, blockType, blockMeta,2, 2, 1, getBaseMetaTileEntity(),hintsOnly);
+ }
+
+ @Override
+ public String[] getStructureDescription(int stackSize) {
+ return description;
}
@Override