From 565bb55ea5b2b5b12bec72860f1826319faf7f03 Mon Sep 17 00:00:00 2001 From: Martin Robertz Date: Mon, 2 Aug 2021 15:09:14 +0200 Subject: Update zh_CN.lang changes from @Kiwi233 --- src/main/resources/assets/tectech/lang/zh_CN.lang | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/resources/assets/tectech/lang/zh_CN.lang b/src/main/resources/assets/tectech/lang/zh_CN.lang index c01c8f2757..72fc8845b5 100644 --- a/src/main/resources/assets/tectech/lang/zh_CN.lang +++ b/src/main/resources/assets/tectech/lang/zh_CN.lang @@ -87,6 +87,16 @@ item.tm.teslaCover.desc.4=到底谁在用电缆? item.tm.teslaStaff.name=特斯拉权杖 item.tm.teslaStaff.desc=狂妄之人窃取了众神的权柄! +item.tm.enderfluidlinkcover.name=末影流体覆盖板 +item.tm.enderfluidlinkcover.desc.0=在机器间无线传输流体! +item.tm.enderfluidlinkcover.desc.1=可贴在储罐/机器/管道的任意面以将其与末影相连 +item.tm.enderfluidlinkcover.desc.2=末影储罐太逊了! -来自Chads-of-NH的Bot + +item.tm.powerpassupgradecover.name=导能升级覆盖板 +item.tm.powerpassupgradecover.desc.0=为TecTech多方块机器添加导能功能 +item.tm.powerpassupgradecover.desc.1=罐中的有源变压器?? +item.tm.powerpassupgradecover.desc.2=将它们像圣诞彩灯一样串起来! + #Death Messages death.attack.microwaving=%1$s被辐射脱水。 death.attack.microwaving.player=%1$s在与%2$s的战斗中被辐射脱水。 @@ -771,7 +781,7 @@ gt.blockmachines.debug.tt.data.desc.0=量子数据输出 gt.blockmachines.debug.tt.data.desc.1=高速光纤接口 gt.blockmachines.debug.tt.data.desc.2=启用前必须涂色 gt.blockmachines.debug.tt.maintenance.name=Debug维护仓 -gt.blockmachines.debug.tt.maintenance.desc.0=用于维护多方块 +gt.blockmachines.debug.tt.maintenance.desc.0=自动维护多方块机器 gt.blockmachines.debug.tt.maintenance.desc.1=它能修好一切,除了自己. gt.blockmachines.debug.tt.maintenance.desc.2=为人民服务! gt.blockmachines.debug.tt.genny.name=Debug发电机 @@ -865,3 +875,4 @@ tt.keyphrase.Side_capabilities=辅助功能 #OpenTurrets compatibility tile.turretHeadEM.name=元物质炮塔 tile.turretBaseEM.name=元物质炮塔基座 +© 2021 GitHub, Inc. -- cgit From 34e6ce6a4978cb235221a5812b1fcd566c4ee569 Mon Sep 17 00:00:00 2001 From: D-Cysteine <54219287+D-Cysteine@users.noreply.github.com> Date: Sun, 8 Aug 2021 09:10:43 -0600 Subject: Add number formatting --- .../tectech/nei/TT_NEI_ResearchHandler.java | 12 +++---- .../technus/tectech/nei/TT_NEI_ScannerHandler.java | 12 +++---- .../GT_MetaTileEntity_Hatch_DataConnector.java | 5 ++- .../GT_MetaTileEntity_Hatch_DynamoTunnel.java | 3 +- .../hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java | 4 ++- .../GT_MetaTileEntity_Hatch_EnergyTunnel.java | 4 ++- .../GT_MetaTileEntity_Hatch_OverflowElemental.java | 12 ++++--- .../multi/GT_MetaTileEntity_EM_decay.java | 36 +++++++++++++-------- .../multi/GT_MetaTileEntity_EM_research.java | 36 +++++++++++++-------- .../multi/GT_MetaTileEntity_EM_scanner.java | 37 ++++++++++++++-------- .../base/GT_MetaTileEntity_MultiblockBase_EM.java | 20 ++++++------ .../single/GT_MetaTileEntity_DataReader.java | 8 ++--- 12 files changed, 116 insertions(+), 73 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/nei/TT_NEI_ResearchHandler.java b/src/main/java/com/github/technus/tectech/nei/TT_NEI_ResearchHandler.java index 358d55be0e..114dc7399f 100644 --- a/src/main/java/com/github/technus/tectech/nei/TT_NEI_ResearchHandler.java +++ b/src/main/java/com/github/technus/tectech/nei/TT_NEI_ResearchHandler.java @@ -215,18 +215,18 @@ public class TT_NEI_ResearchHandler extends TemplateRecipeHandler { int tSpecial = ((CachedDefaultRecipe) arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue; short ampere=(short) (tSpecial & 0xFFFF),minComputationPerSec=(short)(tSpecial>>>16); if (tEUt != 0) { - drawText(10, 73, trans("152","Max Total: ") + (1+ (computation-minComputationPerSec) /minComputationPerSec) * (long)tEUt * ampere * 20 + " EU", -16777216); - drawText(10, 83, trans("153","Usage: ") + (long)tEUt*ampere + " EU/t", -16777216); + drawText(10, 73, trans("152","Max Total: ") + GT_Utility.formatNumbers((1+ (computation-minComputationPerSec) /minComputationPerSec) * (long)tEUt * ampere * 20) + " EU", -16777216); + drawText(10, 83, trans("153","Usage: ") + GT_Utility.formatNumbers((long)tEUt*ampere) + " EU/t", -16777216); if (mRecipeMap.mShowVoltageAmperageInNEI) { - drawText(10, 93, trans("154","Voltage: ") + tEUt + " EU", -16777216); - drawText(10, 103, trans("155","Amperage: ") + ampere, -16777216); + drawText(10, 93, trans("154","Voltage: ") + GT_Utility.formatNumbers(tEUt) + " EU", -16777216); + drawText(10, 103, trans("155","Amperage: ") + GT_Utility.formatNumbers(ampere), -16777216); } else { drawText(10, 93, trans("156","Voltage: unspecified"), -16777216); drawText(10, 103, trans("157","Amperage: unspecified"), -16777216); } } - drawText(10, 113, "Computation: "+computation, -16777216); - drawText(10, 123, "Min Computation: "+minComputationPerSec + " /s", -16777216); + drawText(10, 113, "Computation: " + GT_Utility.formatNumbers(computation), -16777216); + drawText(10, 123, "Min Computation: " + GT_Utility.formatNumbers(minComputationPerSec) + " /s", -16777216); } else { int i = 0; for (String descLine : recipeDesc) { diff --git a/src/main/java/com/github/technus/tectech/nei/TT_NEI_ScannerHandler.java b/src/main/java/com/github/technus/tectech/nei/TT_NEI_ScannerHandler.java index 0c7651977e..2dc4604fd5 100644 --- a/src/main/java/com/github/technus/tectech/nei/TT_NEI_ScannerHandler.java +++ b/src/main/java/com/github/technus/tectech/nei/TT_NEI_ScannerHandler.java @@ -215,18 +215,18 @@ public class TT_NEI_ScannerHandler extends TemplateRecipeHandler { int tSpecial = ((CachedDefaultRecipe) arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue; short ampere=(short) (tSpecial & 0xFFFF),minComputationPerSec=(short)(tSpecial>>>16); if (tEUt != 0) { - drawText(10, 73, trans("152","Max Total: ") + (1+ (computation-minComputationPerSec) /minComputationPerSec) * (long)tEUt * ampere * 20 + " EU", -16777216); - drawText(10, 83, trans("153","Usage: ") + (long)tEUt*ampere + " EU/t", -16777216); + drawText(10, 73, trans("152","Max Total: ") + GT_Utility.formatNumbers((1+ (computation-minComputationPerSec) /minComputationPerSec) * (long)tEUt * ampere * 20) + " EU", -16777216); + drawText(10, 83, trans("153","Usage: ") + GT_Utility.formatNumbers((long)tEUt*ampere) + " EU/t", -16777216); if (mRecipeMap.mShowVoltageAmperageInNEI) { - drawText(10, 93, trans("154","Voltage: ") + tEUt + " EU", -16777216); - drawText(10, 103, trans("155","Amperage: ") + ampere, -16777216); + drawText(10, 93, trans("154","Voltage: ") + GT_Utility.formatNumbers(tEUt) + " EU", -16777216); + drawText(10, 103, trans("155","Amperage: ") + GT_Utility.formatNumbers(ampere), -16777216); } else { drawText(10, 93, trans("156","Voltage: unspecified"), -16777216); drawText(10, 103, trans("157","Amperage: unspecified"), -16777216); } } - drawText(10, 113, "Computation: "+computation, -16777216); - drawText(10, 123, "Min Computation: "+minComputationPerSec + " /s", -16777216); + drawText(10, 113, "Computation: " + GT_Utility.formatNumbers(computation), -16777216); + drawText(10, 123, "Min Computation: " + GT_Utility.formatNumbers(minComputationPerSec) + " /s", -16777216); } else { int i = 0; for (String descLine : recipeDesc) { diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DataConnector.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DataConnector.java index 6cbf1e801b..4aa90339cc 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DataConnector.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DataConnector.java @@ -160,7 +160,10 @@ public abstract class GT_MetaTileEntity_Hatch_DataConnector 0) { - return new String[]{translateToLocalFormatted("tt.keyword.ID", clientLocale) + ": " + EnumChatFormatting.AQUA + id, translateToLocalFormatted("tt.keyword.Content", clientLocale) + ": " + EnumChatFormatting.AQUA + (q != null ? q.getContentString() : 0), translateToLocalFormatted("tt.keyword.PacketHistory", clientLocale) + ": " + EnumChatFormatting.RED + (q != null ? q.getTraceSize() : 0),}; + return new String[]{ + translateToLocalFormatted("tt.keyword.ID", clientLocale) + ": " + EnumChatFormatting.AQUA + id, + translateToLocalFormatted("tt.keyword.Content", clientLocale) + ": " + EnumChatFormatting.AQUA + (q != null ? q.getContentString() : 0), + translateToLocalFormatted("tt.keyword.PacketHistory", clientLocale) + ": " + EnumChatFormatting.RED + (q != null ? q.getTraceSize() : 0),}; } return new String[]{ translateToLocalFormatted("tt.keyword.Content", clientLocale) + ": " + EnumChatFormatting.AQUA + (q != null ? q.getContentString() : 0), diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java index 202dc344c2..b015d71b60 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java @@ -111,7 +111,8 @@ public class GT_MetaTileEntity_Hatch_DynamoTunnel extends GT_MetaTileEntity_Hatc return new String[]{ CommonValues.TEC_MARK_GENERAL, mDescription,//TODO NOT PASS DESCRIPTION - translateToLocal("gt.blockmachines.hatch.dynamotunnel.desc.1") + ": " + EnumChatFormatting.YELLOW + (Amperes * maxEUOutput()) + EnumChatFormatting.RESET + " EU/t"//Throughput + translateToLocal("gt.blockmachines.hatch.dynamotunnel.desc.1") + ": " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(Amperes * maxEUOutput()) + EnumChatFormatting.RESET + " EU/t"//Throughput }; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java index 4410372d47..0acb9849a7 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java @@ -6,6 +6,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; @@ -116,7 +117,8 @@ public class GT_MetaTileEntity_Hatch_EnergyMulti extends GT_MetaTileEntity_Hatch return new String[]{ CommonValues.TEC_MARK_GENERAL, mDescription, - translateToLocal("gt.blockmachines.hatch.energymulti.desc.1") + ": " + EnumChatFormatting.AQUA + maxAmperesIn() + " A"//Amperes In + translateToLocal("gt.blockmachines.hatch.energymulti.desc.1") + ": " + + EnumChatFormatting.AQUA + GT_Utility.formatNumbers(maxAmperesIn()) + " A"//Amperes In }; } } \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java index 854678b79b..d44119e1ab 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java @@ -6,6 +6,7 @@ import com.github.technus.tectech.mechanics.pipe.IConnectsToEnergyTunnel; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; @@ -108,7 +109,8 @@ public class GT_MetaTileEntity_Hatch_EnergyTunnel extends GT_MetaTileEntity_Hatc return new String[]{ CommonValues.TEC_MARK_GENERAL, mDescription, - translateToLocal("gt.blockmachines.hatch.energytunnel.desc.1") + ": " + EnumChatFormatting.YELLOW + (Amperes * maxEUInput()) + EnumChatFormatting.RESET + " EU/t"//Throughput + translateToLocal("gt.blockmachines.hatch.energytunnel.desc.1") + ": " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(Amperes * maxEUInput()) + EnumChatFormatting.RESET + " EU/t"//Throughput }; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java index a5e6dc4d5d..ff9aca01ee 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java @@ -12,6 +12,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -90,8 +91,8 @@ public class GT_MetaTileEntity_Hatch_OverflowElemental extends GT_MetaTileEntity return new String[]{ CommonValues.TEC_MARK_EM, mDescription, - translateToLocal("gt.blockmachines.hatch.emmuffler.desc.1") + ": " + EnumChatFormatting.AQUA + String.format(Locale.ENGLISH, "%+.2E", overflowMax) + " eV/c\u00b2", - translateToLocal("gt.blockmachines.hatch.emmuffler.desc.2") + ": " + EnumChatFormatting.AQUA + String.format(Locale.ENGLISH, "%+.2E", overflowDisperse) + " (eV/c\u00b2)/s", + translateToLocal("gt.blockmachines.hatch.emmuffler.desc.1") + ": " + EnumChatFormatting.AQUA + GT_Utility.formatNumbers(overflowMax) + " eV/c\u00b2", + translateToLocal("gt.blockmachines.hatch.emmuffler.desc.2") + ": " + EnumChatFormatting.AQUA + GT_Utility.formatNumbers(overflowDisperse) + " (eV/c\u00b2)/s", translateToLocal("gt.blockmachines.hatch.emmuffler.desc.3") }; } @@ -216,9 +217,10 @@ public class GT_MetaTileEntity_Hatch_OverflowElemental extends GT_MetaTileEntity public String[] getInfoData() { return new String[]{ translateToLocalFormatted("tt.keyphrase.Contained_mass", clientLocale) + ":", - EnumChatFormatting.RED + Double.toString(overflowMatter) + EnumChatFormatting.RESET + " eV/c\u00b2 /", - EnumChatFormatting.GREEN + Double.toString(overflowMax) + EnumChatFormatting.RESET + " eV/c\u00b2", - translateToLocalFormatted("tt.keyphrase.Mass_Disposal_speed", clientLocale) + ": " + EnumChatFormatting.BLUE + overflowDisperse + EnumChatFormatting.RESET + " (eV/c\u00b2)/s" + EnumChatFormatting.RED + GT_Utility.formatNumbers(overflowMatter) + EnumChatFormatting.RESET + " eV/c\u00b2 /", + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(overflowMax) + EnumChatFormatting.RESET + " eV/c\u00b2", + translateToLocalFormatted("tt.keyphrase.Mass_Disposal_speed", clientLocale) + ": " + + EnumChatFormatting.BLUE + GT_Utility.formatNumbers(overflowDisperse) + EnumChatFormatting.RESET + " (eV/c\u00b2)/s" }; } 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 d534b41fec..35ed753de5 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 @@ -21,6 +21,7 @@ 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_MultiBlockBase; +import gregtech.api.util.GT_Utility; import ic2.core.init.MainConfig; import ic2.core.util.ConfigUtil; import net.minecraft.block.Block; @@ -189,21 +190,30 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase return new String[]{ translateToLocalFormatted("tt.keyword.Progress", clientLocale) + ":", - EnumChatFormatting.GREEN + Integer.toString(mProgresstime / 20) + EnumChatFormatting.RESET + " s / " + - EnumChatFormatting.YELLOW + mMaxProgresstime / 20 + EnumChatFormatting.RESET + " s", + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mProgresstime / 20) + EnumChatFormatting.RESET + " s / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(mMaxProgresstime / 20) + EnumChatFormatting.RESET + " s", translateToLocalFormatted("tt.keyphrase.Energy_Hatches", clientLocale) + ":", - EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU", + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", (mEUt <= 0 ? translateToLocalFormatted("tt.keyphrase.Probably_uses", clientLocale) + ": " : translateToLocalFormatted("tt.keyphrase.Probably_makes", clientLocale) + ": ") + - EnumChatFormatting.RED + Math.abs(mEUt) + EnumChatFormatting.RESET + " EU/t at " + - EnumChatFormatting.RED + eAmpereFlow + EnumChatFormatting.RESET + " A", - translateToLocalFormatted("tt.keyphrase.Tier_Rating", clientLocale) + ": " + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + - " " + translateToLocalFormatted("tt.keyphrase.Amp_Rating", clientLocale) + ": " + EnumChatFormatting.GREEN + eMaxAmpereFlow + EnumChatFormatting.RESET + " A", - translateToLocalFormatted("tt.keyword.Problems", clientLocale) + ": " + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + - " " + translateToLocalFormatted("tt.keyword.Efficiency", clientLocale) + ": " + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", - translateToLocalFormatted("tt.keyword.PowerPass", clientLocale) + ": " + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + - " " + translateToLocalFormatted("tt.keyword.SafeVoid", clientLocale) + ": " + EnumChatFormatting.BLUE + eSafeVoid, - translateToLocalFormatted("tt.keyword.Computation", clientLocale) + ": " + EnumChatFormatting.GREEN + eAvailableData + EnumChatFormatting.RESET + " / " + EnumChatFormatting.YELLOW + eRequiredData + EnumChatFormatting.RESET, + EnumChatFormatting.RED + GT_Utility.formatNumbers(Math.abs(mEUt)) + EnumChatFormatting.RESET + " EU/t at " + + EnumChatFormatting.RED + GT_Utility.formatNumbers(eAmpereFlow) + EnumChatFormatting.RESET + " A", + translateToLocalFormatted("tt.keyphrase.Tier_Rating", clientLocale) + ": " + + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + " " + + translateToLocalFormatted("tt.keyphrase.Amp_Rating", clientLocale) + ": " + + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(eMaxAmpereFlow) + EnumChatFormatting.RESET + " A", + translateToLocalFormatted("tt.keyword.Problems", clientLocale) + ": " + + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + " " + + translateToLocalFormatted("tt.keyword.Efficiency", clientLocale) + ": " + + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", + translateToLocalFormatted("tt.keyword.PowerPass", clientLocale) + ": " + + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + " " + + translateToLocalFormatted("tt.keyword.SafeVoid", clientLocale) + ": " + + EnumChatFormatting.BLUE + eSafeVoid, + translateToLocalFormatted("tt.keyword.Computation", clientLocale) + ": " + + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(eAvailableData) + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(eRequiredData) + EnumChatFormatting.RESET, }; } 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 889b4cfec3..9d52bafa94 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 @@ -378,21 +378,31 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB return new String[]{ translateToLocalFormatted("tt.keyphrase.Energy_Hatches", clientLocale) + ":", - EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU", + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", (mEUt <= 0 ? translateToLocalFormatted("tt.keyphrase.Probably_uses", clientLocale) + ": " : translateToLocalFormatted("tt.keyphrase.Probably_makes", clientLocale) + ": ") + - EnumChatFormatting.RED + Math.abs(mEUt) + EnumChatFormatting.RESET + " EU/t " + translateToLocalFormatted("tt.keyword.at", clientLocale) + " " + - EnumChatFormatting.RED + eAmpereFlow + EnumChatFormatting.RESET + " A", - translateToLocalFormatted("tt.keyphrase.Tier_Rating", clientLocale) + ": " + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + - " " + translateToLocalFormatted("tt.keyphrase.Amp_Rating", clientLocale) + ": " + EnumChatFormatting.GREEN + eMaxAmpereFlow + EnumChatFormatting.RESET + " A", - translateToLocalFormatted("tt.keyword.Problems", clientLocale) + ": " + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + - " " + translateToLocalFormatted("tt.keyword.Efficiency", clientLocale) + ": " + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", - translateToLocalFormatted("tt.keyword.PowerPass", clientLocale) + ": " + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + - " " + translateToLocalFormatted("tt.keyword.SafeVoid", clientLocale) + ": " + EnumChatFormatting.BLUE + eSafeVoid, - translateToLocalFormatted("tt.keyphrase.Computation_Available", clientLocale) + ": " + EnumChatFormatting.GREEN + eAvailableData + EnumChatFormatting.RESET + " / " + EnumChatFormatting.YELLOW + eRequiredData + EnumChatFormatting.RESET, + EnumChatFormatting.RED + GT_Utility.formatNumbers(Math.abs(mEUt)) + EnumChatFormatting.RESET + " EU/t " + + translateToLocalFormatted("tt.keyword.at", clientLocale) + " " + + EnumChatFormatting.RED + GT_Utility.formatNumbers(eAmpereFlow) + EnumChatFormatting.RESET + " A", + translateToLocalFormatted("tt.keyphrase.Tier_Rating", clientLocale) + ": " + + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + " " + + translateToLocalFormatted("tt.keyphrase.Amp_Rating", clientLocale) + ": " + + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(eMaxAmpereFlow) + EnumChatFormatting.RESET + " A", + translateToLocalFormatted("tt.keyword.Problems", clientLocale) + ": " + + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + " " + + translateToLocalFormatted("tt.keyword.Efficiency", clientLocale) + ": " + + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", + translateToLocalFormatted("tt.keyword.PowerPass", clientLocale) + ": " + + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + " " + + translateToLocalFormatted("tt.keyword.SafeVoid", clientLocale) + ": " + + EnumChatFormatting.BLUE + eSafeVoid, + translateToLocalFormatted("tt.keyphrase.Computation_Available", clientLocale) + ": " + + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(eAvailableData) + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(eRequiredData) + EnumChatFormatting.RESET, translateToLocalFormatted("tt.keyphrase.Computation_Remaining", clientLocale) + ":", - EnumChatFormatting.GREEN + Long.toString(computationRemaining / 20L) + EnumChatFormatting.RESET + " / " + - EnumChatFormatting.YELLOW + computationRequired / 20L + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(computationRemaining / 20L) + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(computationRequired / 20L) }; } 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 b418ec0fa4..5cc5108eee 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 @@ -23,6 +23,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; @@ -347,21 +348,31 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa return new String[]{ translateToLocalFormatted("tt.keyphrase.Energy_Hatches", clientLocale) + ":", - EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU", + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", (mEUt <= 0 ? translateToLocalFormatted("tt.keyphrase.Probably_uses", clientLocale) + ": " : translateToLocalFormatted("tt.keyphrase.Probably_makes", clientLocale) + ": ") + - EnumChatFormatting.RED + Math.abs(mEUt) + EnumChatFormatting.RESET + " EU/t " + translateToLocalFormatted("tt.keyword.at", clientLocale) + " " + - EnumChatFormatting.RED + eAmpereFlow + EnumChatFormatting.RESET + " A", - translateToLocalFormatted("tt.keyphrase.Tier_Rating", clientLocale) + ": " + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + - " " + translateToLocalFormatted("tt.keyphrase.Amp_Rating", clientLocale) + ": " + EnumChatFormatting.GREEN + eMaxAmpereFlow + EnumChatFormatting.RESET + " A", - translateToLocalFormatted("tt.keyword.Problems", clientLocale) + ": " + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + - " " + translateToLocalFormatted("tt.keyword.Efficiency", clientLocale) + ": " + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", - translateToLocalFormatted("tt.keyword.PowerPass", clientLocale) + ": " + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + - " " + translateToLocalFormatted("tt.keyword.SafeVoid", clientLocale) + ": " + EnumChatFormatting.BLUE + eSafeVoid, - translateToLocalFormatted("tt.keyphrase.Computation_Available", clientLocale) + ": " + EnumChatFormatting.GREEN + eAvailableData + EnumChatFormatting.RESET + " / " + EnumChatFormatting.YELLOW + eRequiredData + EnumChatFormatting.RESET, + EnumChatFormatting.RED + GT_Utility.formatNumbers(Math.abs(mEUt)) + EnumChatFormatting.RESET + " EU/t " + + translateToLocalFormatted("tt.keyword.at", clientLocale) + " " + + EnumChatFormatting.RED + GT_Utility.formatNumbers(eAmpereFlow) + EnumChatFormatting.RESET + " A", + translateToLocalFormatted("tt.keyphrase.Tier_Rating", clientLocale) + ": " + + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + " " + + translateToLocalFormatted("tt.keyphrase.Amp_Rating", clientLocale) + ": " + + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(eMaxAmpereFlow) + EnumChatFormatting.RESET + " A", + translateToLocalFormatted("tt.keyword.Problems", clientLocale) + ": " + + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + " " + + translateToLocalFormatted("tt.keyword.Efficiency", clientLocale) + ": " + + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", + translateToLocalFormatted("tt.keyword.PowerPass", clientLocale) + ": " + + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + " " + + translateToLocalFormatted("tt.keyword.SafeVoid", clientLocale) + ": " + + EnumChatFormatting.BLUE + eSafeVoid, + translateToLocalFormatted("tt.keyphrase.Computation_Available", clientLocale) + ": " + + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(eAvailableData) + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(eRequiredData) + EnumChatFormatting.RESET, translateToLocalFormatted("tt.keyphrase.Computation_Remaining", clientLocale) + ":", - EnumChatFormatting.GREEN + Long.toString(computationRemaining / 20L) + EnumChatFormatting.RESET + " / " + - EnumChatFormatting.YELLOW + computationRequired / 20L + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(computationRemaining / 20L) + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(computationRequired / 20L) }; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java index 9ba6235c83..dddd3420bf 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java @@ -387,21 +387,23 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt return new String[]{ "Progress:", - EnumChatFormatting.GREEN + Integer.toString(mProgresstime / 20) + EnumChatFormatting.RESET + " s / " + - EnumChatFormatting.YELLOW + mMaxProgresstime / 20 + EnumChatFormatting.RESET + " s", + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mProgresstime / 20) + EnumChatFormatting.RESET + " s / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(mMaxProgresstime / 20) + EnumChatFormatting.RESET + " s", "Energy Hatches:", - EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU", + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", (mEUt * eAmpereFlow <= 0 ? "Probably uses: " : "Probably makes: ") + - EnumChatFormatting.RED + Math.abs(mEUt) + EnumChatFormatting.RESET + " EU/t at " + - EnumChatFormatting.RED + eAmpereFlow + EnumChatFormatting.RESET + " A", - "Tier Rating: " + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + - " Amp Rating: " + EnumChatFormatting.GREEN + eMaxAmpereFlow + EnumChatFormatting.RESET + " A", + EnumChatFormatting.RED + GT_Utility.formatNumbers(Math.abs(mEUt)) + EnumChatFormatting.RESET + " EU/t at " + + EnumChatFormatting.RED + GT_Utility.formatNumbers(eAmpereFlow) + EnumChatFormatting.RESET + " A", + "Tier Rating: " + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + + " Amp Rating: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(eMaxAmpereFlow) + EnumChatFormatting.RESET + " A", "Problems: " + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + " Efficiency: " + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", "PowerPass: " + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + " SafeVoid: " + EnumChatFormatting.BLUE + eSafeVoid, - "Computation: " + EnumChatFormatting.GREEN + eAvailableData + EnumChatFormatting.RESET + " / " + EnumChatFormatting.YELLOW + eRequiredData + EnumChatFormatting.RESET + "Computation: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(eAvailableData) + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(eRequiredData) + EnumChatFormatting.RESET }; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DataReader.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DataReader.java index d942786916..748b680faa 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DataReader.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DataReader.java @@ -272,11 +272,11 @@ public class GT_MetaTileEntity_DataReader extends GT_MetaTileEntity_BasicMachine int time=itemStack.stackTagCompound.getInteger("time"); int EUt=itemStack.stackTagCompound.getInteger("eu"); font.drawString("Assembly Line Recipe", 7, 8, 0x80a0ff); - font.drawString(GT_Utility.trans("152","Total: ") + ((long)time * EUt) + " EU",7,93, 0x80a0ff); - font.drawString(GT_Utility.trans("153","Usage: ") + EUt + " EU/t",7,103, 0x80a0ff); - font.drawString(GT_Utility.trans("154","Voltage: ") + EUt + " EU",7,113, 0x80a0ff); + font.drawString(GT_Utility.trans("152","Total: ") + GT_Utility.formatNumbers((long)time * EUt) + " EU",7,93, 0x80a0ff); + font.drawString(GT_Utility.trans("153","Usage: ") + GT_Utility.formatNumbers(EUt) + " EU/t",7,103, 0x80a0ff); + font.drawString(GT_Utility.trans("154","Voltage: ") + GT_Utility.formatNumbers(EUt) + " EU",7,113, 0x80a0ff); font.drawString(GT_Utility.trans("155","Amperage: ") + 1 ,7,123, 0x80a0ff); - font.drawString( GT_Utility.trans("158","Time: ")+String.format("%.2f " + GT_Utility.trans("161"," secs"), 0.05F * time), 7,133, 0x80a0ff); + font.drawString( GT_Utility.trans("158","Time: ") + GT_Utility.formatNumbers(0.05d * time) + GT_Utility.trans("161"," secs"), 7,133, 0x80a0ff); for(Map.Entry entry:slots.entrySet()){ gui.renderItemSimple(entry.getKey(),entry.getValue()); -- cgit From 4027ccec69240e7f6f65cb17a5ee53f40f1473c8 Mon Sep 17 00:00:00 2001 From: D-Cysteine <54219287+D-Cysteine@users.noreply.github.com> Date: Wed, 11 Aug 2021 17:45:32 -0600 Subject: Use criticalStopMachine() when out of energy --- .../multi/base/GT_MetaTileEntity_MultiblockBase_EM.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java index dddd3420bf..39b938f680 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java @@ -1677,7 +1677,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt addEnergyOutput_EM((long) mEUt * (long) mEfficiency / getMaxEfficiency(aStack), eAmpereFlow); } else if (euFlow < 0) { if (!drainEnergyInput_EM(mEUt, (long) mEUt * getMaxEfficiency(aStack) / Math.max(1000L, mEfficiency), eAmpereFlow)) { - stopMachine(); + criticalStopMachine(); return false; } } @@ -1690,7 +1690,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt addEnergyOutput_EM((long) mEUt * (long) mEfficiency / getMaxEfficiency(aStack), eAmpereFlow); } else if (euFlow < 0) { if (!drainEnergyInput((long) mEUt * getMaxEfficiency(aStack) / Math.max(1000L, mEfficiency), eAmpereFlow)) { - stopMachine(); + criticalStopMachine(); return false; } } -- cgit From 9721acdccf9a42c57c91410c5b775e70b0c87958 Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 28 Aug 2021 23:27:25 -0700 Subject: Migrated calls to StructureLib --- .../metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') 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 329b3cbc14..0d30facf7b 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 @@ -12,8 +12,6 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.templates.cElem import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition; import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dHadronDefinition; import com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.eQuarkDefinition; -import com.github.technus.tectech.mechanics.structure.IStructureDefinition; -import com.github.technus.tectech.mechanics.structure.StructureDefinition; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.casing.TT_Container_Casings; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental; @@ -23,6 +21,8 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunctio import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; @@ -39,12 +39,13 @@ import java.util.HashMap; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static com.github.technus.tectech.mechanics.elementalMatter.core.transformations.bTransformationInfo.AVOGADRO_CONSTANT; -import static com.github.technus.tectech.mechanics.structure.StructureUtility.*; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static com.github.technus.tectech.util.DoubleCount.add; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -304,7 +305,7 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB //use multi A energy inputs, use less power the longer it runs private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition .builder() - .addShapeOldApi("main", new String[][]{ + .addShape("main", new String[][]{ {"I0A0A0", "I00000", "I0A0A0",}, {"H0000000", "G001111100", "H0000000",}, {"F22223332222", "F41155555114", "F22223332222",}, -- cgit From f82f5b9d516769392730a9ca011537e3b472c31c Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 28 Aug 2021 23:27:55 -0700 Subject: Migrated calls to StructureLib --- .../metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java index 06476fb62e..6765abfa5c 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java @@ -1,12 +1,12 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; -import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.IStructureDefinition; -import com.github.technus.tectech.mechanics.structure.StructureDefinition; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; @@ -17,14 +17,14 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import static com.github.technus.tectech.mechanics.structure.StructureUtility.ofBlock; -import static com.github.technus.tectech.mechanics.structure.StructureUtility.ofHatchAdderOptional; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_decay.URANIUM_INGOT_MASS_DIFF; import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_decay.URANIUM_MASS_TO_EU_INSTANT; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static gregtech.api.enums.GT_Values.E; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -51,7 +51,7 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E //region structure actual private static final IStructureDefinition STRUCTURE_DEFINITION= StructureDefinition .builder() - .addShapeOldApi("t1",new String[][]{ + .addShape("t1",new String[][]{ {"\u000B", "M0000000", "L00 00", "L0 0", "L0 !!! 0", "L0 !.! 0", "L0 !!! 0", "L0 0", "L00 00", "M0000000",}, {"\u0008", "O0A0", "O0A0", "O0A0", "O0A0", "N11111", "M1101011", "I000010010010000", "M1111111", "I000010010010000", "M1101011", "N11111", "O0A0", "O0A0", "O0A0", "O0A0",}, {"\u0006", "O0A0", "O0A0", "O0A0", "P1", "P1", "M1111111", "L11E11", "L1B222B1", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "L1B222B1", "L11E11", "M1111111", "P1", "P1", "O0A0", "O0A0", "O0A0",}, @@ -86,7 +86,7 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E {"\u0008", "O0A0", "O0A0", "O0A0", "O0A0", "N11111", "M1101011", "I000010010010000", "M1111111", "I000010010010000", "M1101011", "N11111", "O0A0", "O0A0", "O0A0", "O0A0",}, {"\u000B", "O0A0", "O0A0", "O0A0", "L000000000", "O0A0", "L000000000", "O0A0", "O0A0", "O0A0",}, }) - .addShapeOldApi("t2",new String[][]{ + .addShape("t2",new String[][]{ {"\u000B", "M0000000", "L00 00", "L0 0", "L0 !!! 0", "L0 !.! 0", "L0 !!! 0", "L0 0", "L00 00", "M0000000",}, {"\u0008", "O0A0", "M550A055", "L5550A0555", "K55550A05555", "J5555111115555", "J5551101011555", "I000010010010000", "M1111111", "I000010010010000", "J5551101011555", "J5555111115555", "K55550A05555", "L5550A0555", "M550A055", "O0A0",}, {"\u0006", "O0A0", "M550A055", "K55550A05555", "J555C1C555", "I555D1D555", "I55B1111111B55", "H55B11E11B55", "H55B1B222B1B55", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "H55B1B222B1B55", "H55B11E11B55", "I55B1111111B55", "I555D1D555", "J555C1C555", "K55550A05555", "M550A055", "O0A0",}, @@ -134,7 +134,7 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E .build(); @Override - public IStructureDefinition getStructure_EM() { + public IStructureDefinition getStructure_EM() { return STRUCTURE_DEFINITION; } -- cgit From e5a3d4de3bba55d2d5ad40ebc68d75ddcc4c7a9c Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 28 Aug 2021 23:28:38 -0700 Subject: Migrated calls to StructureLib --- .../metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java index 3e288ccafa..ea3d79443a 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java @@ -1,14 +1,14 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.Reference; -import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.IStructureDefinition; -import com.github.technus.tectech.mechanics.structure.StructureDefinition; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_Container_MultiMachineEM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_GUIContainer_MultiMachineEM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; @@ -20,7 +20,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; -import static com.github.technus.tectech.mechanics.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; -- cgit From 267ecbaa30211f1463050cc97369287f1d2d7ccb Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 29 Aug 2021 14:59:59 -0700 Subject: Changed to StructureLib Vec3Impl --- .../com/github/technus/tectech/mechanics/dataTransport/DataPacket.java | 2 +- .../technus/tectech/mechanics/dataTransport/QuantumDataPacket.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/mechanics/dataTransport/DataPacket.java b/src/main/java/com/github/technus/tectech/mechanics/dataTransport/DataPacket.java index 990a48ac70..f30105f1ee 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/dataTransport/DataPacket.java +++ b/src/main/java/com/github/technus/tectech/mechanics/dataTransport/DataPacket.java @@ -1,6 +1,6 @@ package com.github.technus.tectech.mechanics.dataTransport; -import com.github.technus.tectech.util.Vec3Impl; +import com.gtnewhorizon.structurelib.util.Vec3Impl; import net.minecraft.nbt.NBTTagCompound; import java.util.Collections; diff --git a/src/main/java/com/github/technus/tectech/mechanics/dataTransport/QuantumDataPacket.java b/src/main/java/com/github/technus/tectech/mechanics/dataTransport/QuantumDataPacket.java index 268de6f71c..0fddb53fe9 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/dataTransport/QuantumDataPacket.java +++ b/src/main/java/com/github/technus/tectech/mechanics/dataTransport/QuantumDataPacket.java @@ -1,6 +1,6 @@ package com.github.technus.tectech.mechanics.dataTransport; -import com.github.technus.tectech.util.Vec3Impl; +import com.gtnewhorizon.structurelib.util.Vec3Impl; import net.minecraft.nbt.NBTTagCompound; public class QuantumDataPacket extends DataPacket { -- cgit From e005dfd76f488b52bff7c7ea4246cfab962a70be Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 29 Aug 2021 17:46:26 -0700 Subject: Changed to StructureLib Vec3Impl --- .../com/github/technus/tectech/mechanics/spark/ThaumSpark.java | 3 ++- .../technus/tectech/mechanics/tesla/ITeslaConnectableSimple.java | 2 +- .../technus/tectech/mechanics/tesla/TeslaCoverConnection.java | 7 +++++-- .../thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java | 6 ++++-- 4 files changed, 12 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/mechanics/spark/ThaumSpark.java b/src/main/java/com/github/technus/tectech/mechanics/spark/ThaumSpark.java index e31e63f250..0480cfffd2 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/spark/ThaumSpark.java +++ b/src/main/java/com/github/technus/tectech/mechanics/spark/ThaumSpark.java @@ -1,6 +1,7 @@ package com.github.technus.tectech.mechanics.spark; -import com.github.technus.tectech.util.Vec3Impl; + +import com.gtnewhorizon.structurelib.util.Vec3Impl; import java.io.Serializable; import java.util.Objects; diff --git a/src/main/java/com/github/technus/tectech/mechanics/tesla/ITeslaConnectableSimple.java b/src/main/java/com/github/technus/tectech/mechanics/tesla/ITeslaConnectableSimple.java index 3b56b6968c..2adc25bbed 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/tesla/ITeslaConnectableSimple.java +++ b/src/main/java/com/github/technus/tectech/mechanics/tesla/ITeslaConnectableSimple.java @@ -1,6 +1,6 @@ package com.github.technus.tectech.mechanics.tesla; -import com.github.technus.tectech.util.Vec3Impl; +import com.gtnewhorizon.structurelib.util.Vec3Impl; public interface ITeslaConnectableSimple { //-128 to -1 disables capability diff --git a/src/main/java/com/github/technus/tectech/mechanics/tesla/TeslaCoverConnection.java b/src/main/java/com/github/technus/tectech/mechanics/tesla/TeslaCoverConnection.java index 5c6fef6af8..0b84236709 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/tesla/TeslaCoverConnection.java +++ b/src/main/java/com/github/technus/tectech/mechanics/tesla/TeslaCoverConnection.java @@ -1,7 +1,7 @@ package com.github.technus.tectech.mechanics.tesla; -import com.github.technus.tectech.util.Vec3Impl; import com.google.common.base.Objects; +import com.gtnewhorizon.structurelib.util.Vec3Impl; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import static com.github.technus.tectech.mechanics.tesla.ITeslaConnectable.TeslaUtil.teslaSimpleNodeSetAdd; @@ -14,7 +14,10 @@ public class TeslaCoverConnection implements ITeslaConnectableSimple { public TeslaCoverConnection(IGregTechTileEntity IGT, byte teslaReceptionCapability) { this.IGT = IGT; - this.pos = new Vec3Impl(IGT); + this.pos = new Vec3Impl(IGT.getXCoord(), + IGT.getYCoord(), + IGT.getZCoord()); + this.teslaReceptionCapability = teslaReceptionCapability; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java index 274389b01a..3b240e4c56 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java @@ -8,10 +8,10 @@ import com.github.technus.tectech.loader.NetworkDispatcher; import com.github.technus.tectech.mechanics.spark.RendererMessage; import com.github.technus.tectech.mechanics.spark.ThaumSpark; import com.github.technus.tectech.util.Util; -import com.github.technus.tectech.util.Vec3Impl; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; import com.google.common.collect.MultimapBuilder; +import com.gtnewhorizon.structurelib.util.Vec3Impl; import eu.usrv.yamcore.auxiliary.PlayerChatHelper; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -333,7 +333,9 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB @Override public Vec3Impl getTeslaPosition() { - return new Vec3Impl(this.getBaseMetaTileEntity()); + return new Vec3Impl(this.getBaseMetaTileEntity().getXCoord(), + this.getBaseMetaTileEntity().getYCoord(), + this.getBaseMetaTileEntity().getZCoord()); } @Override -- cgit From 6beca9b201b111dcc2cbb1505091f996a37694ee Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 29 Aug 2021 18:10:23 -0700 Subject: Changed to StructureLib --- .../thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 0d30facf7b..fe91be7bdc 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 @@ -3,7 +3,6 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.dComplexAspectDefinition; import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.ePrimalAspectDefinition; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalDecayResult; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalMutableDefinitionStackMap; @@ -21,6 +20,7 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunctio import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; -- cgit From 2b9ccc57c92d48dbdda56172f3fdd5e1033ccaa7 Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 1 Sep 2021 13:41:47 -0700 Subject: Deprecating on Basdxz's request --- .../GT_MetaTileEntity_TM_proccessingStack.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java index 38e14b9a6f..2d64e608c5 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java @@ -21,7 +21,27 @@ import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static gregtech.api.GregTech_API.sBlockCasings4; import static net.minecraft.util.StatCollector.translateToLocal; +@Deprecated public class GT_MetaTileEntity_TM_proccessingStack extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { + protected GT_MetaTileEntity_TM_proccessingStack(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + + } + + @Override + public String[] getStructureDescription(ItemStack stackSize) { + return new String[0]; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return null; + } + /* //region variables private boolean hasBeenPausedThisCycle = false; //endregion @@ -131,4 +151,5 @@ public class GT_MetaTileEntity_TM_proccessingStack extends GT_MetaTileEntity_Mul public String[] getStructureDescription(ItemStack stackSize) { return description; } + */ } \ No newline at end of file -- cgit From 528270b9623e848af7417db60b51799d746394e3 Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 1 Sep 2021 21:25:38 -0700 Subject: I think I did this right --- .../multi/GT_MetaTileEntity_EM_annihilation.java | 64 +++++++++++++++++----- 1 file changed, 51 insertions(+), 13 deletions(-) (limited to 'src') 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 584e28a607..8fbd746fcd 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 @@ -1,27 +1,30 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; -import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; +import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sHintCasingsTT; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -31,9 +34,40 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl //region variables private static Textures.BlockIcons.CustomIcon ScreenOFF; private static Textures.BlockIcons.CustomIcon ScreenON; + private static final String[] description = new String[]{ + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", + translateToLocal("gt.blockmachines.multimachine.em.annihilation.hint.0"),//1 - Classic Hatches or High Power Casing + translateToLocal("gt.blockmachines.multimachine.em.annihilation.hint.1"),//2 - Elemental Hatches or Molecular Casing + }; //endregion //region structure + private static final IStructureDefinition STRUCTURE_DEFINITION = + StructureDefinition.builder() + .addShape("main", new String[][]{ + {" "," AB BA "," AB BA "," BBB "," A A A ","AA F AA"," A A A "," BBB "," AB BA "," AB BA "," "}, + {" "," AB BA "," EECEEECEE "," EGGEEEGGE ","ACGGGEGGGCA","AEGGGDGGGEA","ACGGGEGGGCA"," EGGEEEGGE "," EECEEECEE "," AB BA "," "}, + {" "," B B "," EGGEGEGGE "," G G "," G G "," G G "," G G "," G G "," EGGEGEGGE "," B B "," "}, + {" AAA ","AA BAB AA","ACGGEGEGGCA"," G G "," G G "," G G "," G G "," G G ","ACGGEGEGGCA","AA BAB AA"," AAA "}, + {" AHHHA ","BBBBBBBBBBB","BEEEDEDEEEB","BE EB"," G G "," G G "," G G ","BE EB","BEEEDEDEEEB","BBBBBBBBBBB"," AHHHA "}, + {" AH~HA "," ABBBA "," EGGEEEGGE ","BE EB","AE EA","FD DF","AE EA","BE EB"," EGGEEEGGE "," ABBBA "," AHHHA "}, + {" AHHHA ","BBBBBBBBBBB","BEEEDEDEEEB","BE EB"," G G "," G G "," G G ","BE EB","BEEEDEDEEEB","BBBBBBBBBBB"," AHHHA "}, + {" AAA ","AA BAB AA","ACGGEGEGGCA"," G G "," G G "," G G "," G G "," G G ","ACGGEGEGGCA","AA BAB AA"," AAA "}, + {" "," B B "," EGGEGEGGE "," G G "," G G "," G G "," G G "," G G "," EGGEGEGGE "," B B "," "}, + {" "," AB BA "," EECEEECEE "," EGGEEEGGE ","ACGGGEGGGCA","AEGGGDGGGEA","ACGGGEGGGCA"," EGGEEEGGE "," EECEEECEE "," AB BA "," "}, + {" "," AB BA "," AB BA "," BBB "," A A A ","AA F AA"," A A A "," BBB "," AB BA "," AB BA "," "} + }) + .addElement('A', ofBlock(sBlockCasingsTT, 4)) + .addElement('B', ofBlock(sBlockCasingsTT, 5)) + .addElement('C', ofBlock(sBlockCasingsTT, 6)) + .addElement('D', ofBlock(sBlockCasingsTT, 10)) + .addElement('E', ofBlock(sBlockCasingsTT, 12)) + .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_MultiblockBase_EM::addElementalToMachineList, textureOffset + 4, sHintCasingsTT, 0, sBlockCasingsTT, 4)) + .addElement('G', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('H', ofHatchAdderOptional(GT_MetaTileEntity_EM_annihilation::addClassicToMachineList, textureOffset, sHintCasingsTT, 0, sBlockCasingsTT, 0)) + .build(); + + /* private static final String[][] shape = new String[][]{ {"\u0002", "D000", "C0 0", "C0 . 0", "C0 0", "D000"}, {"C01A10", "C01A10", "D1A1", "00B101B00", "11111111111", "C01110", "11111111111", "00B101B00", "D1A1", "C01A10", "C01A10",}, @@ -49,17 +83,14 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl }; private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT}; private static final byte[] blockMeta = new byte[]{4, 5, 12, 6, 0, 10}; - private static final IHatchAdder[] addingMethods = adders( + private static final IGT_HatchAdder[] addingMethods = adders( GT_MetaTileEntity_EM_annihilation::addClassicToMachineList, GT_MetaTileEntity_EM_annihilation::addElementalToMachineList); private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4}; - private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", - translateToLocal("gt.blockmachines.multimachine.em.annihilation.hint.0"),//1 - Classic Hatches or High Power Casing - translateToLocal("gt.blockmachines.multimachine.em.annihilation.hint.1"),//2 - Elemental Hatches or Molecular Casing - }; + */ + //endregion public GT_MetaTileEntity_EM_annihilation(int aID, String aName, String aNameRegional) { @@ -77,7 +108,8 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 5, 5, 0); + //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 5, 5, 0); + return structureCheck_EM("main", 5, 5, 0); } @Override @@ -107,7 +139,13 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 5, 5, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + //Structure.builder(shape, blockType, blockMeta, 5, 5, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 5, 5, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override -- cgit From 4c20c994d47522bbacf21dfb9c4cc3f96738da4b Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 2 Sep 2021 16:05:42 -0700 Subject: I think I did this right --- .../multi/GT_MetaTileEntity_EM_research.java | 90 ++++++++++++++++------ 1 file changed, 65 insertions(+), 25 deletions(-) (limited to 'src') 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 889b4cfec3..1b6cf2d0fd 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 @@ -1,14 +1,14 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; -import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.recipe.TT_recipe; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Holder; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; @@ -22,6 +22,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockB import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; +import gregtech.api.util.IGT_HatchAdder; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -45,7 +46,11 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileE import static com.github.technus.tectech.thing.metaTileEntity.multi.em_machine.GT_MetaTileEntity_EM_machine.machine; import static com.github.technus.tectech.util.CommonValues.V; import static com.github.technus.tectech.util.CommonValues.VN; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; import static gregtech.api.enums.GT_Values.E; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; import static net.minecraft.util.StatCollector.translateToLocalFormatted; @@ -64,32 +69,55 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB private static LinkedHashMap lServerNames; - private String clientLocale = "en_US"; - //endregion - - //region structure - private static final String[][] shape = new String[][]{ - {E, "000", E, E, E, "000"/*,E,*/}, - {"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", "111", "111", "111", "212", "000",}, - {"000", "222", " ", " ", " ", "222", "000",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{1, 3, 2}; - private static final IHatchAdder[] addingMethods = adders( - GT_MetaTileEntity_EM_research::addClassicToMachineList, - GT_MetaTileEntity_EM_research::addHolderToMachineList); - private static final short[] casingTextures = new short[]{textureOffset + 1, textureOffset + 3}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, Blocks.air}; - private static final byte[] blockMetaFallback = new byte[]{1, 0}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.research.hint.0"),//1 - Classic/Data Hatches or Computer casing translateToLocal("gt.blockmachines.multimachine.em.research.hint.1"),//2 - Holder Hatch }; + + private String clientLocale = "en_US"; + //endregion + + //region structure + private static final IStructureDefinition STRUCTURE_DEFINITION = + StructureDefinition.builder() + .addShape("main", new String[][]{ + {" ", " A ", " A ", "AAA", "AAA", "AAA", "AAA"}, + {"AAA", "ACA", "ACA", "ACA", "BCB", "BCB", "BBB"}, + {" ", " C ", " ", " ", "ACA", "CCC", "DDD"}, + {" ", " E ", " ", " ", "A~A", "CCC", "DDD"}, + {" ", " C ", " ", " ", "ACA", "CCC", "DDD"}, + {"AAA", "ACA", "ACA", "ACA", "BCB", "BCB", "BBB"}, + {" ", " A ", " A ", "AAA", "AAA", "AAA", "AAA"} + }) + .addElement('A', ofBlock(sBlockCasingsTT, 1)) + .addElement('B', ofBlock(sBlockCasingsTT, 2)) + .addElement('C', ofBlock(sBlockCasingsTT, 3)) + .addElement('D', ofChain( + ofHatchAdder(GT_MetaTileEntity_EM_research::addClassicToMachineList, textureOffset + 1, sBlockCasingsTT, 1), + ofHatchAdder(GT_MetaTileEntity_EM_research::addDataConnectorToMachineList, textureOffset + 3, sBlockCasingsTT, 1) + )) + .addElement('E', ofHatchAdder(GT_MetaTileEntity_EM_research::addHolderToMachineList, 3, 1)) + .build(); + +// private static final String[][] shape = new String[][]{ +// {E, "000", E, E, E, "000"/*,E,*/}, +// {"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", "111", "111", "111", "212", "000",}, +// {"000", "222", " ", " ", " ", "222", "000",}, +// }; +// private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; +// private static final byte[] blockMeta = new byte[]{1, 3, 2}; +// private static final IGT_HatchAdder[] addingMethods = adders( +// GT_MetaTileEntity_EM_research::addClassicToMachineList, +// GT_MetaTileEntity_EM_research::addHolderToMachineList); +// private static final short[] casingTextures = new short[]{textureOffset + 1, textureOffset + 3}; +// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, Blocks.air}; +// private static final byte[] blockMetaFallback = new byte[]{1, 0}; + //endregion public GT_MetaTileEntity_EM_research(int aID, String aName, String aNameRegional) { @@ -262,9 +290,15 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB } eHolders.clear(); + if (!structureCheck_EM("main", 1, 3, 4)) { + return false; + } + + /* if (!structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 3, 4)) { return false; } + */ for (GT_MetaTileEntity_Hatch_Holder rack : eHolders) { if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(rack)) { @@ -559,7 +593,13 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 1, 3, 4, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + //Structure.builder(shape, blockType, blockMeta, 1, 3, 4, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 1, 3, 4, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override -- cgit From ecc78e14047c52bb2ef41b20797b080197fdfe7d Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 2 Sep 2021 16:06:19 -0700 Subject: Fixed function namespace --- .../thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 8fbd746fcd..f36d2e7a63 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 @@ -62,7 +62,7 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl .addElement('C', ofBlock(sBlockCasingsTT, 6)) .addElement('D', ofBlock(sBlockCasingsTT, 10)) .addElement('E', ofBlock(sBlockCasingsTT, 12)) - .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_MultiblockBase_EM::addElementalToMachineList, textureOffset + 4, sHintCasingsTT, 0, sBlockCasingsTT, 4)) + .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_annihilation::addElementalToMachineList, textureOffset + 4, sHintCasingsTT, 0, sBlockCasingsTT, 4)) .addElement('G', ofBlock(QuantumGlassBlock.INSTANCE, 0)) .addElement('H', ofHatchAdderOptional(GT_MetaTileEntity_EM_annihilation::addClassicToMachineList, textureOffset, sHintCasingsTT, 0, sBlockCasingsTT, 0)) .build(); -- cgit From 2501b1f9c3f53a6298b8b85b8c4880ca295d2fdb Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 5 Sep 2021 06:22:19 -0700 Subject: Simplified ofChain call --- .../thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') 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 1b6cf2d0fd..2f99b46e45 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 @@ -93,11 +93,8 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB .addElement('A', ofBlock(sBlockCasingsTT, 1)) .addElement('B', ofBlock(sBlockCasingsTT, 2)) .addElement('C', ofBlock(sBlockCasingsTT, 3)) - .addElement('D', ofChain( - ofHatchAdder(GT_MetaTileEntity_EM_research::addClassicToMachineList, textureOffset + 1, sBlockCasingsTT, 1), - ofHatchAdder(GT_MetaTileEntity_EM_research::addDataConnectorToMachineList, textureOffset + 3, sBlockCasingsTT, 1) - )) - .addElement('E', ofHatchAdder(GT_MetaTileEntity_EM_research::addHolderToMachineList, 3, 1)) + .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_research::addClassicToMachineList, textureOffset + 1,1, sBlockCasingsTT,1)) + .addElement('E', ofHatchAdder(GT_MetaTileEntity_EM_research::addHolderToMachineList, 3, 2)) .build(); // private static final String[][] shape = new String[][]{ -- cgit From 1b607fd0935b61fbd23d970b989347928805bca2 Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 5 Sep 2021 07:02:40 -0700 Subject: I think I did this right --- .../multi/GT_MetaTileEntity_EM_quantizer.java | 68 +++++++++++++++------- 1 file changed, 48 insertions(+), 20 deletions(-) (limited to 'src') 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 d6ab35cd4b..0cac653157 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 @@ -2,7 +2,6 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.Reference; import com.github.technus.tectech.TecTech; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.iHasElementalDefinition; @@ -10,16 +9,18 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.transformations import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aItemQuantizationInfo; import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aOredictQuantizationInfo; import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.bTransformationInfo; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.IGT_HatchAdder; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; @@ -41,6 +42,9 @@ import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texture import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.util.CommonValues.V; import static com.github.technus.tectech.util.Util.isInputEqual; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -49,27 +53,44 @@ import static net.minecraft.util.StatCollector.translateToLocal; public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { //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",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE}; - private static final byte[] blockMeta = new byte[]{4, 0, 0}; - private static final IHatchAdder[] addingMethods = adders( - GT_MetaTileEntity_EM_quantizer::addClassicToMachineList, - GT_MetaTileEntity_EM_quantizer::addElementalOutputToMachineList, - GT_MetaTileEntity_EM_quantizer::addElementalMufflerToMachineList); - 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 IStructureDefinition STRUCTURE_DEFINITION = + StructureDefinition.builder() + .addShape("main", new String[][]{ + {"CCC","BAB","EEE","DBD"}, + {"C~C","ABA","EBE","BFB"}, + {"CCC","BAB","EEE","DBD"} + }) + .addElement('A', ofBlock(sBlockCasingsTT, 0)) + .addElement('B', ofBlock(sBlockCasingsTT, 4)) + .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_quantizer::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .addElement('D', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_quantizer::addElementalMufflerToMachineList, textureOffset + 4, 3, sBlockCasingsTT, 4)) + .addElement('F', ofHatchAdder(GT_MetaTileEntity_EM_quantizer::addElementalOutputToMachineList,textureOffset + 4, 2)) + .build(); + private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.mattertoem.hint.0"),//1 - Classic Hatches or High Power Casing translateToLocal("gt.blockmachines.multimachine.em.mattertoem.hint.1"),//2 - Elemental Output Hatch translateToLocal("gt.blockmachines.multimachine.em.mattertoem.hint.2"),//3 - Elemental Overflow Hatches or Molecular Casing }; + +// private static final String[][] shape = new String[][]{ +// {" ", " . ", " ",}, +// {"010", "101", "010",}, +// {"\"\"\"", "\"0\"", "\"\"\"",}, +// {"202", "0!0", "202",}, +// }; +// private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE}; +// private static final byte[] blockMeta = new byte[]{4, 0, 0}; +// private static final IGT_HatchAdder[] addingMethods = adders( +// GT_MetaTileEntity_EM_quantizer::addClassicToMachineList, +// GT_MetaTileEntity_EM_quantizer::addElementalOutputToMachineList, +// GT_MetaTileEntity_EM_quantizer::addElementalMufflerToMachineList); +// 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}; + //endregion public GT_MetaTileEntity_EM_quantizer(int aID, String aName, String aNameRegional) { @@ -87,7 +108,8 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); + //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); + return structureCheck_EM("main", 1, 1, 0); } @Override @@ -199,7 +221,13 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + //Structure.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override -- cgit From 0f8789da456c1c1d153085a187397c3cda931eb9 Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 5 Sep 2021 07:26:39 -0700 Subject: I think I did this right --- .../multi/GT_MetaTileEntity_EM_dequantizer.java | 72 +++++++++++++++------- 1 file changed, 51 insertions(+), 21 deletions(-) (limited to 'src') 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 9814092710..ce328fa480 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 @@ -1,22 +1,24 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.iHasElementalDefinition; import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aFluidDequantizationInfo; import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aItemDequantizationInfo; import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aOredictDequantizationInfo; -import com.github.technus.tectech.mechanics.structure.Structure; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; import com.github.technus.tectech.thing.block.QuantumGlassBlock; +import com.github.technus.tectech.thing.casing.GT_Block_HintTT; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.IGT_HatchAdder; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; @@ -31,8 +33,12 @@ import static com.github.technus.tectech.mechanics.elementalMatter.definitions.c import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.refUnstableMass; import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; -import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; +import static com.github.technus.tectech.thing.casing.TT_Container_Casings.*; import static com.github.technus.tectech.util.CommonValues.V; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockHint; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -41,27 +47,44 @@ import static net.minecraft.util.StatCollector.translateToLocal; public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { //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",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE}; - private static final byte[] blockMeta = new byte[]{0, 4, 0}; - private static final IHatchAdder[] addingMethods = adders( - GT_MetaTileEntity_EM_dequantizer::addClassicToMachineList, - GT_MetaTileEntity_EM_dequantizer::addElementalInputToMachineList, - GT_MetaTileEntity_EM_dequantizer::addElementalMufflerToMachineList); - 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 IStructureDefinition STRUCTURE_DEFINITION = + StructureDefinition.builder() + .addShape("main", new String[][]{ + {"CCC","ABA","EEE","BDB"}, + {"C~C","BBB","EBE","DFD"}, + {"CCC","ABA","EEE","BDB"} + }) + .addElement('A', ofBlock(sBlockCasingsTT, 0)) + .addElement('B', ofBlock(sBlockCasingsTT, 4)) + .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_dequantizer::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .addElement('D', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_dequantizer::addElementalMufflerToMachineList, textureOffset + 4, 3, sBlockCasingsTT, 4)) + .addElement('F', ofHatchAdder(GT_MetaTileEntity_EM_dequantizer::addElementalInputToMachineList, textureOffset + 4, sHintCasingsTT, 1)) + .build(); + private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.emtomatter.hint.0"),//1 - Classic Hatches or High Power Casing" translateToLocal("gt.blockmachines.multimachine.em.emtomatter.hint.1"),//2 - Elemental Input Hatch translateToLocal("gt.blockmachines.multimachine.em.emtomatter.hint.2"),//3 - Elemental Overflow Hatches or Molecular Casing }; + +// private static final String[][] shape = new String[][]{ +// {" ", " . ", " ",}, +// {"010", "111", "010",}, +// {"\"\"\"", "\"1\"", "\"\"\"",}, +// {"121", "2!2", "121",}, +// }; +// private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE}; +// private static final byte[] blockMeta = new byte[]{0, 4, 0}; +// private static final IGT_HatchAdder[] addingMethods = adders( +// GT_MetaTileEntity_EM_dequantizer::addClassicToMachineList, +// GT_MetaTileEntity_EM_dequantizer::addElementalInputToMachineList, +// GT_MetaTileEntity_EM_dequantizer::addElementalMufflerToMachineList); +// 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}; //endregion public GT_MetaTileEntity_EM_dequantizer(int aID, String aName, String aNameRegional) { @@ -92,7 +115,8 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); + //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); + return structureCheck_EM("main", 1, 1, 0); } @Override @@ -155,7 +179,13 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + //Structure.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override -- cgit From ecf780470664ceaa4f39d0a9cbd6623d58dff3cb Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 5 Sep 2021 07:29:24 -0700 Subject: migrated deprecated structure build call to use StructureLib api --- .../tectech/mechanics/structure/Structure.java | 5 +-- .../base/GT_MetaTileEntity_MultiblockBase_EM.java | 40 ++++++++++++---------- 2 files changed, 24 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/Structure.java b/src/main/java/com/github/technus/tectech/mechanics/structure/Structure.java index 83951372a2..b37ae0bbda 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/Structure.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/Structure.java @@ -1,11 +1,12 @@ package com.github.technus.tectech.mechanics.structure; import com.github.technus.tectech.TecTech; -import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing; import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; import com.github.technus.tectech.thing.casing.TT_Container_Casings; +import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.IGT_HatchAdder; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; @@ -32,7 +33,7 @@ public class Structure { String[][] structure,//0-9 casing, +- air no air, A... ignore 'A'-CHAR-1 blocks Block[] blockType,//use numbers 0-9 for casing types byte[] blockMeta,//use numbers 0-9 for casing types - IHatchAdder[] addingMethods, + IGT_HatchAdder[] addingMethods, short[] casingTextures, Block[] blockTypeFallback,//use numbers 0-9 for casing types byte[] blockMetaFallback,//use numbers 0-9 for casing types diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java index 9ba6235c83..86de270ba4 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java @@ -3,24 +3,26 @@ package com.github.technus.tectech.thing.metaTileEntity.multi.base; import com.github.technus.tectech.Reference; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.loader.NetworkDispatcher; -import com.github.technus.tectech.mechanics.alignment.AlignmentLimits; -import com.github.technus.tectech.mechanics.alignment.AlignmentMessage; -import com.github.technus.tectech.mechanics.alignment.IAlignment; -import com.github.technus.tectech.mechanics.alignment.IAlignmentLimits; -import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing; -import com.github.technus.tectech.mechanics.alignment.enumerable.Flip; -import com.github.technus.tectech.mechanics.alignment.enumerable.Rotation; + +import com.github.technus.tectech.mechanics.structure.Structure; +import com.gtnewhorizon.structurelib.alignment.AlignmentMessage; +import com.gtnewhorizon.structurelib.alignment.IAlignment; +import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; +import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; +import com.gtnewhorizon.structurelib.alignment.enumerable.Flip; +import com.gtnewhorizon.structurelib.alignment.enumerable.Rotation; +import com.gtnewhorizon.structurelib.structure.StructureUtility; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.util.Vec3Impl; +import gregtech.api.util.GT_StructureUtility; + import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalDefinitionStack; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack; import com.github.technus.tectech.mechanics.elementalMatter.core.tElementalException; -import com.github.technus.tectech.mechanics.structure.IStructureDefinition; -import com.github.technus.tectech.mechanics.structure.Structure; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; import com.github.technus.tectech.thing.metaTileEntity.hatch.*; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.Util; -import com.github.technus.tectech.util.Vec3Impl; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; @@ -32,6 +34,7 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.*; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; +import gregtech.api.util.IGT_HatchAdder; import gregtech.common.GT_Pollution; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; @@ -46,6 +49,8 @@ import net.minecraftforge.fluids.FluidStack; import java.util.ArrayList; +import static gregtech.api.util.GT_StructureUtility.*; + import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.util.CommonValues.*; @@ -144,7 +149,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt private boolean explodedThisTick = false; //front rotation val - private IAlignmentLimits alignmentLimits = AlignmentLimits.UNLIMITED; + private IAlignmentLimits alignmentLimits = IAlignmentLimits.UNLIMITED; private ExtendedFacing extendedFacing = ExtendedFacing.DEFAULT; //endregion @@ -189,11 +194,6 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt return alignmentLimits; } - @Override - public void setAlignmentLimits(IAlignmentLimits limits) { - alignmentLimits=limits; - } - @Override public boolean isFacingValid(byte aFacing) { return canSetToDirectionAny(ForgeDirection.getOrientation(aFacing)); @@ -237,7 +237,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt String[][] structure,//0-9 casing, +- air no air, a-z ignore Block[] blockType,//use numbers 0-9 for casing types byte[] blockMeta,//use numbers 0-9 for casing types - IHatchAdder[] addingMethods, + IGT_HatchAdder[] addingMethods, short[] casingTextures, Block[] blockTypeFallback,//use numbers 0-9 for casing types byte[] blockMetaFallback,//use numbers 0-9 for casing types @@ -648,7 +648,9 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt */ protected long getAvailableData_EM() { long result = 0; - Vec3Impl pos = new Vec3Impl(getBaseMetaTileEntity()); + Vec3Impl pos = new Vec3Impl(getBaseMetaTileEntity().getXCoord(), + getBaseMetaTileEntity().getYCoord(), + getBaseMetaTileEntity().getZCoord()); for (GT_MetaTileEntity_Hatch_InputData in : eInputData) { if (in.q != null) { Long value = in.q.contentIfNotInTrace(pos); -- cgit From 18e1af912c3d22011f0d23291df7ed164fa9e840 Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 5 Sep 2021 13:13:30 -0700 Subject: I think I did this right --- .../multi/GT_MetaTileEntity_EM_decay.java | 77 +++++++++++++++------- 1 file changed, 53 insertions(+), 24 deletions(-) (limited to 'src') 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 d534b41fec..e49a4980ed 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,10 +1,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; @@ -13,6 +10,9 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunctio import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; @@ -21,6 +21,7 @@ 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_MultiBlockBase; +import gregtech.api.util.IGT_HatchAdder; import ic2.core.init.MainConfig; import ic2.core.util.ConfigUtil; import net.minecraft.block.Block; @@ -33,12 +34,15 @@ import org.apache.commons.lang3.reflect.FieldUtils; import static com.github.technus.tectech.mechanics.elementalMatter.core.transformations.bTransformationInfo.AVOGADRO_CONSTANT; import static com.github.technus.tectech.mechanics.structure.Structure.adders; +import static com.github.technus.tectech.mechanics.structure.Structure.builder; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.STATUS_OK; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.STATUS_TOO_LOW; import static com.github.technus.tectech.util.CommonValues.VN; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; import static net.minecraft.util.StatCollector.translateToLocalFormatted; @@ -58,30 +62,48 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase //endregion //region structure - private static final String[][] shape = new String[][]{ - {"0C0", "A ", "A . ", "A ", "0C0",}, - {"00000", "00000", "00000", "00000", "00000",}, - {"0C0", "A!!!", "A!0!", "A!!!", "0C0",}, - {"01110", "12221", "12221", "12221", "01110",}, - {"01310", "12221", "32223", "12221", "01310",}, - {"01110", "12221", "12221", "12221", "01110",}, - {"0C0", "A!!!", "A!0!", "A!!!", "0C0",}, - {"00000", "00000", "00000", "00000", "00000",}, - {"0C0", "A ", "A ", "A ", "0C0",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{4, 5, 8, 6}; - private static final IHatchAdder[] addingMethods = adders( - GT_MetaTileEntity_EM_decay::addClassicToMachineList, - GT_MetaTileEntity_EM_decay::addElementalToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.decay.hint.0"),//1 - Classic Hatches or High Power Casing translateToLocal("gt.blockmachines.multimachine.em.decay.hint.1"),//2 - Elemental Hatches or Molecular Casing }; + + private static final IStructureDefinition STRUCTURE_DEFINITION = + StructureDefinition.builder() + .addShape("main", new String[][]{ + {"A A","AAAAA","A A","ABBBA","ABCBA","ABBBA","A A","AAAAA","A A"}, + {" FFF ","AAAAA"," EEE ","BDDDB","BDDDB","BDDDB"," EEE ","AAAAA"," FFF "}, + {" F~F ","AAAAA"," EAE ","BDDDB","CDDDC","BDDDB"," EAE ","AAAAA"," FFF "}, + {" FFF ","AAAAA"," EEE ","BDDDB","BDDDB","BDDDB"," EEE ","AAAAA"," FFF "}, + {"A A","AAAAA","A A","ABBBA","ABCBA","ABBBA","A A","AAAAA","A A"} + }) + .addElement('A', ofBlock(sBlockCasingsTT, 4)) + .addElement('B', ofBlock(sBlockCasingsTT, 5)) + .addElement('C', ofBlock(sBlockCasingsTT, 6)) + .addElement('D', ofBlock(sBlockCasingsTT, 8)) + .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_decay::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4)) + .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_decay::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .build(); +// private static final String[][] shape = new String[][]{ +// {"0C0", "A ", "A . ", "A ", "0C0",}, +// {"00000", "00000", "00000", "00000", "00000",}, +// {"0C0", "A!!!", "A!0!", "A!!!", "0C0",}, +// {"01110", "12221", "12221", "12221", "01110",}, +// {"01310", "12221", "32223", "12221", "01310",}, +// {"01110", "12221", "12221", "12221", "01110",}, +// {"0C0", "A!!!", "A!0!", "A!!!", "0C0",}, +// {"00000", "00000", "00000", "00000", "00000",}, +// {"0C0", "A ", "A ", "A ", "0C0",}, +// }; +// private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; +// private static final byte[] blockMeta = new byte[]{4, 5, 8, 6}; +// private static final IGT_HatchAdder[] addingMethods = adders( +// GT_MetaTileEntity_EM_decay::addClassicToMachineList, +// GT_MetaTileEntity_EM_decay::addElementalToMachineList); +// private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; +// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; +// private static final byte[] blockMetaFallback = new byte[]{0, 4}; + //endregion //region parameters @@ -110,7 +132,8 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); + //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); + return structureCheck_EM("main", 2, 2, 0); } @Override @@ -248,7 +271,13 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + //Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override -- cgit From 998e75712ad762c8de27b71684448f3a540ad0a0 Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 5 Sep 2021 14:01:23 -0700 Subject: I think I did this right --- .../multi/GT_MetaTileEntity_EM_crafting.java | 83 +++++++++++++++------- 1 file changed, 57 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java index 7d8204c07f..b028394822 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java @@ -1,18 +1,19 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; -import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; 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.util.IGT_HatchAdder; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; @@ -22,6 +23,8 @@ import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -36,32 +39,53 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB //endregion //region structure - private static final String[][] shape = new String[][]{ - {"A000", "0 0", "0 . 0", "0 0", "A000",}, - {"00000", "00000", "00000", "00000", "00000",}, - {"0C0", "A!!!", "A!1!", "A!!!", "0C0",}, - {"22222", "22222", "22122", "22222", "22222",}, - {"23432", "33333", "43134", "33333", "23432",}, - {"23332", "33333", "33533", "33333", "23332",}, - {"23432", "33333", "43134", "33333", "23432",}, - {"22222", "22222", "22122", "22222", "22222",}, - {"0C0", "A!!!", "A!1!", "A!!!", "0C0",}, - {"00000", "00000", "00000", "00000", "00000",}, - {"A000", "0 0", "0 0", "0 0", "A000",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{4, 10, 5, 0, 6, 9}; - private static final IHatchAdder[] addingMethods = adders( - GT_MetaTileEntity_EM_crafting::addClassicToMachineList, - GT_MetaTileEntity_EM_crafting::addElementalToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.crafter.hint.0"),//1 - Classic Hatches or High Power Casing translateToLocal("gt.blockmachines.multimachine.em.crafter.hint.1"),//2 - Elemental Hatches or Molecular Casing }; + + private static final IStructureDefinition STRUCTURE_DEFINITION= StructureDefinition + .builder() + .addShape("main", new String[][]{ + {" AAA ","AAAAA","A A","BBBBB","BGCGB","BGGGB","BGCGB","BBBBB","A A","AAAAA"," AAA "}, + {"AHHHA","AAAAA"," FFF ","BBBBB","GGGGG","GGGGG","GGGGG","BBBBB"," FFF ","AAAAA","AHHHA"}, + {"AH~HA","AAAAA"," FEF ","BBEBB","CGEGC","GGDGG","CGEGC","BBEBB"," FEF ","AAAAA","AHHHA"}, + {"AHHHA","AAAAA"," FFF ","BBBBB","GGGGG","GGGGG","GGGGG","BBBBB"," FFF ","AAAAA","AHHHA"}, + {" AAA ","AAAAA","A A","BBBBB","BGCGB","BGGGB","BGCGB","BBBBB","A A","AAAAA"," AAA "} + }) + .addElement('A', ofBlock(sBlockCasingsTT, 4)) + .addElement('B', ofBlock(sBlockCasingsTT, 5)) + .addElement('C', ofBlock(sBlockCasingsTT, 6)) + .addElement('D', ofBlock(sBlockCasingsTT, 9)) + .addElement('E', ofBlock(sBlockCasingsTT, 10)) + .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_crafting::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4)) + .addElement('G', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('H', ofHatchAdderOptional(GT_MetaTileEntity_EM_crafting::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .build(); + +// private static final String[][] shape = new String[][]{ +// {"A000", "0 0", "0 . 0", "0 0", "A000",}, +// {"00000", "00000", "00000", "00000", "00000",}, +// {"0C0", "A!!!", "A!1!", "A!!!", "0C0",}, +// {"22222", "22222", "22122", "22222", "22222",}, +// {"23432", "33333", "43134", "33333", "23432",}, +// {"23332", "33333", "33533", "33333", "23332",}, +// {"23432", "33333", "43134", "33333", "23432",}, +// {"22222", "22222", "22122", "22222", "22222",}, +// {"0C0", "A!!!", "A!1!", "A!!!", "0C0",}, +// {"00000", "00000", "00000", "00000", "00000",}, +// {"A000", "0 0", "0 0", "0 0", "A000",}, +// }; +// private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT}; +// private static final byte[] blockMeta = new byte[]{4, 10, 5, 0, 6, 9}; +// private static final IGT_HatchAdder[] addingMethods = adders( +// GT_MetaTileEntity_EM_crafting::addClassicToMachineList, +// GT_MetaTileEntity_EM_crafting::addElementalToMachineList); +// private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; +// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; +// private static final byte[] blockMetaFallback = new byte[]{0, 4}; + //endregion public GT_MetaTileEntity_EM_crafting(int aID, String aName, String aNameRegional) { @@ -79,7 +103,8 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); + //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); + return structureCheck_EM("main", 2, 2, 0); } @Override @@ -109,7 +134,13 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + //Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override -- cgit From f2bfd412ee8bca9066e430fe5e01e47c4848e306 Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 5 Sep 2021 14:27:10 -0700 Subject: tagged as deprecated --- .../github/technus/tectech/mechanics/structure/IBlockPosConsumer.java | 1 + .../github/technus/tectech/mechanics/structure/ICustomBlockSetting.java | 1 + .../github/technus/tectech/mechanics/structure/IStructureDefinition.java | 1 + .../github/technus/tectech/mechanics/structure/IStructureElement.java | 1 + .../technus/tectech/mechanics/structure/IStructureElementChain.java | 1 + .../technus/tectech/mechanics/structure/IStructureElementCheckOnly.java | 1 + .../technus/tectech/mechanics/structure/IStructureElementDeferred.java | 1 + .../tectech/mechanics/structure/IStructureElementNoPlacement.java | 1 + .../github/technus/tectech/mechanics/structure/IStructureNavigate.java | 1 + .../github/technus/tectech/mechanics/structure/StructureDefinition.java | 1 + .../com/github/technus/tectech/mechanics/structure/StructureUtility.java | 1 + .../github/technus/tectech/mechanics/structure/adders/IBlockAdder.java | 1 + .../github/technus/tectech/mechanics/structure/adders/IHatchAdder.java | 1 + .../github/technus/tectech/mechanics/structure/adders/ITileAdder.java | 1 + 14 files changed, 14 insertions(+) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IBlockPosConsumer.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IBlockPosConsumer.java index c3ea2d3e3f..d37e29c36a 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/IBlockPosConsumer.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IBlockPosConsumer.java @@ -2,6 +2,7 @@ package com.github.technus.tectech.mechanics.structure; import net.minecraft.world.World; +@Deprecated public interface IBlockPosConsumer { void consume(World world, int x, int y, int z); } diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/ICustomBlockSetting.java b/src/main/java/com/github/technus/tectech/mechanics/structure/ICustomBlockSetting.java index b70e76fbac..10d9dcca73 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/ICustomBlockSetting.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/ICustomBlockSetting.java @@ -3,6 +3,7 @@ package com.github.technus.tectech.mechanics.structure; import net.minecraft.block.Block; import net.minecraft.world.World; +@Deprecated public interface ICustomBlockSetting { /** * Default block setting calls {@link World#setBlock(int x, int y, int z, Block block, int meta, int updateType)} like: diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureDefinition.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureDefinition.java index c8488d5cea..cb40214eac 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureDefinition.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureDefinition.java @@ -9,6 +9,7 @@ import java.util.Arrays; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; +@Deprecated public interface IStructureDefinition { /** * Used internally diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElement.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElement.java index f946e71f91..ac5f4f7296 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElement.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElement.java @@ -6,6 +6,7 @@ import net.minecraft.world.World; /** * Use StructureUtility to instantiate */ +@Deprecated public interface IStructureElement { boolean check(T t,World world,int x,int y,int z); diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementChain.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementChain.java index f9593ee1c5..2051e06c4d 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementChain.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementChain.java @@ -6,6 +6,7 @@ import net.minecraft.world.World; /** * Use StructureUtility to instantiate */ +@Deprecated public interface IStructureElementChain extends IStructureElement { IStructureElement[] fallbacks(); diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementCheckOnly.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementCheckOnly.java index ec15aea53b..a866da828d 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementCheckOnly.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementCheckOnly.java @@ -3,6 +3,7 @@ package com.github.technus.tectech.mechanics.structure; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +@Deprecated public interface IStructureElementCheckOnly extends IStructureElement { @Override default boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger){ diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementDeferred.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementDeferred.java index dbb74312a8..e1714e520c 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementDeferred.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementDeferred.java @@ -3,5 +3,6 @@ package com.github.technus.tectech.mechanics.structure; /** * Use StructureUtility to instantiate */ +@Deprecated public interface IStructureElementDeferred extends IStructureElement { } diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementNoPlacement.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementNoPlacement.java index 47e6060878..1ba5dc30f5 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementNoPlacement.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementNoPlacement.java @@ -3,6 +3,7 @@ package com.github.technus.tectech.mechanics.structure; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +@Deprecated public interface IStructureElementNoPlacement extends IStructureElement { @Override default boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger){ diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureNavigate.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureNavigate.java index d3f4134cea..5e73f25640 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureNavigate.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureNavigate.java @@ -6,6 +6,7 @@ import net.minecraft.world.World; /** * Use StructureUtility to instantiate */ +@Deprecated interface IStructureNavigate extends IStructureElement { @Override default boolean check(T t, World world, int x, int y, int z){ diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/StructureDefinition.java b/src/main/java/com/github/technus/tectech/mechanics/structure/StructureDefinition.java index 9a1e94d98a..ca1dbce77b 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/StructureDefinition.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/StructureDefinition.java @@ -7,6 +7,7 @@ import java.util.*; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static com.github.technus.tectech.mechanics.structure.StructureUtility.*; +@Deprecated public class StructureDefinition implements IStructureDefinition { private final Map> elements; private final Map shapes; diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/StructureUtility.java b/src/main/java/com/github/technus/tectech/mechanics/structure/StructureUtility.java index 28b72f8ba6..f469925dbc 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/StructureUtility.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/StructureUtility.java @@ -30,6 +30,7 @@ import static java.lang.Integer.MIN_VALUE; * * (Just import static this class to have a nice fluent syntax while defining structure definitions) */ +@Deprecated public class StructureUtility { private static final String NICE_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz=|!@#$%&()[]{};:<>/?_,.*^'`"; @SuppressWarnings("rawtypes") diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IBlockAdder.java b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IBlockAdder.java index 908c4c4aca..29229f7902 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IBlockAdder.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IBlockAdder.java @@ -3,6 +3,7 @@ package com.github.technus.tectech.mechanics.structure.adders; import net.minecraft.block.Block; +@Deprecated public interface IBlockAdder { /** * Callback on block added, needs to check if block is valid (and add it) diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IHatchAdder.java b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IHatchAdder.java index a47befc2e8..197dd2fd45 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IHatchAdder.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IHatchAdder.java @@ -3,6 +3,7 @@ package com.github.technus.tectech.mechanics.structure.adders; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +@Deprecated public interface IHatchAdder { /** * Callback to add hatch, needs to check if hatch is valid (and add it) diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/adders/ITileAdder.java b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/ITileAdder.java index cc3c7dbb7a..c262bbb154 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/adders/ITileAdder.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/ITileAdder.java @@ -2,6 +2,7 @@ package com.github.technus.tectech.mechanics.structure.adders; import net.minecraft.tileentity.TileEntity; +@Deprecated public interface ITileAdder { /** * Callback to add hatch, needs to check if tile is valid (and add it) -- cgit From b18e9791588f985e593c6f680e54d30f65faf9ae Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 5 Sep 2021 14:37:21 -0700 Subject: I think I did this right --- .../multi/GT_MetaTileEntity_EM_infuser.java | 60 ++++++++++++++++------ 1 file changed, 43 insertions(+), 17 deletions(-) (limited to 'src') 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 82fd2df5ed..5a5c778f69 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 @@ -3,17 +3,18 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import cofh.api.energy.IEnergyContainerItem; import com.github.technus.tectech.Reference; import com.github.technus.tectech.TecTech; -import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_Container_MultiMachineEM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_GUIContainer_MultiMachineEM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.IGT_HatchAdder; import ic2.api.item.ElectricItem; import ic2.api.item.IElectricItem; import net.minecraft.block.Block; @@ -27,7 +28,9 @@ import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static gregtech.api.GregTech_API.mEUtoRF; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -35,22 +38,38 @@ import static net.minecraft.util.StatCollector.translateToLocal; */ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { //region structure - private static final String[][] shape = new String[][]{ - {" ", "000", "1.1", "000", " ",}, - {" ", "010", "111", "010", " ",}, - {" ", "000", "111", "000", " ",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{7, 4}; - private static final IHatchAdder[] addingMethods = adders( - GT_MetaTileEntity_EM_infuser::addClassicToMachineList); - private static final short[] casingTextures = new short[]{textureOffset}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.infuser.hint"),//1 - Classic Hatches or High Power Casing }; + + private static final IStructureDefinition STRUCTURE_DEFINITION = + StructureDefinition.builder() + .addShape("main", new String[][]{ + {"CCC","CCC","CCC"}, + {"BBB","BAB","BBB"}, + {"A~A","AAA","AAA"}, + {"BBB","BAB","BBB"}, + {"CCC","CCC","CCC"} + }) + .addElement('A', ofBlock(sBlockCasingsTT, 4)) + .addElement('B', ofBlock(sBlockCasingsTT, 7)) + .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_infuser::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .build(); + +// private static final String[][] shape = new String[][]{ +// {" ", "000", "1.1", "000", " ",}, +// {" ", "010", "111", "010", " ",}, +// {" ", "000", "111", "000", " ",}, +// }; +// private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; +// private static final byte[] blockMeta = new byte[]{7, 4}; +// private static final IGT_HatchAdder[] addingMethods = adders( +// GT_MetaTileEntity_EM_infuser::addClassicToMachineList); +// private static final short[] casingTextures = new short[]{textureOffset}; +// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT}; +// private static final byte[] blockMetaFallback = new byte[]{0}; + //endregion public GT_MetaTileEntity_EM_infuser(int aID, String aName, String aNameRegional) { @@ -114,7 +133,8 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, 0); + //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, 0); + return structureCheck_EM("main", 1, 2, 0); } @Override @@ -185,7 +205,13 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 1, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + //Structure.builder(shape, blockType, blockMeta, 1, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 1, 2, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override -- cgit From a0b99f2686e4afbe4a03c60e58e6683a71453158 Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 5 Sep 2021 14:57:36 -0700 Subject: tweaked ofHatchAdderOptional calls --- .../thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 f36d2e7a63..c474c81b94 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 @@ -62,9 +62,9 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl .addElement('C', ofBlock(sBlockCasingsTT, 6)) .addElement('D', ofBlock(sBlockCasingsTT, 10)) .addElement('E', ofBlock(sBlockCasingsTT, 12)) - .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_annihilation::addElementalToMachineList, textureOffset + 4, sHintCasingsTT, 0, sBlockCasingsTT, 4)) + .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_annihilation::addElementalToMachineList, textureOffset + 4,2, sBlockCasingsTT, 4)) .addElement('G', ofBlock(QuantumGlassBlock.INSTANCE, 0)) - .addElement('H', ofHatchAdderOptional(GT_MetaTileEntity_EM_annihilation::addClassicToMachineList, textureOffset, sHintCasingsTT, 0, sBlockCasingsTT, 0)) + .addElement('H', ofHatchAdderOptional(GT_MetaTileEntity_EM_annihilation::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) .build(); /* -- cgit From c5afe1bc5bc345901a321915954eca7625109d12 Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 5 Sep 2021 15:58:22 -0700 Subject: I think I did this right --- .../multi/GT_MetaTileEntity_EM_wormhole.java | 86 +++++++++++++++------- 1 file changed, 60 insertions(+), 26 deletions(-) (limited to 'src') 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 fa51447e9f..92eec32628 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 @@ -1,18 +1,19 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; -import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; 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.util.IGT_HatchAdder; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; @@ -22,7 +23,9 @@ import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static gregtech.api.enums.GT_Values.E; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -35,32 +38,56 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB //endregion //region structure - private static final String[][] shape = new String[][]{ - {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,*/}, - {E, "D0", E, E, "A0E0", E, E, "D0"/*,E,*/}, - {"D0", "D0", E, E, "00E00", E, E, "D0", "D0",}, - {"B00000", "A0033300", "003C300", "03E30", "03E30", "03E30", "003C300", "A0033300", "B00000",}, - {"B0!!!0", "A 31113 ", "031222130", "!12C21!", "!12C21!", "!12C21!", "031222130", "A 31113 ", "B0!!!0",}, - {"B0!!!0", "A 31113 ", "031444130", "!14C41!", "!14C41!", "!14C41!", "031444130", "A 31113 ", "B0!!!0",}, - {"B0!!!0", "A 31113 ", "031222130", "!12C21!", "!12C21!", "!12C21!", "031222130", "A 31113 ", "B0!!!0",}, - {"B00000", "A0033300", "003C300", "03E30", "03E30", "03E30", "003C300", "A0033300", "B00000",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{12, 10, 0, 5, 11}; - private static final IHatchAdder[] addingMethods = adders( - GT_MetaTileEntity_EM_wormhole::addClassicToMachineList, - GT_MetaTileEntity_EM_wormhole::addElementalToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.wormhole.hint.0"),//1 - Classic Hatches or High Power Casing translateToLocal("gt.blockmachines.multimachine.em.wormhole.hint.1"),//2 - Elemental Hatches or Molecular Casing }; + + private static final IStructureDefinition STRUCTURE_DEFINITION = + StructureDefinition.builder() + .addShape("main", new String[][]{ + {" "," "," "," "," "," D "," DDDDD "," DGGGD "," DGGGD "," DGGGD "," DDDDD "}, + {" "," "," "," D "," D "," D "," DDAAADD "," EABBBAE "," EABBBAE "," EABBBAE "," DDAAADD "}, + {" "," D "," D "," D "," "," ","DDA ADD","DABFFFBAD","DABCCCBAD","DABFFFBAD","DDA ADD"}, + {" EEE "," DDD "," F F "," "," "," ","DA AD","GBF FBG","GBC CBG","GBF FBG","DA AD"}, + {" E~E "," DDBDD "," D D "," DD DD "," D D ","DD DD","DA AD","GBF FBG","GBC CBG","GBF FBG","DA AD"}, + {" EEE "," DDD "," F F "," "," "," ","DA AD","GBF FBG","GBC CBG","GBF FBG","DA AD"}, + {" "," D "," D "," D "," "," ","DDA ADD","DABFFFBAD","DABCCCBAD","DABFFFBAD","DDA ADD"}, + {" "," "," "," D "," D "," D "," DDAAADD "," EABBBAE "," EABBBAE "," EABBBAE "," DDAAADD "}, + {" "," "," "," "," "," D "," DDDDD "," DGGGD "," DGGGD "," DGGGD "," DDDDD "} + }) + .addElement('A', ofBlock(sBlockCasingsTT, 5)) + .addElement('B', ofBlock(sBlockCasingsTT, 10)) + .addElement('C', ofBlock(sBlockCasingsTT, 11)) + .addElement('D', ofBlock(sBlockCasingsTT, 12)) + .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_wormhole::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .addElement('F', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('G', ofHatchAdderOptional(GT_MetaTileEntity_EM_wormhole::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4)) + .build(); + +// private static final String[][] shape = new String[][]{ +// {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,*/}, +// {E, "D0", E, E, "A0E0", E, E, "D0"/*,E,*/}, +// {"D0", "D0", E, E, "00E00", E, E, "D0", "D0",}, +// {"B00000", "A0033300", "003C300", "03E30", "03E30", "03E30", "003C300", "A0033300", "B00000",}, +// {"B0!!!0", "A 31113 ", "031222130", "!12C21!", "!12C21!", "!12C21!", "031222130", "A 31113 ", "B0!!!0",}, +// {"B0!!!0", "A 31113 ", "031444130", "!14C41!", "!14C41!", "!14C41!", "031444130", "A 31113 ", "B0!!!0",}, +// {"B0!!!0", "A 31113 ", "031222130", "!12C21!", "!12C21!", "!12C21!", "031222130", "A 31113 ", "B0!!!0",}, +// {"B00000", "A0033300", "003C300", "03E30", "03E30", "03E30", "003C300", "A0033300", "B00000",}, +// }; +// private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT}; +// private static final byte[] blockMeta = new byte[]{12, 10, 0, 5, 11}; +// private static final IGT_HatchAdder[] addingMethods = adders( +// GT_MetaTileEntity_EM_wormhole::addClassicToMachineList, +// GT_MetaTileEntity_EM_wormhole::addElementalToMachineList); +// private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; +// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; +// private static final byte[] blockMetaFallback = new byte[]{0, 4}; + //endregion public GT_MetaTileEntity_EM_wormhole(int aID, String aName, String aNameRegional) { @@ -78,7 +105,8 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 4, 4, 0); + //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 4, 4, 0); + return structureCheck_EM("main", 4, 4, 0); } @Override @@ -108,7 +136,13 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 4, 4, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + //Structure.builder(shape, blockType, blockMeta, 4, 4, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 4, 4, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override -- cgit From 8fb80b146813df2d3928669d32c81c0d63862ca4 Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 5 Sep 2021 16:44:26 -0700 Subject: I think I did this right --- .../multi/GT_MetaTileEntity_EM_switch.java | 64 +++++++++++++++------- 1 file changed, 45 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java index 5ade4ec965..a71a5aaa59 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java @@ -1,10 +1,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.Reference; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.dataTransport.QuantumDataPacket; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; 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.multi.base.GT_MetaTileEntity_MultiblockBase_EM; @@ -13,13 +10,17 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunctio import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; -import com.github.technus.tectech.util.Vec3Impl; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import com.gtnewhorizon.structurelib.util.Vec3Impl; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; 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.util.IGT_HatchAdder; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; @@ -31,6 +32,8 @@ import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texture import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static com.github.technus.tectech.util.CommonValues.V; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -38,22 +41,35 @@ import static net.minecraft.util.StatCollector.translateToLocal; */ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { //region structure - private static final String[][] shape = new String[][]{ - {" ", " . ", " ",}, - {" ", " 0 ", " ",}, - {" ", " ", " ",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{3}; - private static final IHatchAdder[] addingMethods = adders( - GT_MetaTileEntity_EM_switch::addClassicToMachineList); - private static final short[] casingTextures = new short[]{textureOffset + 1}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{1}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", "1 - Classic/Data Hatches or Computer casing",//1 - Classic/Data Hatches or Computer casing }; + + private static final IStructureDefinition STRUCTURE_DEFINITION = + StructureDefinition.builder() + .addShape("main", new String[][]{ + {"BBB","BBB","BBB"}, + {"B~B","BAB","BBB"}, + {"BBB","BBB","BBB"} + }) + .addElement('A', ofBlock(sBlockCasingsTT, 3)) + .addElement('B', ofHatchAdderOptional(GT_MetaTileEntity_EM_switch::addClassicToMachineList, textureOffset + 1, 1, sBlockCasingsTT, 1)) + .build(); + +// private static final String[][] shape = new String[][]{ +// {" ", " . ", " ",}, +// {" ", " 0 ", " ",}, +// {" ", " ", " ",}, +// }; +// private static final Block[] blockType = new Block[]{sBlockCasingsTT}; +// private static final byte[] blockMeta = new byte[]{3}; +// private static final IGT_HatchAdder[] addingMethods = adders( +// GT_MetaTileEntity_EM_switch::addClassicToMachineList); +// private static final short[] casingTextures = new short[]{textureOffset + 1}; +// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT}; +// private static final byte[] blockMetaFallback = new byte[]{1}; + //endregion //region parameters @@ -99,7 +115,8 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); + //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); + return structureCheck_EM("main", 1, 1, 0); } @Override @@ -134,7 +151,10 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas } } - Vec3Impl pos = new Vec3Impl(getBaseMetaTileEntity()); + Vec3Impl pos = new Vec3Impl(getBaseMetaTileEntity().getXCoord(), + getBaseMetaTileEntity().getYCoord(), + getBaseMetaTileEntity().getZCoord()); + QuantumDataPacket pack = new QuantumDataPacket(0L).unifyTraceWith(pos); if (pack == null) { return; @@ -223,7 +243,13 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + //StructureUtility.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override -- cgit From 8f4236600aba013c620835f5e388d2dc93d580ce Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 6 Sep 2021 00:07:54 -0700 Subject: I think I did this right --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 119 +++++++++++++++------ 1 file changed, 86 insertions(+), 33 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java index c2f475888f..40bc786e8e 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java @@ -2,11 +2,8 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.loader.NetworkDispatcher; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.spark.RendererMessage; import com.github.technus.tectech.mechanics.spark.ThaumSpark; -import com.github.technus.tectech.mechanics.structure.Structure; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; import com.github.technus.tectech.mechanics.tesla.ITeslaConnectable; import com.github.technus.tectech.mechanics.tesla.ITeslaConnectableSimple; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Capacitor; @@ -19,10 +16,12 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunctio import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; -import com.github.technus.tectech.util.Vec3Impl; -import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; import com.google.common.collect.MultimapBuilder; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import com.gtnewhorizon.structurelib.util.Vec3Impl; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Materials; @@ -30,12 +29,15 @@ 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.BaseMetaTileEntity; import gregtech.api.metatileentity.implementations.*; +import gregtech.api.util.IGT_HatchAdder; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import java.util.ArrayList; @@ -43,11 +45,15 @@ import java.util.HashSet; import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.mechanics.tesla.ITeslaConnectable.TeslaUtil.*; +import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsBA0; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static com.github.technus.tectech.util.CommonValues.V; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; import static gregtech.api.enums.GT_Values.E; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static java.lang.Math.*; import static net.minecraft.util.StatCollector.translateToLocal; @@ -100,35 +106,71 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock //endregion //region structure - private static final String[][] shape = new String[][]{//3 16 0 - {"\u000F", "A . ",}, - {E, "B000", "B000", "B000", "\u0001", "B000", E, "B000", E, "B000", E, "B000", "\u0001", "B111", " 22222 ",}, - {"B000", "A00000", "A00000", "A00000", "B000", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", "\u0001", "A1C1", " 21112 ",}, - {"B000", "A00000", "A00000", "A00000", "B030", "C3", "A0!3!0", "C3", "A0!3!0", "C3", "A0!3!0", "C3", "A0!3!0", "C3", "C3", "A1A3A1", " 21212 ",}, - {"B000", "A00000", "A00000", "A00000", "B000", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", "\u0001", "A1C1", " 21112 ",}, - {E, "B000", "B000", "B000", "\u0001", "B000", E, "B000", E, "B000", E, "B000", "\u0001", "B111", " 22222 ",}, - {"\u000F", "A ",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsBA0, sBlockCasingsBA0, sBlockCasingsBA0, sBlockCasingsBA0}; - private static final byte[] blockMetaT0 = new byte[]{7, 0, 6, 8}; - private static final byte[] blockMetaT1 = new byte[]{7, 1, 6, 8}; - private static final byte[] blockMetaT2 = new byte[]{7, 2, 6, 8}; - private static final byte[] blockMetaT3 = new byte[]{7, 3, 6, 8}; - private static final byte[] blockMetaT4 = new byte[]{7, 4, 6, 8}; - private static final byte[] blockMetaT5 = new byte[]{7, 5, 6, 8}; - private static final byte[] blockMetaT6 = new byte[]{7, 9, 6, 8}; - private static final byte[][] blockMetas = new byte[][]{blockMetaT0, blockMetaT1, blockMetaT2, blockMetaT3, blockMetaT4, blockMetaT5, blockMetaT6}; - private static final IHatchAdder[] addingMethods = adders( - GT_MetaTileEntity_TM_teslaCoil::addCapacitorToMachineList, - GT_MetaTileEntity_TM_teslaCoil::addFrameToMachineList); - private static final short[] casingTextures = new short[]{(texturePage << 7) + 16 + 6, 0}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsBA0, null}; - private static final byte[] blockMetaFallback = new byte[]{6, 0}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.hint.0"),//1 - Classic Hatches, Capacitor Hatches or Tesla Base Casing translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.hint.1"),//2 - Titanium Frames }; + + private static final IStructureDefinition STRUCTURE_DEFINITION = + StructureDefinition.builder() + .addShape("main", new String[][]{ + {" "," "," BBB "," BBB "," BBB "," "," "}, + {" "," BBB "," BBBBB "," BBBBB "," BBBBB "," BBB "," "}, + {" "," BBB "," BBBBB "," BBBBB "," BBBBB "," BBB "," "}, + {" "," BBB "," BBBBB "," BBBBB "," BBBBB "," BBB "," "}, + {" "," "," BBB "," BCB "," BBB "," "," "}, + {" "," "," "," C "," "," "," "}, + {" "," BBB "," B F B "," BFCFB "," B F B "," BBB "," "}, + {" "," "," "," C "," "," "," "}, + {" "," BBB "," B F B "," BFCFB "," B F B "," BBB "," "}, + {" "," "," "," C "," "," "," "}, + {" "," BBB "," B F B "," BFCFB "," B F B "," BBB "," "}, + {" "," "," "," C "," "," "," "}, + {" "," BBB "," B F B "," BFCFB "," B F B "," BBB "," "}, + {" "," "," "," C "," "," "," "}, + {" "," "," "," C "," "," "," "}, + {" "," DDD "," D D "," D C D "," D D "," DDD "," "}, + {" EE~EE ","EAAAAAE","EADDDAE","EADADAE","EADDDAE"," AAAAAE"," EEEEE "} + }) + .addElement('A', ofBlock(sBlockCasingsBA0, 6)) + .addElement('B', ofBlock(sBlockCasingsBA0, 7)) + .addElement('C', ofBlock(sBlockCasingsBA0, 8)) + .addElement('D', lazy(t -> ofBlock(sBlockCasingsBA0, t.getCoilWindingMeta()))) + .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_TM_teslaCoil::addCapacitorToMachineList, textureOffset + 16 + 6, 1, sBlockCasingsBA0, 6)) + .addElement('F', ofHatchAdder(GT_MetaTileEntity_TM_teslaCoil::addFrameToMachineList, 0, 2)) + .build(); + + public int getCoilWindingMeta() { + Vec3Impl xyzOffsets = getExtendedFacing().getWorldOffset(new Vec3Impl(0, -1, 1)); + return this.getBaseMetaTileEntity().getMetaIDOffset(xyzOffsets.get0(), xyzOffsets.get1(), xyzOffsets.get2()); + } + +// private static final String[][] shape = new String[][]{//3 16 0 +// {"\u000F", "A . ",}, +// {E, "B000", "B000", "B000", "\u0001", "B000", E, "B000", E, "B000", E, "B000", "\u0001", "B111", " 22222 ",}, +// {"B000", "A00000", "A00000", "A00000", "B000", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", "\u0001", "A1C1", " 21112 ",}, +// {"B000", "A00000", "A00000", "A00000", "B030", "C3", "A0!3!0", "C3", "A0!3!0", "C3", "A0!3!0", "C3", "A0!3!0", "C3", "C3", "A1A3A1", " 21212 ",}, +// {"B000", "A00000", "A00000", "A00000", "B000", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", "\u0001", "A1C1", " 21112 ",}, +// {E, "B000", "B000", "B000", "\u0001", "B000", E, "B000", E, "B000", E, "B000", "\u0001", "B111", " 22222 ",}, +// {"\u000F", "A ",}, +// }; +// private static final Block[] blockType = new Block[]{sBlockCasingsBA0, sBlockCasingsBA0, sBlockCasingsBA0, sBlockCasingsBA0}; +// private static final byte[] blockMetaT0 = new byte[]{7, 0, 6, 8}; +// private static final byte[] blockMetaT1 = new byte[]{7, 1, 6, 8}; +// private static final byte[] blockMetaT2 = new byte[]{7, 2, 6, 8}; +// private static final byte[] blockMetaT3 = new byte[]{7, 3, 6, 8}; +// private static final byte[] blockMetaT4 = new byte[]{7, 4, 6, 8}; +// private static final byte[] blockMetaT5 = new byte[]{7, 5, 6, 8}; +// private static final byte[] blockMetaT6 = new byte[]{7, 9, 6, 8}; +// private static final byte[][] blockMetas = new byte[][]{blockMetaT0, blockMetaT1, blockMetaT2, blockMetaT3, blockMetaT4, blockMetaT5, blockMetaT6}; +// private static final IGT_HatchAdder[] addingMethods = adders( +// GT_MetaTileEntity_TM_teslaCoil::addCapacitorToMachineList, +// GT_MetaTileEntity_TM_teslaCoil::addFrameToMachineList); +// private static final short[] casingTextures = new short[]{(texturePage << 7) + 16 + 6, 0}; +// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsBA0, null}; +// private static final byte[] blockMetaFallback = new byte[]{6, 0}; + //endregion //region parameters @@ -348,7 +390,8 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock mTier = 6; }//Hacky remap because the ZPM coils were added later - if (structureCheck_EM(shape, blockType, blockMetas[mTier], addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 3, 16, 0) && eCapacitorHatches.size() > 0) { + //if (structureCheck_EM(shape, blockType, blockMetas[mTier], addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 3, 16, 0) && eCapacitorHatches.size() > 0) { + if (structureCheck_EM("main", 3, 16, 0)) { for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) { if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { cap.getBaseMetaTileEntity().setActive(iGregTechTileEntity.isActive()); @@ -360,11 +403,15 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock oldRotation = (byte) getExtendedFacing().ordinal(); oldOrientation = iGregTechTileEntity.getFrontFacing(); + Vec3Impl posBMTE = new Vec3Impl(getBaseMetaTileEntity().getXCoord(), + getBaseMetaTileEntity().getYCoord(), + getBaseMetaTileEntity().getZCoord()); + //Calculate coordinates of the middle bottom - posTop = getExtendedFacing().getWorldOffset(new Vec3Impl(0, 0, 2)).add(getBaseMetaTileEntity()); + posTop = getExtendedFacing().getWorldOffset(new Vec3Impl(0, 0, 2)).add(posBMTE); //Calculate coordinates of the top sphere - posTop = getExtendedFacing().getWorldOffset(new Vec3Impl(0, -14, 2)).add(getBaseMetaTileEntity()); + posTop = getExtendedFacing().getWorldOffset(new Vec3Impl(0, -14, 2)).add(posBMTE); } return true; } @@ -680,9 +727,15 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock return aTileEntity != null && aTileEntity.getMetaTileEntity() instanceof GT_MetaPipeEntity_Frame; } + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; + } + @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMetas[(stackSize.stackSize - 1) % 7], 3, 16, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + //Structure.builder(shape, blockType, blockMetas[(stackSize.stackSize - 1) % 7], 3, 16, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 3, 16, 0, hintsOnly, stackSize); } @Override -- cgit From ff5a24ee7d249f950db7160195aae8964423e5ef Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 7 Sep 2021 03:57:53 -0700 Subject: I think I did this right --- .../multi/GT_MetaTileEntity_EM_computer.java | 106 +++++++++++++++------ 1 file changed, 79 insertions(+), 27 deletions(-) (limited to 'src') 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 6a6a707399..c336d08fea 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 @@ -1,10 +1,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.TecTech; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.dataTransport.QuantumDataPacket; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; 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; @@ -12,7 +9,10 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.*; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; import com.github.technus.tectech.util.Util; -import com.github.technus.tectech.util.Vec3Impl; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import com.gtnewhorizon.structurelib.util.Vec3Impl; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; @@ -22,6 +22,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.util.IGT_HatchAdder; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; @@ -33,10 +34,13 @@ import java.util.ArrayList; import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; +import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsNH; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static com.github.technus.tectech.util.CommonValues.MULTI_CHECK_AT; import static com.github.technus.tectech.util.CommonValues.V; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -51,23 +55,58 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB //endregion //region structure - 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",},}; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{2, 1, 3}; - private static final IHatchAdder[] addingMethods = adders( - GT_MetaTileEntity_EM_computer::addToMachineList, - GT_MetaTileEntity_EM_computer::addRackToMachineList); - private static final short[] casingTextures = new short[]{textureOffset + 1, textureOffset + 3}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{1, 3}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.computer.hint.0"),//1 - Classic/Data Hatches or Computer casing translateToLocal("gt.blockmachines.multimachine.em.computer.hint.1"),//2 - Rack Hatches or Advanced computer casing }; + + private static final IStructureDefinition STRUCTURE_DEFINITION = + StructureDefinition.builder() + .addShape("front", new String[][]{ + {" AA"}, + {" AA"}, + {" ~A"}, + {" AA"} + }) + .addShape("cap", new String[][]{ + {"-CB"}, + {" DD"}, + {" DD"}, + {"-CB"} + }) + .addShape("slice", new String[][]{ + {"-CB"}, + {" ED"}, + {" ED"}, + {"-CB"} + }) + .addShape("back", new String[][]{ + {" AA"}, + {" AA"}, + {" AA"}, + {" AA"} + }) + .addElement('A', ofHatchAdderOptional(GT_MetaTileEntity_EM_computer::addToMachineList, textureOffset + 1, 1, sBlockCasingsTT, 1)) + .addElement('B', ofBlock(sBlockCasingsTT, 1)) + .addElement('C', ofBlock(sBlockCasingsTT, 2)) + .addElement('D', ofBlock(sBlockCasingsTT, 3)) + .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_computer::addRackToMachineList, textureOffset + 3, 2, sBlockCasingsTT, 3)) + .build(); + +// 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",},}; +// private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; +// private static final byte[] blockMeta = new byte[]{2, 1, 3}; +// private static final IGT_HatchAdder[] addingMethods = adders( +// GT_MetaTileEntity_EM_computer::addToMachineList, +// GT_MetaTileEntity_EM_computer::addRackToMachineList); +// private static final short[] casingTextures = new short[]{textureOffset + 1, textureOffset + 3}; +// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; +// private static final byte[] blockMetaFallback = new byte[]{1, 3}; + //endregion //region parameters @@ -129,15 +168,18 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB } } eRacks.clear(); - if (!structureCheck_EM(front, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, 0)) { + //if (!structureCheck_EM(front, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, 0)) { + if (!structureCheck_EM("front", 1, 2, 0)) { return false; } - if (!structureCheck_EM(cap, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, -1)) { + //if (!structureCheck_EM(cap, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, -1)) { + if (!structureCheck_EM("cap", 1, 2, -1)) { return false; } byte offset = -2, totalLen = 4; while (offset > -16) { - if (!structureCheck_EM(slice, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, offset)) { + //if (!structureCheck_EM(slice, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, offset)) { + if (!structureCheck_EM("slice", 1, 2, offset)) { break; } totalLen++; @@ -146,10 +188,12 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB if (totalLen > 17) { return false; } - if (!structureCheck_EM(cap, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, ++offset)) { + //if (!structureCheck_EM(cap, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, ++offset)) { + if (!structureCheck_EM("cap", 1, 2, ++offset)) { return false; } - if (!structureCheck_EM(terminator, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, --offset)) { + //if (!structureCheck_EM(terminator, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, --offset)) { + if (!structureCheck_EM("back", 1, 2, --offset)) { return false; } eCertainMode = (byte) Math.min(totalLen / 3, 5); @@ -246,7 +290,10 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB @Override public void outputAfterRecipe_EM() { if (!eOutputData.isEmpty()) { - Vec3Impl pos = new Vec3Impl(getBaseMetaTileEntity()); + Vec3Impl pos = new Vec3Impl(getBaseMetaTileEntity().getXCoord(), + getBaseMetaTileEntity().getYCoord(), + getBaseMetaTileEntity().getZCoord()); + QuantumDataPacket pack = new QuantumDataPacket(eAvailableData / eOutputData.size()).unifyTraceWith(pos); if (pack == null) { return; @@ -359,16 +406,21 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB @Override public void construct(ItemStack stackSize, boolean hintsOnly) { IGregTechTileEntity igt = getBaseMetaTileEntity(); - Structure.builder(front, blockType, blockMeta, 1, 2, 0, igt, getExtendedFacing(), hintsOnly); - Structure.builder(cap, blockType, blockMeta, 1, 2, -1, igt, getExtendedFacing(), hintsOnly); + //Structure.builder(front, blockType, blockMeta, 1, 2, 0, igt, getExtendedFacing(), hintsOnly); + structureBuild_EM("front", 1, 2, 0, hintsOnly, stackSize); + //Structure.builder(cap, blockType, blockMeta, 1, 2, -1, igt, getExtendedFacing(), hintsOnly); + structureBuild_EM("cap", 1, 2, -1, hintsOnly, stackSize); byte offset = -2; for (int rackSlices = Math.min(stackSize.stackSize, 12); rackSlices > 0; rackSlices--) { - Structure.builder(slice, blockType, blockMeta, 1, 2, offset--, igt, getExtendedFacing(), hintsOnly); + //Structure.builder(slice, blockType, blockMeta, 1, 2, offset--, igt, getExtendedFacing(), hintsOnly); + structureBuild_EM("slice", 1 , 2, offset--, hintsOnly, stackSize); } - Structure.builder(cap, blockType, blockMeta, 1, 2, offset--, igt, getExtendedFacing(), hintsOnly); - Structure.builder(terminator, blockType, blockMeta, 1, 2, offset, igt, getExtendedFacing(), hintsOnly); + //Structure.builder(cap, blockType, blockMeta, 1, 2, offset--, igt, getExtendedFacing(), hintsOnly); + structureBuild_EM("cap", 1, 2, offset--, hintsOnly, stackSize); + //Structure.builder(terminator, blockType, blockMeta, 1, 2, offset, igt, getExtendedFacing(), hintsOnly); + structureBuild_EM("back", 1, 2, offset, hintsOnly, stackSize); } @Override -- cgit From 98cace3dadb3bfdbc2c527b29dc809bea769453e Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 7 Sep 2021 04:04:36 -0700 Subject: forgot to override getStructureEM() --- .../thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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 c336d08fea..95a1be159a 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 @@ -423,6 +423,11 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB structureBuild_EM("back", 1, 2, offset, hintsOnly, stackSize); } + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; + } + @Override public String[] getStructureDescription(ItemStack stackSize) { return description; -- cgit From ce0ceebc6bab7d0e496b6c2d64b8282dc80f8b06 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 7 Sep 2021 04:10:41 -0700 Subject: I think I did this right --- .../multi/GT_MetaTileEntity_TM_microwave.java | 66 +++++++++++++++------- 1 file changed, 45 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java index 674ffe8c3e..5791a67c8a 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java @@ -1,19 +1,20 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.Reference; -import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.metaTileEntity.multi.base.*; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; -import com.github.technus.tectech.util.Vec3Impl; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import com.gtnewhorizon.structurelib.util.Vec3Impl; 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.util.GT_Recipe; import gregtech.api.util.GT_Utility; +import gregtech.api.util.IGT_HatchAdder; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -30,7 +31,9 @@ import static com.github.technus.tectech.loader.MainLoader.microwaving; import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static gregtech.api.GregTech_API.sBlockCasings4; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.AxisAlignedBB.getBoundingBox; import static net.minecraft.util.StatCollector.translateToLocal; @@ -44,26 +47,40 @@ public class GT_MetaTileEntity_TM_microwave 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[][]{ - {"00000", "00000", "00.00", "0 0",}, - {"0---0", "0---0", "0---0", " 000 ",}, - {"0---0", "0---0", "0---0", " 000 ",}, - {"0---0", "0---0", "0---0", " 000 ",}, - {"00000", "00000", "00000", "0 0",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasings4}; - private static final byte[] blockMeta = new byte[]{1}; - - private static final IHatchAdder[] addingMethods = adders( - GT_MetaTileEntity_TM_microwave::addClassicToMachineList); - private static final short[] casingTextures = new short[]{49}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasings4}; - private static final byte[] blockMetaFallback = new byte[]{1}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.tm.microwave.hint.0"),//1 - Classic Hatches or Clean Stainless Steel Casing translateToLocal("gt.blockmachines.multimachine.tm.microwave.hint.1"),//Also acts like a hopper so give it an Output Bus }; + + private static final IStructureDefinition STRUCTURE_DEFINITION = + StructureDefinition.builder() + .addShape("main", new String[][]{ + {"AAAAA","A---A","A---A","A---A","AAAAA"}, + {"AAAAA","A---A","A---A","A---A","AAAAA"}, + {"AA~AA","A---A","A---A","A---A","AAAAA"}, + {"ABBBA","BAAAB","BAAAB","BAAAB","ABBBA"} + }) + .addElement('A', ofBlock(sBlockCasings4, 1)) + .addElement('B', ofHatchAdderOptional(GT_MetaTileEntity_TM_microwave::addClassicToMachineList, 49, 1, sBlockCasings4, 1)) + .build(); + +// private static final String[][] shape = new String[][]{ +// {"00000", "00000", "00.00", "0 0",}, +// {"0---0", "0---0", "0---0", " 000 ",}, +// {"0---0", "0---0", "0---0", " 000 ",}, +// {"0---0", "0---0", "0---0", " 000 ",}, +// {"00000", "00000", "00000", "0 0",}, +// }; +// private static final Block[] blockType = new Block[]{sBlockCasings4}; +// private static final byte[] blockMeta = new byte[]{1}; +// +// private static final IGT_HatchAdder[] addingMethods = adders( +// GT_MetaTileEntity_TM_microwave::addClassicToMachineList); +// private static final short[] casingTextures = new short[]{49}; +// private static final Block[] blockTypeFallback = new Block[]{sBlockCasings4}; +// private static final byte[] blockMetaFallback = new byte[]{1}; + //endregion //region parameters @@ -101,7 +118,8 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); + //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); + return structureCheck_EM("main", 2, 2, 0); } @Override @@ -249,7 +267,13 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + //Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override -- cgit From 999e4b621a60587ec211451cdd64bce93c606dad Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 7 Sep 2021 11:05:51 -0700 Subject: I think I did this right --- .../em_machine/GT_MetaTileEntity_EM_machine.java | 65 +++++++++++++++------- 1 file changed, 46 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java index 6b26132292..b91a911def 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java @@ -7,9 +7,12 @@ import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.block.QuantumStuffBlock; +import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_computer; import com.github.technus.tectech.thing.metaTileEntity.multi.base.*; import com.github.technus.tectech.util.CommonValues; import com.github.technus.tectech.util.Util; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.block.Block; @@ -27,6 +30,8 @@ import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -41,26 +46,46 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa //endregion //region structure - private static final String[][] shape = new String[][]{ - {"B0", "A ", "0 - 0", "A ", "B0",}, - {"A000", "00000", "00.00", "00000", "A000",}, - {"A121", "1---1", "2---2", "1---1", "A121",}, - {"A131", "1---1", "3-A-3", "1---1", "A131",}, - {"A121", "1---1", "2---2", "1---1", "A121",}, - {"A000", "00000", "00-00", "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 IHatchAdder[] addingMethods = adders( - GT_MetaTileEntity_EM_machine::addClassicToMachineList, - GT_MetaTileEntity_EM_machine::addElementalToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.processing.hint.0"),//1 - Classic Hatches or High Power Casing - translateToLocal("gt.blockmachines.multimachine.em.processing.hint.1"),};//2 - Elemental Hatches or Molecular Casing + translateToLocal("gt.blockmachines.multimachine.em.processing.hint.1"),//2 - Elemental Hatches or Molecular Casing + }; + + private static final IStructureDefinition STRUCTURE_DEFINITION = + StructureDefinition.builder() + .addShape("main", new String[][]{ + {" A "," AAA "," EBE "," ECE "," EBE "," AAA "," A "}, + {" DDD ","AAAAA","E---E","E---E","E---E","AAAAA"," FFF "}, + {"AD-DA","AA~AA","B---B","C---C","B---B","AA-AA","AFFFA"}, + {" DDD ","AAAAA","E---E","E---E","E---E","AAAAA"," FFF "}, + {" A "," AAA "," EBE "," ECE "," EBE "," AAA "," A "} + }) + .addElement('A', ofBlock(sBlockCasingsTT, 4)) + .addElement('B', ofBlock(sBlockCasingsTT, 5)) + .addElement('C', ofBlock(sBlockCasingsTT, 6)) + .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_machine::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .addElement('E', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_machine::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4)) + .build(); + +// private static final String[][] shape = new String[][]{ +// {"B0", "A ", "0 - 0", "A ", "B0",}, +// {"A000", "00000", "00.00", "00000", "A000",}, +// {"A121", "1---1", "2---2", "1---1", "A121",}, +// {"A131", "1---1", "3-A-3", "1---1", "A131",}, +// {"A121", "1---1", "2---2", "1---1", "A121",}, +// {"A000", "00000", "00-00", "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 IHatchAdder[] addingMethods = adders( +// GT_MetaTileEntity_EM_machine::addClassicToMachineList, +// GT_MetaTileEntity_EM_machine::addElementalToMachineList); +// private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; +// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; +// private static final byte[] blockMetaFallback = new byte[]{0, 4}; + //endregion //region parameters @@ -190,7 +215,8 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 1); + //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 1); + return structureCheck_EM("main", 2, 2, 1); } @Override @@ -354,7 +380,8 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 2, 2, 1, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + //Structure.builder(shape, blockType, blockMeta, 2, 2, 1, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 2, 2, 1, hintsOnly, stackSize); } @Override -- cgit From ed2ded881105c55f26ac286311c3e31f8a405e4d Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 7 Sep 2021 11:15:42 -0700 Subject: forgot to override getStructure_EM() --- .../multi/em_machine/GT_MetaTileEntity_EM_machine.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java index b91a911def..01142c8ccb 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java @@ -384,6 +384,11 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa structureBuild_EM("main", 2, 2, 1, hintsOnly, stackSize); } + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; + } + @Override public String[] getStructureDescription(ItemStack stackSize) { return description; -- cgit From 61f7643451079e07e0d5a14fa52c337ce887e42e Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 7 Sep 2021 11:32:54 -0700 Subject: fixed getStructure_EM return type --- .../thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java | 2 +- .../thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java | 2 +- .../metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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 95a1be159a..429effb94b 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 @@ -424,7 +424,7 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB } @Override - public IStructureDefinition getStructure_EM() { + public IStructureDefinition getStructure_EM() { return STRUCTURE_DEFINITION; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java index 5791a67c8a..1c64effb38 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java @@ -272,7 +272,7 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock } @Override - public IStructureDefinition getStructure_EM() { + public IStructureDefinition getStructure_EM() { return STRUCTURE_DEFINITION; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java index 01142c8ccb..85ac8c1623 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java @@ -385,7 +385,7 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa } @Override - public IStructureDefinition getStructure_EM() { + public IStructureDefinition getStructure_EM() { return STRUCTURE_DEFINITION; } -- cgit From 32a6cb64fcb1d2323b02b3f46b28be7ee47123bd Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 7 Sep 2021 11:33:22 -0700 Subject: I think I did this right --- .../multi/GT_MetaTileEntity_EM_scanner.java | 89 +++++++++++++++------- 1 file changed, 61 insertions(+), 28 deletions(-) (limited to 'src') 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 b418ec0fa4..14209ca8f7 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 @@ -1,13 +1,10 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.TecTech; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalDefinitionStack; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack; import com.github.technus.tectech.mechanics.elementalMatter.core.tElementalException; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.recipe.TT_recipe; import com.github.technus.tectech.thing.CustomItemList; import com.github.technus.tectech.thing.block.QuantumGlassBlock; @@ -16,6 +13,9 @@ import com.github.technus.tectech.thing.item.ElementalDefinitionScanStorage_EM; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; import com.github.technus.tectech.thing.metaTileEntity.multi.base.*; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import gregtech.api.enums.ItemList; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -45,6 +45,9 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.em_machine.G import static com.github.technus.tectech.util.CommonValues.V; import static com.github.technus.tectech.util.CommonValues.VN; import static com.github.technus.tectech.util.Util.areBitsSet; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; import static net.minecraft.util.StatCollector.translateToLocalFormatted; @@ -69,26 +72,6 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa //endregion //region structure - private static final String[][] shape = new String[][]{ - {" ", " 222 ", " 2.2 ", " 222 ", " ",}, - {"00000", "00000", "00000", "00000", "00000",}, - {"00100", "01110", "11111", "01110", "00100",}, - {"01110", "1---1", "1---1", "1---1", "01110",}, - {"01110", "1---1", "1-A-1", "1---1", "01110",}, - {"01110", "1---1", "1---1", "1---1", "01110",}, - {"00100", "01110", "11\"11", "01110", "00100",}, - {"#####", "#000#", "#0!0#", "#000#", "#####",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{4, 0, 0}; - private static final IHatchAdder[] addingMethods = adders( - GT_MetaTileEntity_EM_scanner::addClassicToMachineList, - GT_MetaTileEntity_EM_scanner::addElementalInputToMachineList, - GT_MetaTileEntity_EM_scanner::addElementalOutputToMachineList, - GT_MetaTileEntity_EM_scanner::addElementalMufflerToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4, textureOffset + 4, textureOffset + 4}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 4, 4, 4}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.scanner.hint.0"),//1 - Classic Hatches or High Power Casing @@ -96,6 +79,46 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa translateToLocal("gt.blockmachines.multimachine.em.scanner.hint.2"),//3 - Elemental Output Hatches or Molecular Casing translateToLocal("gt.blockmachines.multimachine.em.scanner.hint.3"),//4 - Elemental Overflow Hatches or Molecular Casing }; + + private static final IStructureDefinition STRUCTURE_DEFINITION = + StructureDefinition.builder() + .addShape("main", new String[][]{ + {"CCCCC","BBBBB","BBDBB","BDDDB","BDDDB","BDDDB","BBDBB","EEEEE"}, + {"CAAAC","BBBBB","BDDDB","D---D","D---D","D---D","BDDDB","EBBBE"}, + {"CA~AC","BBBBB","DDDDD","D---D","D---D","D---D","DDGDD","EBFBE"}, + {"CAAAC","BBBBB","BDDDB","D---D","D---D","D---D","BDDDB","EBBBE"}, + {"CCCCC","BBBBB","BBDBB","BDDDB","BDDDB","BDDDB","BBDBB","EEEEE"} + }) + .addElement('A', ofBlock(sBlockCasingsTT, 0)) + .addElement('B', ofBlock(sBlockCasingsTT, 4)) + .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_scanner::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .addElement('D', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_scanner::addElementalMufflerToMachineList, textureOffset + 4, 4, sBlockCasingsTT, 4)) + .addElement('F', ofHatchAdder(GT_MetaTileEntity_EM_scanner::addElementalInputToMachineList, textureOffset + 4, 2)) + .addElement('G', ofHatchAdder(GT_MetaTileEntity_EM_scanner::addElementalOutputToMachineList, textureOffset + 4, 3)) + .build(); + +// private static final String[][] shape = new String[][]{ +// {" ", " 222 ", " 2.2 ", " 222 ", " ",}, +// {"00000", "00000", "00000", "00000", "00000",}, +// {"00100", "01110", "11111", "01110", "00100",}, +// {"01110", "1---1", "1---1", "1---1", "01110",}, +// {"01110", "1---1", "1-A-1", "1---1", "01110",}, +// {"01110", "1---1", "1---1", "1---1", "01110",}, +// {"00100", "01110", "11\"11", "01110", "00100",}, +// {"#####", "#000#", "#0!0#", "#000#", "#####",}, +// }; +// private static final Block[] blockType = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT}; +// private static final byte[] blockMeta = new byte[]{4, 0, 0}; +// private static final IHatchAdder[] addingMethods = adders( +// GT_MetaTileEntity_EM_scanner::addClassicToMachineList, +// GT_MetaTileEntity_EM_scanner::addElementalInputToMachineList, +// GT_MetaTileEntity_EM_scanner::addElementalOutputToMachineList, +// GT_MetaTileEntity_EM_scanner::addElementalMufflerToMachineList); +// private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4, textureOffset + 4, textureOffset + 4}; +// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; +// private static final byte[] blockMetaFallback = new byte[]{0, 4, 4, 4}; + //endregion //region parameters @@ -108,9 +131,12 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa return LedStatus.STATUS_WRONG; } v = (int) v; - if (v == 0) return LedStatus.STATUS_NEUTRAL; - if (v >= SCAN_GET_CLASS_TYPE) return LedStatus.STATUS_TOO_HIGH; - if (v < 0) return LedStatus.STATUS_TOO_LOW; + if (v == 0) + return LedStatus.STATUS_NEUTRAL; + if (v >= SCAN_GET_CLASS_TYPE) + return LedStatus.STATUS_TOO_HIGH; + if (v < 0) + return LedStatus.STATUS_TOO_LOW; return LedStatus.STATUS_OK; }; protected Parameters.Group.ParameterIn[] scanConfiguration; @@ -209,7 +235,8 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - if (!structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0)) { +// if (!structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0)) { + if (!structureCheck_EM("main", 2, 2, 0)) { return false; } return eInputHatches.size() == 1 && eOutputHatches.size() == 1 && eOutputHatches.get(0).getBaseMetaTileEntity().getFrontFacing() == iGregTechTileEntity.getFrontFacing(); @@ -516,7 +543,13 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + //Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override -- cgit From 115e7b212d95e3dbdf0fa2db8841f01a0e8f0075 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 7 Sep 2021 20:36:16 -0700 Subject: I think I did this right --- .../multi/GT_MetaTileEntity_EM_stabilizer.java | 71 ++++++++++++++++------ 1 file changed, 51 insertions(+), 20 deletions(-) (limited to 'src') 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 dcd85af99d..2b7c85ffc2 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 @@ -1,13 +1,15 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; -import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; +import com.github.technus.tectech.thing.metaTileEntity.multi.em_machine.GT_MetaTileEntity_EM_machine; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.IGT_HatchAdder; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; @@ -15,6 +17,8 @@ import net.minecraft.util.EnumChatFormatting; import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -22,26 +26,46 @@ import static net.minecraft.util.StatCollector.translateToLocal; */ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { //region structure - private static final String[][] shape = new String[][]{ - {"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",}, - {"A010", "0 0", "1 1", "0 0", "A010",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{4, 0, 5, 6, 9}; - private static final IHatchAdder[] addingMethods = adders( - GT_MetaTileEntity_EM_stabilizer::addClassicToMachineList, - GT_MetaTileEntity_EM_stabilizer::addElementalToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.stabilizer.hint.0"),//1 - Classic Hatches or High Power Casing translateToLocal("gt.blockmachines.multimachine.em.stabilizer.hint.1"),//2 - Elemental Hatches or Molecular Casing }; + + private static final IStructureDefinition STRUCTURE_DEFINITION = + StructureDefinition.builder() + .addShape("main", new String[][]{ + {" AFA ","BCBCB","FBGBF","BCBCB"," AFA "}, + {"AEEEA","CBBBC","BBDBB","CBBBC","AEEEA"}, + {"FE~EF","BBBBB","GDDDG","BBBBB","FEEEF"}, + {"AEEEA","CBBBC","BBDBB","CBBBC","AEEEA"}, + {" AFA ","BCBCB","FBGBF","BCBCB"," AFA "} + }) + .addElement('A', ofBlock(sBlockCasingsTT, 4)) + .addElement('B', ofBlock(sBlockCasingsTT, 5)) + .addElement('C', ofBlock(sBlockCasingsTT, 6)) + .addElement('D', ofBlock(sBlockCasingsTT, 9)) + .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_stabilizer::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .addElement('F', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('G', ofHatchAdderOptional(GT_MetaTileEntity_EM_stabilizer::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4)) + .build(); + +// private static final String[][] shape = new String[][]{ +// {"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",}, +// {"A010", "0 0", "1 1", "0 0", "A010",}, +// }; +// private static final Block[] blockType = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; +// private static final byte[] blockMeta = new byte[]{4, 0, 5, 6, 9}; +// private static final IGT_HatchAdder[] addingMethods = adders( +// GT_MetaTileEntity_EM_stabilizer::addClassicToMachineList, +// GT_MetaTileEntity_EM_stabilizer::addElementalToMachineList); +// private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; +// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; +// private static final byte[] blockMetaFallback = new byte[]{0, 4}; + //endregion public GT_MetaTileEntity_EM_stabilizer(int aID, String aName, String aNameRegional) { @@ -59,7 +83,8 @@ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_Multibloc @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); + //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); + return structureCheck_EM("main", 2, 2, 0); } @Override @@ -73,7 +98,13 @@ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_Multibloc @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + //Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override -- cgit From d1c3be02533247931937b97131f8e3626ad375f5 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 7 Sep 2021 20:37:43 -0700 Subject: I think I did this right --- .../multi/GT_MetaTileEntity_EM_dataBank.java | 62 +++++++++++++++------- 1 file changed, 44 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java index 582be290ac..1b8f95f5f5 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java @@ -1,10 +1,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.Reference; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.dataTransport.InventoryDataPacket; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputDataItems; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_OutputDataItems; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_Container_MultiMachineEM; @@ -12,6 +9,9 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_GUIContaine import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; @@ -20,6 +20,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess; +import gregtech.api.util.IGT_HatchAdder; import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; @@ -34,6 +35,9 @@ import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texture import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.util.CommonValues.V; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { @@ -43,24 +47,39 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB //endregion //region structure - private static final String[][] shape = new String[][]{ - {"0 0", "0 . 0", "0 0",}, - {"0!!!0", "01110", "0!!!0",}, - {"0!!!0", "0!!!0", "0!!!0",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{2, 1}; - private static final IHatchAdder[] addingMethods = adders( - GT_MetaTileEntity_EM_dataBank::addClassicToMachineList, - GT_MetaTileEntity_EM_dataBank::addDataBankHatchToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 1}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 1}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.databank.hint.0"),//1 - Classic Hatches or high power casing translateToLocal("gt.blockmachines.multimachine.em.databank.hint.1"),//2 - Data Access/Data Bank Master Hatches or computer casing }; + + private static final IStructureDefinition STRUCTURE_DEFINITION = + StructureDefinition.builder() + .addShape("main", new String[][]{ + {"BCCCB","BDDDB","BDDDB"}, + {"BC~CB","BAAAB","BDDDB"}, + {"BCCCB","BDDDB","BDDDB"} + }) + .addElement('A', ofBlock(sBlockCasingsTT, 1)) + .addElement('B', ofBlock(sBlockCasingsTT, 2)) + .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_dataBank::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_dataBank::addDataBankHatchToMachineList, textureOffset + 1, 2, sBlockCasingsTT, 1)) + .build(); + +// private static final String[][] shape = new String[][]{ +// {"0 0", "0 . 0", "0 0",}, +// {"0!!!0", "01110", "0!!!0",}, +// {"0!!!0", "0!!!0", "0!!!0",}, +// }; +// private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; +// private static final byte[] blockMeta = new byte[]{2, 1}; +// private static final IGT_HatchAdder[] addingMethods = adders( +// GT_MetaTileEntity_EM_dataBank::addClassicToMachineList, +// GT_MetaTileEntity_EM_dataBank::addDataBankHatchToMachineList); +// private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 1}; +// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; +// private static final byte[] blockMetaFallback = new byte[]{0, 1}; + //endregion public GT_MetaTileEntity_EM_dataBank(int aID, String aName, String aNameRegional) { @@ -80,7 +99,8 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { eDataAccessHatches.clear(); eStacksDataOutputs.clear(); - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 1, 0); + //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 1, 0); + return structureCheck_EM("main", 2, 1, 0); } @Override @@ -174,7 +194,13 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 2, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + //Structure.builder(shape, blockType, blockMeta, 2, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 2, 1, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override -- cgit From 234bdfb528d3d2719ef842cdb2b08cca5a5d6efc Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 7 Sep 2021 23:13:39 -0700 Subject: updated STRUCTURE_DEFINITION to use uncompressed description --- .../multi/GT_MetaTileEntity_EM_collider.java | 106 ++++++++++++--------- 1 file changed, 63 insertions(+), 43 deletions(-) (limited to 'src') 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 fe91be7bdc..773fbb5ec9 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 @@ -303,49 +303,6 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB //region structure //use multi A energy inputs, use less power the longer it runs - private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition - .builder() - .addShape("main", new String[][]{ - {"I0A0A0", "I00000", "I0A0A0",}, - {"H0000000", "G001111100", "H0000000",}, - {"F22223332222", "F41155555114", "F22223332222",}, - {"E2000000000002", "E4155111115514", "E2000000000002",}, - {"D20000E00002", "D41511E11514", "D20000E00002",}, - {"C2000I0002", "C4151I1514", "C2000I0002",}, - {"B2000K0002", "B4151K1514", "B2000K0002",}, - {"B200M002", "A0151M1510", "B200M002",}, - {"A0200M0020", "A0151M1510", "A0200M0020",}, - {"0020O0200", "0151O1510", "0020O0200",}, - {"A030O030", "0151O1510", "A030O030",}, - {"0030O0300", "0151O1510", "0030O0300",}, - {"A030O030", "0151O1510", "A030O030",}, - {"0020O0200", "0151O1510", "0020O0200",}, - {"A0200M0020", "A0151M1510", "A0200M0020",}, - {"B200M002", "A0151M1510", "B200M002",}, - {"B2000K0002", "B4151K1514", "B2000K0002",}, - {"C2000I0002", "C4151I1514", "C2000I0002",}, - {"D200002&&&200002", "D415112&.&211514", "D200002&&&200002",}, - {"E20!!22222!!02", "E4155111115514", "E20!!22222!!02",}, - {"F2222#$#2222", "F41155555114", "F2222#$#2222",}, - }) - .addElement('0', ofBlock(sBlockCasingsTT, 4)) - .addElement('1', ofBlock(sBlockCasingsTT, 7)) - .addElement('2', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), - error(), ofBlock(sBlockCasingsTT, 4), ofBlock(sBlockCasingsTT, 5))) - .addElement('3', ofBlock(QuantumGlassBlock.INSTANCE, 0)) - .addElement('4', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), - error(), ofBlock(sBlockCasingsTT, 4), ofBlock(sBlockCasingsTT, 6))) - .addElement('5', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), - error(), ofBlock(sBlockCasingsTT, 8), ofBlock(sBlockCasingsTT, 9))) - .addElement('&', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addClassicToMachineList, - textureOffset, 1, sBlockCasingsTT, 0)) - .addElement('!', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalInputToMachineList, - textureOffset + 4, 2, sBlockCasingsTT, 4)) - .addElement('$', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalOutputToMachineList, - textureOffset + 4, 3, sBlockCasingsTT, 4)) - .addElement('#', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalMufflerToMachineList, - textureOffset + 4, 4, sBlockCasingsTT, 4)) - .build(); private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.collider.hint.0"),//1 - Classic Hatches or High Power Casing @@ -355,6 +312,69 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB translateToLocal("gt.blockmachines.multimachine.em.collider.hint.4"),//General - Another Controller facing opposite direction }; + private static final IStructureDefinition STRUCTURE_DEFINITION = + StructureDefinition.builder() + .addShape("main", new String[][]{ + {" A A A "," AAAAAAA "," BBBBIIIBBBB "," BAAAAAAAAAAAB "," BAAAA AAAAB "," BAAA AAAB "," BAAA AAAB "," BAA AAB "," ABAA AABA ","AABA ABAA"," AIA AIA ","AAIA AIAA"," AIA AIA ","AABA ABAA"," ABAA AABA "," BAA AAB "," BAAA AAAB "," BAAA AAAB "," BAAAABJJJBAAAAB "," BAHHBBBBBHHAB "," BBBBGFGBBBB "}, + {" AAAAA "," AADDDDDAA "," CDDEEEEEDDC "," CDEEDDDDDEEDC "," CDEDD DDEDC "," CDED DEDC "," CDED DEDC "," ADED DEDA "," ADED DEDA ","ADED DEDA","ADED DEDA","ADED DEDA","ADED DEDA","ADED DEDA"," ADED DEDA "," ADED DEDA "," CDED DEDC "," CDED DEDC "," CDEDDBJ~JBDDEDC "," CDEEDDDDDEEDC "," CDDEEEEEDDC "}, + {" A A A "," AAAAAAA "," BBBBIIIBBBB "," BAAAAAAAAAAAB "," BAAAA AAAAB "," BAAA AAAB "," BAAA AAAB "," BAA AAB "," ABAA AABA ","AABA ABAA"," AIA AIA ","AAIA AIAA"," AIA AIA ","AABA ABAA"," ABAA AABA "," BAA AAB "," BAAA AAAB "," BAAA AAAB "," BAAAABJJJBAAAAB "," BAHHBBBBBHHAB "," BBBBGFGBBBB "} + }) + .addElement('A', ofBlock(sBlockCasingsTT, 4)) + .addElement('B', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), error(), ofBlock(sBlockCasingsTT, 4), ofBlock(sBlockCasingsTT, 5))) + .addElement('C', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), error(), ofBlock(sBlockCasingsTT, 4), ofBlock(sBlockCasingsTT, 6))) + .addElement('D', ofBlock(sBlockCasingsTT, 7)) + .addElement('E', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), error(), ofBlock(sBlockCasingsTT, 8), ofBlock(sBlockCasingsTT, 9))) + .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalOutputToMachineList, textureOffset + 4, 3, sBlockCasingsTT, 4)) + .addElement('G', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalMufflerToMachineList, textureOffset + 4, 4, sBlockCasingsTT, 4)) + .addElement('H', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalInputToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4)) + .addElement('I', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('J', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .build(); + +// private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition +// .builder() +// .addShape("main", new String[][]{ +// {"I0A0A0", "I00000", "I0A0A0",}, +// {"H0000000", "G001111100", "H0000000",}, +// {"F22223332222", "F41155555114", "F22223332222",}, +// {"E2000000000002", "E4155111115514", "E2000000000002",}, +// {"D20000E00002", "D41511E11514", "D20000E00002",}, +// {"C2000I0002", "C4151I1514", "C2000I0002",}, +// {"B2000K0002", "B4151K1514", "B2000K0002",}, +// {"B200M002", "A0151M1510", "B200M002",}, +// {"A0200M0020", "A0151M1510", "A0200M0020",}, +// {"0020O0200", "0151O1510", "0020O0200",}, +// {"A030O030", "0151O1510", "A030O030",}, +// {"0030O0300", "0151O1510", "0030O0300",}, +// {"A030O030", "0151O1510", "A030O030",}, +// {"0020O0200", "0151O1510", "0020O0200",}, +// {"A0200M0020", "A0151M1510", "A0200M0020",}, +// {"B200M002", "A0151M1510", "B200M002",}, +// {"B2000K0002", "B4151K1514", "B2000K0002",}, +// {"C2000I0002", "C4151I1514", "C2000I0002",}, +// {"D200002&&&200002", "D415112&.&211514", "D200002&&&200002",}, +// {"E20!!22222!!02", "E4155111115514", "E20!!22222!!02",}, +// {"F2222#$#2222", "F41155555114", "F2222#$#2222",}, +// }) +// .addElement('0', ofBlock(sBlockCasingsTT, 4)) +// .addElement('1', ofBlock(sBlockCasingsTT, 7)) +// .addElement('2', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), +// error(), ofBlock(sBlockCasingsTT, 4), ofBlock(sBlockCasingsTT, 5))) +// .addElement('3', ofBlock(QuantumGlassBlock.INSTANCE, 0)) +// .addElement('4', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), +// error(), ofBlock(sBlockCasingsTT, 4), ofBlock(sBlockCasingsTT, 6))) +// .addElement('5', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), +// error(), ofBlock(sBlockCasingsTT, 8), ofBlock(sBlockCasingsTT, 9))) +// .addElement('&', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addClassicToMachineList, +// textureOffset, 1, sBlockCasingsTT, 0)) +// .addElement('!', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalInputToMachineList, +// textureOffset + 4, 2, sBlockCasingsTT, 4)) +// .addElement('$', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalOutputToMachineList, +// textureOffset + 4, 3, sBlockCasingsTT, 4)) +// .addElement('#', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalMufflerToMachineList, +// textureOffset + 4, 4, sBlockCasingsTT, 4)) +// .build(); + @Override public IStructureDefinition getStructure_EM() { return STRUCTURE_DEFINITION; -- cgit From fc29bdc2ddae45dbbbe228820652efeca502fe0f Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 8 Sep 2021 06:28:38 -0700 Subject: moved to use StructureLib api --- .../multi/base/render/TT_RenderedExtendedFacingTexture.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedExtendedFacingTexture.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedExtendedFacingTexture.java index 44bfa4445d..5ed53634de 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedExtendedFacingTexture.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedExtendedFacingTexture.java @@ -1,8 +1,8 @@ package com.github.technus.tectech.thing.metaTileEntity.multi.base.render; -import com.github.technus.tectech.mechanics.alignment.IAlignmentProvider; -import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing; import com.github.technus.tectech.util.LightingHelper; +import com.gtnewhorizon.structurelib.alignment.IAlignmentProvider; +import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; import gregtech.api.enums.Dyes; import gregtech.api.interfaces.IColorModulationContainer; import gregtech.api.interfaces.IIconContainer; -- cgit From 5802a9d1943e58d79f70873ad90bc7a112bc46be Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 8 Sep 2021 13:25:02 -0700 Subject: updated STRUCTURE_DEFINITION to use uncompressed description --- .../multi/GT_MetaTileEntity_EM_bhg.java | 254 ++++++++++++++------- 1 file changed, 171 insertions(+), 83 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java index 6765abfa5c..4cc21ffc72 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java @@ -23,6 +23,7 @@ import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBloc import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_decay.URANIUM_INGOT_MASS_DIFF; import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_decay.URANIUM_MASS_TO_EU_INSTANT; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.enums.GT_Values.E; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; @@ -49,90 +50,172 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E //per dim disable thingies //region structure actual - private static final IStructureDefinition STRUCTURE_DEFINITION= StructureDefinition - .builder() - .addShape("t1",new String[][]{ - {"\u000B", "M0000000", "L00 00", "L0 0", "L0 !!! 0", "L0 !.! 0", "L0 !!! 0", "L0 0", "L00 00", "M0000000",}, - {"\u0008", "O0A0", "O0A0", "O0A0", "O0A0", "N11111", "M1101011", "I000010010010000", "M1111111", "I000010010010000", "M1101011", "N11111", "O0A0", "O0A0", "O0A0", "O0A0",}, - {"\u0006", "O0A0", "O0A0", "O0A0", "P1", "P1", "M1111111", "L11E11", "L1B222B1", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "L1B222B1", "L11E11", "M1111111", "P1", "P1", "O0A0", "O0A0", "O0A0",}, - {"\u0005", "O0A0", "O0A0", "P1", "P1", "\u0004", "F00Q00", "H11M11", "F00Q00", "\u0004", "P1", "P1", "O0A0", "O0A0",}, - {"\u0004", "O0A0", "N00000", "P1", "P4", "P4", "\u0003", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "\u0003", "P4", "P4", "P1", "N00000", "O0A0",}, - {"\u0003", "O0A0", "O0A0", "P1", "M2224222", "\u0004", "G2Q2", "G2Q2", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "G2Q2", "G2Q2", "\u0004", "M2224222", "P1", "O0A0", "O0A0",}, - {"\u0002", "O0A0", "N00000", "P1", "P4", "\u0006", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "\u0006", "P4", "P1", "N00000", "O0A0",}, - {"\u0001", "O0A0", "O0A0", "P1", "M2224222", "\u0006", "E2U2", "E2U2", "B00A2U2A00", "D14U41", "B00A2U2A00", "E2U2", "E2U2", "\u0006", "M2224222", "P1", "O0A0", "O0A0",}, - {"\u0001", "O0A0", "P1", "P4", "\u0009", "B0[0", "C14W41", "B0[0", "\u0009", "P4", "P1", "O0A0",}, - {E, "O0A0", "O0A0", "P1", "P4", "\u0009", "A00[00", "C14W41", "A00[00", "\u0009", "P4", "P1", "O0A0", "O0A0",}, - {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",}, - {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",}, - {"O0A0", "O0A0", "M1111111", "\u0009", "B1[1", "B1[1", "001[100", "B1[1", "001[100", "B1[1", "B1[1", "\u0009", "M1111111", "O0A0", "O0A0",}, - {"O0A0", "N11111", "L11E11", "\u0001", "G2Q2", E, "E2U2", "\u0003", "B1[1", "B1[1", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "B1[1", "B1[1", "\u0003", "E2U2", E, "G2Q2", "\u0001", "L11E11", "N11111", "O0A0",}, - {"O0A0", "M1101011", "L1B222B1", E, "F0S0", "G2Q2", "D0W0", "E2U2", "\u0003", "B1[1", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "B1[1", "\u0003", "E2U2", "D0W0", "G2Q2", "F0S0", E, "L1B222B1", "M1101011", "O0A0",}, - {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",}, - {"O0A0", "M1111111", "J111A23332A111", "H11M11", "F0144M4410", "F14Q41", "D014S410", "D14U41", "C14W41", "C14W41", "B1[1", "B1[1", "B1[1", "A1]1", "A12[21", "013[310", "A13[31", "013[310", "A12[21", "A1]1", "B1[1", "B1[1", "B1[1", "C14W41", "C14W41", "D14U41", "D014S410", "F14Q41", "F0144M4410", "H11M11", "J111A23332A111", "M1111111", "O0A0",}, - {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",}, - {"O0A0", "M1101011", "L1B222B1", E, "F0S0", "G2Q2", "D0W0", "E2U2", "\u0003", "B1[1", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "B1[1", "\u0003", "E2U2", "D0W0", "G2Q2", "F0S0", E, "L1B222B1", "M1101011", "O0A0",}, - {"O0A0", "N11111", "L11E11", "\u0001", "G2Q2", E, "E2U2", "\u0003", "B1[1", "B1[1", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "B1[1", "B1[1", "\u0003", "E2U2", E, "G2Q2", "\u0001", "L11E11", "N11111", "O0A0",}, - {"O0A0", "O0A0", "M1111111", "\u0009", "B1[1", "B1[1", "001[100", "B1[1", "001[100", "B1[1", "B1[1", "\u0009", "M1111111", "O0A0", "O0A0",}, - {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",}, - {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",}, - {E, "O0A0", "O0A0", "P1", "P4", "\u0009", "A00[00", "C14W41", "A00[00", "\u0009", "P4", "P1", "O0A0", "O0A0",}, - {"\u0001", "O0A0", "P1", "P4", "\u0009", "B0[0", "C14W41", "B0[0", "\u0009", "P4", "P1", "O0A0",}, - {"\u0001", "O0A0", "O0A0", "P1", "M2224222", "\u0006", "E2U2", "E2U2", "B00A2U2A00", "D14U41", "B00A2U2A00", "E2U2", "E2U2", "\u0006", "M2224222", "P1", "O0A0", "O0A0",}, - {"\u0002", "O0A0", "N00000", "P1", "P4", "\u0006", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "\u0006", "P4", "P1", "N00000", "O0A0",}, - {"\u0003", "O0A0", "O0A0", "P1", "M2224222", "\u0004", "G2Q2", "G2Q2", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "G2Q2", "G2Q2", "\u0004", "M2224222", "P1", "O0A0", "O0A0",}, - {"\u0004", "O0A0", "N00000", "P1", "P4", "P4", "\u0003", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "\u0003", "P4", "P4", "P1", "N00000", "O0A0",}, - {"\u0005", "O0A0", "O0A0", "P1", "P1", "\u0004", "F00Q00", "H11M11", "F00Q00", "\u0004", "P1", "P1", "O0A0", "O0A0",}, - {"\u0006", "O0A0", "O0A0", "O0A0", "P1", "P1", "M1111111", "L11E11", "L1B222B1", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "L1B222B1", "L11E11", "M1111111", "P1", "P1", "O0A0", "O0A0", "O0A0",}, - {"\u0008", "O0A0", "O0A0", "O0A0", "O0A0", "N11111", "M1101011", "I000010010010000", "M1111111", "I000010010010000", "M1101011", "N11111", "O0A0", "O0A0", "O0A0", "O0A0",}, - {"\u000B", "O0A0", "O0A0", "O0A0", "L000000000", "O0A0", "L000000000", "O0A0", "O0A0", "O0A0",}, - }) - .addShape("t2",new String[][]{ - {"\u000B", "M0000000", "L00 00", "L0 0", "L0 !!! 0", "L0 !.! 0", "L0 !!! 0", "L0 0", "L00 00", "M0000000",}, - {"\u0008", "O0A0", "M550A055", "L5550A0555", "K55550A05555", "J5555111115555", "J5551101011555", "I000010010010000", "M1111111", "I000010010010000", "J5551101011555", "J5555111115555", "K55550A05555", "L5550A0555", "M550A055", "O0A0",}, - {"\u0006", "O0A0", "M550A055", "K55550A05555", "J555C1C555", "I555D1D555", "I55B1111111B55", "H55B11E11B55", "H55B1B222B1B55", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "H55B1B222B1B55", "H55B11E11B55", "I55B1111111B55", "I555D1D555", "J555C1C555", "K55550A05555", "M550A055", "O0A0",}, - {"\u0005", "O0A0", "L5550A0555", "J555C1C555", "I55E1E55", "H55M55", "H5O5", "G55O55", "G5Q5", "G5Q5", "F00Q00", "H11M11", "F00Q00", "G5Q5", "G5Q5", "G55O55", "H5O5", "H55M55", "I55E1E55", "J555C1C555", "L5550A0555", "O0A0",}, - {"\u0004", "O0A0", "K55500000555", "I555D1D555", "H55F4F55", "G55G4G55", "G5Q5", "F55Q55", "F5S5", "F5S5", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "F5S5", "F5S5", "F55Q55", "G5Q5", "G55G4G55", "H55F4F55", "I555D1D555", "K55500000555", "O0A0",}, - {"\u0003", "O0A0", "J555550A055555", "H555E1E555", "G55D2224222D55", "F55Q55", "F5S5", "E55S55", "E5U5", "E5U5", "E5A2Q2A5", "E5A2Q2A5", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "E5A2Q2A5", "E5A2Q2A5", "E5U5", "E5U5", "E55S55", "F5S5", "F55Q55", "G55D2224222D55", "H555E1E555", "J555550A055555", "O0A0",}, - {"\u0002", "O0A0", "K55500000555", "H555E1E555", "G55G4G55", "F5S5", "E55S55", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "E55S55", "F5S5", "G55G4G55", "H555E1E555", "K55500000555", "O0A0",}, - {"\u0001", "O0A0", "L5550A0555", "I555D1D555", "G55D2224222D55", "F5S5", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "C5Y5", "C5A2U2A5", "C5A2U2A5", "B00A2U2A00", "D14U41", "B00A2U2A00", "C5A2U2A5", "C5A2U2A5", "C5Y5", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "F5S5", "G55D2224222D55", "I555D1D555", "L5550A0555", "O0A0",}, - {"\u0001", "M550A055", "J555C1C555", "H55F4F55", "F55Q55", "E55S55", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B0[0", "C14W41", "B0[0", "B5[5", "B5[5", "C5Y5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "E55S55", "F55Q55", "H55F4F55", "J555C1C555", "M550A055",}, - {E, "O0A0", "K55550A05555", "I55E1E55", "G55G4G55", "F5S5", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "B5[5", "A00[00", "C14W41", "A00[00", "B5[5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "F5S5", "G55G4G55", "I55E1E55", "K55550A05555", "O0A0",}, - {E, "M550A055", "J555C1C555", "H55M55", "G5Q5", "E55S55", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "E55S55", "G5Q5", "H55M55", "J555C1C555", "M550A055",}, - {E, "L5550A0555", "I555D1D555", "H5O5", "F55Q55", "E5U5", "D5W5", "D5W5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "D5W5", "D5W5", "E5U5", "F55Q55", "H5O5", "I555D1D555", "L5550A0555",}, - {"O0A0", "K55550A05555", "I55B1111111B55", "G55O55", "F5S5", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "001[100", "B1[1", "001[100", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "F5S5", "G55O55", "I55B1111111B55", "K55550A05555", "O0A0",}, - {"O0A0", "J5555111115555", "H55B11E11B55", "G5Q5", "F5S5", "E5A2Q2A5", "D5W5", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D5W5", "E5A2Q2A5", "F5S5", "G5Q5", "H55B11E11B55", "J5555111115555", "O0A0",}, - {"O0A0", "J5551101011555", "H55B1B222B1B55", "G5Q5", "F0S0", "E5A2Q2A5", "D0W0", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D0W0", "E5A2Q2A5", "F0S0", "G5Q5", "H55B1B222B1B55", "J5551101011555", "O0A0",}, - {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",}, - {"O0A0", "M1111111", "J111A23332A111", "H11M11", "F0144M4410", "F14Q41", "D014S410", "D14U41", "C14W41", "C14W41", "B1[1", "B1[1", "B1[1", "A1]1", "A12[21", "013[310", "A13[31", "013[310", "A12[21", "A1]1", "B1[1", "B1[1", "B1[1", "C14W41", "C14W41", "D14U41", "D014S410", "F14Q41", "F0144M4410", "H11M11", "J111A23332A111", "M1111111", "O0A0",}, - {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",}, - {"O0A0", "J5551101011555", "H55B1B222B1B55", "G5Q5", "F0S0", "E5A2Q2A5", "D0W0", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D0W0", "E5A2Q2A5", "F0S0", "G5Q5", "H55B1B222B1B55", "J5551101011555", "O0A0",}, - {"O0A0", "J5555111115555", "H55B11E11B55", "G5Q5", "F5S5", "E5A2Q2A5", "D5W5", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D5W5", "E5A2Q2A5", "F5S5", "G5Q5", "H55B11E11B55", "J5555111115555", "O0A0",}, - {"O0A0", "K55550A05555", "I55B1111111B55", "G55O55", "F5S5", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "001[100", "B1[1", "001[100", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "F5S5", "G55O55", "I55B1111111B55", "K55550A05555", "O0A0",}, - {E, "L5550A0555", "I555D1D555", "H5O5", "F55Q55", "E5U5", "D5W5", "D5W5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "D5W5", "D5W5", "E5U5", "F55Q55", "H5O5", "I555D1D555", "L5550A0555",}, - {E, "M550A055", "J555C1C555", "H55M55", "G5Q5", "E55S55", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "E55S55", "G5Q5", "H55M55", "J555C1C555", "M550A055",}, - {E, "O0A0", "K55550A05555", "I55E1E55", "G55G4G55", "F5S5", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "B5[5", "A00[00", "C14W41", "A00[00", "B5[5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "F5S5", "G55G4G55", "I55E1E55", "K55550A05555", "O0A0",}, - {"\u0001", "M550A055", "J555C1C555", "H55F4F55", "F55Q55", "E55S55", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B0[0", "C14W41", "B0[0", "B5[5", "B5[5", "C5Y5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "E55S55", "F55Q55", "H55F4F55", "J555C1C555", "M550A055",}, - {"\u0001", "O0A0", "L5550A0555", "I555D1D555", "G55D2224222D55", "F5S5", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "C5Y5", "C5A2U2A5", "C5A2U2A5", "B00A2U2A00", "D14U41", "B00A2U2A00", "C5A2U2A5", "C5A2U2A5", "C5Y5", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "F5S5", "G55D2224222D55", "I555D1D555", "L5550A0555", "O0A0",}, - {"\u0002", "O0A0", "K55500000555", "H555E1E555", "G55G4G55", "F5S5", "E55S55", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "E55S55", "F5S5", "G55G4G55", "H555E1E555", "K55500000555", "O0A0",}, - {"\u0003", "O0A0", "J555550A055555", "H555E1E555", "G55D2224222D55", "F55Q55", "F5S5", "E55S55", "E5U5", "E5U5", "E5A2Q2A5", "E5A2Q2A5", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "E5A2Q2A5", "E5A2Q2A5", "E5U5", "E5U5", "E55S55", "F5S5", "F55Q55", "G55D2224222D55", "H555E1E555", "J555550A055555", "O0A0",}, - {"\u0004", "O0A0", "K55500000555", "I555D1D555", "H55F4F55", "G55G4G55", "G5Q5", "F55Q55", "F5S5", "F5S5", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "F5S5", "F5S5", "F55Q55", "G5Q5", "G55G4G55", "H55F4F55", "I555D1D555", "K55500000555", "O0A0",}, - {"\u0005", "O0A0", "L5550A0555", "J555C1C555", "I55E1E55", "H55M55", "H5O5", "G55O55", "G5Q5", "G5Q5", "F00Q00", "H11M11", "F00Q00", "G5Q5", "G5Q5", "G55O55", "H5O5", "H55M55", "I55E1E55", "J555C1C555", "L5550A0555", "O0A0",}, - {"\u0006", "O0A0", "M550A055", "K55550A05555", "J555C1C555", "I555D1D555", "I55B1111111B55", "H55B11E11B55", "H55B1B222B1B55", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "H55B1B222B1B55", "H55B11E11B55", "I55B1111111B55", "I555D1D555", "J555C1C555", "K55550A05555", "M550A055", "O0A0",}, - {"\u0008", "O0A0", "M550A055", "L5550A0555", "K55550A05555", "J5555111115555", "J5551101011555", "I000010010010000", "M1111111", "I000010010010000", "J5551101011555", "J5555111115555", "K55550A05555", "L5550A0555", "M550A055", "O0A0",}, - {"\u000B", "O0A0", "O0A0", "O0A0", "L000000000", "O0A0", "L000000000", "O0A0", "O0A0", "O0A0",}, - }) - .addElement('0', ofBlock(sBlockCasingsTT,12)) - .addElement('1', ofBlock(sBlockCasingsTT,13)) - .addElement('2', ofBlock(sBlockCasingsTT,14)) - .addElement('3', ofBlock(sBlockCasingsTT,10)) - .addElement('4', ofBlock(sBlockCasingsTT,11)) - .addElement('5', ofBlock(QuantumGlassBlock.INSTANCE,0)) - .addElement(' ', ofHatchAdderOptional(GT_MetaTileEntity_EM_bhg::addClassicToMachineList, - textureOffset,1,sBlockCasingsTT,0)) - .addElement('!', ofHatchAdderOptional(GT_MetaTileEntity_EM_bhg::addElementalToMachineList, - textureOffset + 4,2,sBlockCasingsTT,4)) + private static final IStructureDefinition STRUCTURE_DEFINITION= + StructureDefinition.builder() + .addShape("main_t1", transpose(new String[][]{ + {" "," "," "," "," "," "," "," "," "," "," "," "," C C "," C C "," C C "," CCCCCCCCC "," C C "," CCCCCCCCC "," C C "," C C "," C C "," "," "," "," "," "," "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," "," "," "," C C "," C C "," C C "," C C "," DDDDD "," DDCDCDD "," CCCCDCCDCCDCCCC "," DDDDDDD "," CCCCDCCDCCDCCCC "," DDCDCDD "," DDDDD "," C C "," C C "," C C "," C C "," "," "," "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," "," C C "," C C "," C C "," D "," D "," DDDDDDD "," DD DD "," D EEE D "," CCC D EAAAE D CCC "," DDD EAAAE DDD "," CCC D EAAAE D CCC "," D EEE D "," DD DD "," DDDDDDD "," D "," D "," C C "," C C "," C C "," "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," C C "," C C "," D "," D "," "," "," "," "," "," CC CC "," DD DD "," CC CC "," "," "," "," "," "," D "," D "," C C "," C C "," "," "," "," "," "," "}, + {" "," "," "," "," "," C C "," CCCCC "," D "," B "," B "," "," "," "," "," C C "," CC CC "," CDBB BBDC "," CC CC "," C C "," "," "," "," "," B "," B "," D "," CCCCC "," C C "," "," "," "," "," "}, + {" "," "," "," "," C C "," C C "," D "," EEEBEEE "," "," "," "," "," "," E E "," E E "," CC E E CC "," DB BD "," CC E E CC "," E E "," E E "," "," "," "," "," "," EEEBEEE "," D "," C C "," C C "," "," "," "," "}, + {" "," "," "," C C "," CCCCC "," D "," B "," "," "," "," "," "," "," "," C C "," CC CC "," CDB BDC "," CC CC "," C C "," "," "," "," "," "," "," "," B "," D "," CCCCC "," C C "," "," "," "}, + {" "," "," C C "," C C "," D "," EEEBEEE "," "," "," "," "," "," "," "," E E "," E E "," CC E E CC "," DB BD "," CC E E CC "," E E "," E E "," "," "," "," "," "," "," "," EEEBEEE "," D "," C C "," C C "," "," "}, + {" "," "," C C "," D "," B "," "," "," "," "," "," "," "," "," "," "," C C "," DB BD "," C C "," "," "," "," "," "," "," "," "," "," "," B "," D "," C C "," "," "}, + {" "," C C "," C C "," D "," B "," "," "," "," "," "," "," "," "," "," "," CC CC "," DB BD "," CC CC "," "," "," "," "," "," "," "," "," "," "," B "," D "," C C "," C C "," "}, + {" "," C C "," D "," "," "," "," "," "," "," "," "," "," "," "," "," C C "," D D "," C C "," "," "," "," "," "," "," "," "," "," "," "," "," D "," C C "," "}, + {" "," C C "," D "," "," "," "," "," "," "," "," "," "," "," "," "," C C "," D D "," C C "," "," "," "," "," "," "," "," "," "," "," "," "," D "," C C "," "}, + {" CCCCCCC "," C C "," DDDDDDD "," "," "," "," "," "," "," "," "," "," "," D D "," D D ","CCD DCC"," D D ","CCD DCC"," D D "," D D "," "," "," "," "," "," "," "," "," "," "," DDDDDDD "," C C "," C C "}, + {" CCHHHHHCC "," DDDDD "," DD DD "," "," "," E E "," "," E E "," "," "," "," "," D D "," D D "," D D ","CD DC"," D D ","CD DC"," D D "," D D "," D D "," "," "," "," "," E E "," "," E E "," "," "," DD DD "," DDDDD "," C C "}, + {" CHHHHHHHC "," DDCDCDD "," D EEE D "," "," C C "," E E "," C C "," E E "," "," "," "," "," D D "," D D "," D D ","CCE ECC"," DE ED ","CCE ECC"," D D "," D D "," D D "," "," "," "," "," E E "," C C "," E E "," C C "," "," D EEE D "," DDCDCDD "," C C "}, + {" CHHFFFHHC "," CCCCDCCDCCDCCCC "," CCC D EAAAE D CCC "," CC CC "," CC CC "," CC E E CC "," CC CC "," CC E E CC "," C C "," CC CC "," C C "," C C ","CCD DCC","CD DC","CCE ECC","CCA ACC","CDA ADC","CCA ACC","CCE ECC","CD DC","CCD DCC"," C C "," C C "," CC CC "," C C "," CC E E CC "," CC CC "," CC E E CC "," CC CC "," CC CC "," CCC D EAAAE D CCC "," CCCCDCCDCCDCCCC "," CCCCCCCCC "}, + {" CHHF~FHHC "," DDDDDDD "," DDD EAAAE DDD "," DD DD "," CDBB BBDC "," DB BD "," CDB BDC "," DB BD "," DB BD "," DB BD "," D D "," D D "," D D "," D D "," DE ED ","CDA ADC"," DA AD ","CDA ADC"," DE ED "," D D "," D D "," D D "," D D "," DB BD "," DB BD "," DB BD "," CDB BDC "," DB BD "," CDBB BBDC "," DD DD "," DDD EAAAE DDD "," DDDDDDD "," C C "}, + {" CHHFFFHHC "," CCCCDCCDCCDCCCC "," CCC D EAAAE D CCC "," CC CC "," CC CC "," CC E E CC "," CC CC "," CC E E CC "," C C "," CC CC "," C C "," C C ","CCD DCC","CD DC","CCE ECC","CCA ACC","CDA ADC","CCA ACC","CCE ECC","CD DC","CCD DCC"," C C "," C C "," CC CC "," C C "," CC E E CC "," CC CC "," CC E E CC "," CC CC "," CC CC "," CCC D EAAAE D CCC "," CCCCDCCDCCDCCCC "," CCCCCCCCC "}, + {" CHHHHHHHC "," DDCDCDD "," D EEE D "," "," C C "," E E "," C C "," E E "," "," "," "," "," D D "," D D "," D D ","CCE ECC"," DE ED ","CCE ECC"," D D "," D D "," D D "," "," "," "," "," E E "," C C "," E E "," C C "," "," D EEE D "," DDCDCDD "," C C "}, + {" CCHHHHHCC "," DDDDD "," DD DD "," "," "," E E "," "," E E "," "," "," "," "," D D "," D D "," D D ","CD DC"," D D ","CD DC"," D D "," D D "," D D "," "," "," "," "," E E "," "," E E "," "," "," DD DD "," DDDDD "," C C "}, + {" CCCCCCC "," C C "," DDDDDDD "," "," "," "," "," "," "," "," "," "," "," D D "," D D ","CCD DCC"," D D ","CCD DCC"," D D "," D D "," "," "," "," "," "," "," "," "," "," "," DDDDDDD "," C C "," C C "}, + {" "," C C "," D "," "," "," "," "," "," "," "," "," "," "," "," "," C C "," D D "," C C "," "," "," "," "," "," "," "," "," "," "," "," "," D "," C C "," "}, + {" "," C C "," D "," "," "," "," "," "," "," "," "," "," "," "," "," C C "," D D "," C C "," "," "," "," "," "," "," "," "," "," "," "," "," D "," C C "," "}, + {" "," C C "," C C "," D "," B "," "," "," "," "," "," "," "," "," "," "," CC CC "," DB BD "," CC CC "," "," "," "," "," "," "," "," "," "," "," B "," D "," C C "," C C "," "}, + {" "," "," C C "," D "," B "," "," "," "," "," "," "," "," "," "," "," C C "," DB BD "," C C "," "," "," "," "," "," "," "," "," "," "," B "," D "," C C "," "," "}, + {" "," "," C C "," C C "," D "," EEEBEEE "," "," "," "," "," "," "," "," E E "," E E "," CC E E CC "," DB BD "," CC E E CC "," E E "," E E "," "," "," "," "," "," "," "," EEEBEEE "," D "," C C "," C C "," "," "}, + {" "," "," "," C C "," CCCCC "," D "," B "," "," "," "," "," "," "," "," C C "," CC CC "," CDB BDC "," CC CC "," C C "," "," "," "," "," "," "," "," B "," D "," CCCCC "," C C "," "," "," "}, + {" "," "," "," "," C C "," C C "," D "," EEEBEEE "," "," "," "," "," "," E E "," E E "," CC E E CC "," DB BD "," CC E E CC "," E E "," E E "," "," "," "," "," "," EEEBEEE "," D "," C C "," C C "," "," "," "," "}, + {" "," "," "," "," "," C C "," CCCCC "," D "," B "," B "," "," "," "," "," C C "," CC CC "," CDBB BBDC "," CC CC "," C C "," "," "," "," "," B "," B "," D "," CCCCC "," C C "," "," "," "," "," "}, + {" "," "," "," "," "," "," C C "," C C "," D "," D "," "," "," "," "," "," CC CC "," DD DD "," CC CC "," "," "," "," D "," D "," D "," D "," C C "," C C "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," "," C C "," C C "," C C "," D "," D "," DDDDDDD "," DD DD "," D EEE D "," CCC D EAAAE D CCC "," DDD EAAAE DDD "," CCC D EAAAE D CCC "," D EEE D "," DD DD "," DDDDDDD "," D "," D "," C C "," C C "," C C "," "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," "," "," "," C C "," C C "," C C "," C C "," DDDDD "," DDCDCDD "," CCCCDCCDCCDCCCC "," DDDDDDD "," CCCCDCCDCCDCCCC "," DDCDCDD "," DDDDD "," C C "," C C "," C C "," C C "," "," "," "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," "," "," "," "," "," "," C C "," C C "," C C "," CCCCCCCCC "," C C "," CCCCCCCCC "," C C "," C C "," C C "," "," "," "," "," "," "," "," "," "," "," "," "} + })) + .addShape("main_t2", transpose(new String[][]{ + {" "," "," "," "," "," "," "," "," "," "," "," "," C C "," C C "," C C "," CCCCCCCCC "," C C "," CCCCCCCCC "," C C "," C C "," C C "," "," "," "," "," "," "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," "," "," "," C C "," GGC CGG "," GGGC CGGG "," GGGGC CGGGG "," GGGGDDDDDGGGG "," GGGDDCDCDDGGG "," CCCCDCCDCCDCCCC "," DDDDDDD "," CCCCDCCDCCDCCCC "," GGGDDCDCDDGGG "," GGGGDDDDDGGGG "," GGGGC CGGGG "," GGGC CGGG "," GGC CGG "," C C "," "," "," "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," "," C C "," GGC CGG "," GGGGC CGGGG "," GGG D GGG "," GGG D GGG "," GG DDDDDDD GG "," GG DD DD GG "," GG D EEE D GG "," CCC D EAAAE D CCC "," DDD EAAAE DDD "," CCC D EAAAE D CCC "," GG D EEE D GG "," GG DD DD GG "," GG DDDDDDD GG "," GGG D GGG "," GGG D GGG "," GGGGC CGGGG "," GGC CGG "," C C "," "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," C C "," GGGC CGGG "," GGG D GGG "," GG D GG "," GG GG "," G G "," GG GG "," G G "," G G "," CC CC "," DD DD "," CC CC "," G G "," G G "," GG GG "," G G "," GG GG "," GG D GG "," GGG D GGG "," GGGC CGGG "," C C "," "," "," "," "," "," "}, + {" "," "," "," "," "," C C "," GGGCCCCCGGG "," GGG D GGG "," GG B GG "," GG B GG "," G G "," GG GG "," G G "," G G "," C C "," CC CC "," CDBB BBDC "," CC CC "," C C "," G G "," G G "," GG GG "," G G "," GG B GG "," GG B GG "," GGG D GGG "," GGGCCCCCGGG "," C C "," "," "," "," "," "}, + {" "," "," "," "," C C "," GGGGGC CGGGGG "," GGG D GGG "," GG EEEBEEE GG "," GG GG "," G G "," GG GG "," G G "," G G "," G E E G "," G E E G "," CC E E CC "," DB BD "," CC E E CC "," G E E G "," G E E G "," G G "," G G "," GG GG "," G G "," GG GG "," GG EEEBEEE GG "," GGG D GGG "," GGGGGC CGGGGG "," C C "," "," "," "," "}, + {" "," "," "," C C "," GGGCCCCCGGG "," GGG D GGG "," GG B GG "," G G "," GG GG "," G G "," G G "," G G "," G G "," G G "," C C "," CC CC "," CDB BDC "," CC CC "," C C "," G G "," G G "," G G "," G G "," G G "," GG GG "," G G "," GG B GG "," GGG D GGG "," GGGCCCCCGGG "," C C "," "," "," "}, + {" "," "," C C "," GGGC CGGG "," GGG D GGG "," GG EEEBEEE GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G E E G "," G E E G "," CC E E CC "," DB BD "," CC E E CC "," G E E G "," G E E G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG EEEBEEE GG "," GGG D GGG "," GGGC CGGG "," C C "," "," "}, + {" "," "," GGC CGG "," GGG D GGG "," GG B GG "," GG GG "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," C C "," DB BD "," C C "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," GG GG "," GG B GG "," GGG D GGG "," GGC CGG "," "," "}, + {" "," C C "," GGGGC CGGGG "," GG D GG "," GG B GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," CC CC "," DB BD "," CC CC "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG B GG "," GG D GG "," GGGGC CGGGG "," C C "," "}, + {" "," GGC CGG "," GGG D GGG "," GG GG "," G G "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," C C "," D D "," C C "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," G G "," GG GG "," GGG D GGG "," GGC CGG "," "}, + {" "," GGGC CGGG "," GGG D GGG "," G G "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," C C "," D D "," C C "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," G G "," GGG D GGG "," GGGC CGGG "," "}, + {" CCCCCCC "," GGGGC CGGGG "," GG DDDDDDD GG "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GD DG "," GD DG ","CCD DCC"," D D ","CCD DCC"," GD DG "," GD DG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," GG DDDDDDD GG "," GGGGC CGGGG "," C C "}, + {" CCHHHHHCC "," GGGGDDDDDGGGG "," GG DD DD GG "," G G "," G G "," G E E G "," G G "," G E E G "," G G "," G G "," G G "," G G "," GD DG "," GD DG "," D D ","CD DC"," D D ","CD DC"," D D "," GD DG "," GD DG "," G G "," G G "," G G "," G G "," G E E G "," G G "," G E E G "," G G "," G G "," GG DD DD GG "," GGGGDDDDDGGGG "," C C "}, + {" CHHHHHHHC "," GGGDDCDCDDGGG "," GG D EEE D GG "," G G "," C C "," G E E G "," C C "," G E E G "," G G "," G G "," G G "," G G "," GD DG "," D D "," D D ","CCE ECC"," DE ED ","CCE ECC"," D D "," D D "," GD DG "," G G "," G G "," G G "," G G "," G E E G "," C C "," G E E G "," C C "," G G "," GG D EEE D GG "," GGGDDCDCDDGGG "," C C "}, + {" CHHFFFHHC "," CCCCDCCDCCDCCCC "," CCC D EAAAE D CCC "," CC CC "," CC CC "," CC E E CC "," CC CC "," CC E E CC "," C C "," CC CC "," C C "," C C ","CCD DCC","CD DC","CCE ECC","CCA ACC","CDA ADC","CCA ACC","CCE ECC","CD DC","CCD DCC"," C C "," C C "," CC CC "," C C "," CC E E CC "," CC CC "," CC E E CC "," CC CC "," CC CC "," CCC D EAAAE D CCC "," CCCCDCCDCCDCCCC "," CCCCCCCCC "}, + {" CHHF~FHHC "," DDDDDDD "," DDD EAAAE DDD "," DD DD "," CDBB BBDC "," DB BD "," CDB BDC "," DB BD "," DB BD "," DB BD "," D D "," D D "," D D "," D D "," DE ED ","CDA ADC"," DA AD ","CDA ADC"," DE ED "," D D "," D D "," D D "," D D "," DB BD "," DB BD "," DB BD "," CDB BDC "," DB BD "," CDBB BBDC "," DD DD "," DDD EAAAE DDD "," DDDDDDD "," C C "}, + {" CHHFFFHHC "," CCCCDCCDCCDCCCC "," CCC D EAAAE D CCC "," CC CC "," CC CC "," CC E E CC "," CC CC "," CC E E CC "," C C "," CC CC "," C C "," C C ","CCD DCC","CD DC","CCE ECC","CCA ACC","CDA ADC","CCA ACC","CCE ECC","CD DC","CCD DCC"," C C "," C C "," CC CC "," C C "," CC E E CC "," CC CC "," CC E E CC "," CC CC "," CC CC "," CCC D EAAAE D CCC "," CCCCDCCDCCDCCCC "," CCCCCCCCC "}, + {" CHHHHHHHC "," GGGDDCDCDDGGG "," GG D EEE D GG "," G G "," C C "," G E E G "," C C "," G E E G "," G G "," G G "," G G "," G G "," GD DG "," D D "," D D ","CCE ECC"," DE ED ","CCE ECC"," D D "," D D "," GD DG "," G G "," G G "," G G "," G G "," G E E G "," C C "," G E E G "," C C "," G G "," GG D EEE D GG "," GGGDDCDCDDGGG "," C C "}, + {" CCHHHHHCC "," GGGGDDDDDGGGG "," GG DD DD GG "," G G "," G G "," G E E G "," G G "," G E E G "," G G "," G G "," G G "," G G "," GD DG "," GD DG "," D D ","CD DC"," D D ","CD DC"," D D "," GD DG "," GD DG "," G G "," G G "," G G "," G G "," G E E G "," G G "," G E E G "," G G "," G G "," GG DD DD GG "," GGGGDDDDDGGGG "," C C "}, + {" CCCCCCC "," GGGGC CGGGG "," GG DDDDDDD GG "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GD DG "," GD DG ","CCD DCC"," D D ","CCD DCC"," GD DG "," GD DG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," GG DDDDDDD GG "," GGGGC CGGGG "," C C "}, + {" "," GGGC CGGG "," GGG D GGG "," G G "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," C C "," D D "," C C "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," G G "," GGG D GGG "," GGGC CGGG "," "}, + {" "," GGC CGG "," GGG D GGG "," GG GG "," G G "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," C C "," D D "," C C "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," G G "," GG GG "," GGG D GGG "," GGC CGG "," "}, + {" "," C C "," GGGGC CGGGG "," GG D GG "," GG B GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," CC CC "," DB BD "," CC CC "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG B GG "," GG D GG "," GGGGC CGGGG "," C C "," "}, + {" "," "," GGC CGG "," GGG D GGG "," GG B GG "," GG GG "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," C C "," DB BD "," C C "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," GG GG "," GG B GG "," GGG D GGG "," GGC CGG "," "," "}, + {" "," "," C C "," GGGC CGGG "," GGG D GGG "," GG EEEBEEE GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G E E G "," G E E G "," CC E E CC "," DB BD "," CC E E CC "," G E E G "," G E E G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG EEEBEEE GG "," GGG D GGG "," GGGC CGGG "," C C "," "," "}, + {" "," "," "," C C "," GGGCCCCCGGG "," GGG D GGG "," GG B GG "," G G "," GG GG "," G G "," G G "," G G "," G G "," G G "," C C "," CC CC "," CDB BDC "," CC CC "," C C "," G G "," G G "," G G "," G G "," G G "," GG GG "," G G "," GG B GG "," GGG D GGG "," GGGCCCCCGGG "," C C "," "," "," "}, + {" "," "," "," "," C C "," GGGGGC CGGGGG "," GGG D GGG "," GG EEEBEEE GG "," GG GG "," G G "," GG GG "," G G "," G G "," G E E G "," G E E G "," CC E E CC "," DB BD "," CC E E CC "," G E E G "," G E E G "," G G "," G G "," GG GG "," G G "," GG GG "," GG EEEBEEE GG "," GGG D GGG "," GGGGGC CGGGGG "," C C "," "," "," "," "}, + {" "," "," "," "," "," C C "," GGGCCCCCGGG "," GGG D GGG "," GG B GG "," GG B GG "," G G "," GG GG "," G G "," G G "," C C "," CC CC "," CDBB BBDC "," CC CC "," C C "," G G "," G G "," GG GG "," G G "," GG B GG "," GG B GG "," GGG D GGG "," GGGCCCCCGGG "," C C "," "," "," "," "," "}, + {" "," "," "," "," "," "," C C "," GGGC CGGG "," GGG D GGG "," GG D GG "," GG GG "," G G "," GG GG "," G G "," G G "," CC CC "," DD DD "," CC CC "," G G "," G G "," GG GG "," G D G "," GG D GG "," GG D GG "," GGG D GGG "," GGGC CGGG "," C C "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," "," C C "," GGC CGG "," GGGGC CGGGG "," GGG D GGG "," GGG D GGG "," GG DDDDDDD GG "," GG DD DD GG "," GG D EEE D GG "," CCC D EAAAE D CCC "," DDD EAAAE DDD "," CCC D EAAAE D CCC "," GG D EEE D GG "," GG DD DD GG "," GG DDDDDDD GG "," GGG D GGG "," GGG D GGG "," GGGGC CGGGG "," GGC CGG "," C C "," "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," "," "," "," C C "," GGC CGG "," GGGC CGGG "," GGGGC CGGGG "," GGGGDDDDDGGGG "," GGGDDCDCDDGGG "," CCCCDCCDCCDCCCC "," DDDDDDD "," CCCCDCCDCCDCCCC "," GGGDDCDCDDGGG "," GGGGDDDDDGGGG "," GGGGC CGGGG "," GGGC CGGG "," GGC CGG "," C C "," "," "," "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," "," "," "," "," "," "," C C "," C C "," C C "," CCCCCCCCC "," C C "," CCCCCCCCC "," C C "," C C "," C C "," "," "," "," "," "," "," "," "," "," "," "," "} + })) + .addElement('A', ofBlock(sBlockCasingsTT, 10)) + .addElement('B', ofBlock(sBlockCasingsTT, 11)) + .addElement('C', ofBlock(sBlockCasingsTT, 12)) + .addElement('D', ofBlock(sBlockCasingsTT, 13)) + .addElement('E', ofBlock(sBlockCasingsTT, 14)) + .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_bhg::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4)) + .addElement('G', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('H', ofHatchAdderOptional(GT_MetaTileEntity_EM_bhg::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) .build(); +// private static final IStructureDefinition STRUCTURE_DEFINITION= StructureDefinition +// .builder() +// .addShape("t1",new String[][]{ +// {"\u000B", "M0000000", "L00 00", "L0 0", "L0 !!! 0", "L0 !.! 0", "L0 !!! 0", "L0 0", "L00 00", "M0000000",}, +// {"\u0008", "O0A0", "O0A0", "O0A0", "O0A0", "N11111", "M1101011", "I000010010010000", "M1111111", "I000010010010000", "M1101011", "N11111", "O0A0", "O0A0", "O0A0", "O0A0",}, +// {"\u0006", "O0A0", "O0A0", "O0A0", "P1", "P1", "M1111111", "L11E11", "L1B222B1", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "L1B222B1", "L11E11", "M1111111", "P1", "P1", "O0A0", "O0A0", "O0A0",}, +// {"\u0005", "O0A0", "O0A0", "P1", "P1", "\u0004", "F00Q00", "H11M11", "F00Q00", "\u0004", "P1", "P1", "O0A0", "O0A0",}, +// {"\u0004", "O0A0", "N00000", "P1", "P4", "P4", "\u0003", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "\u0003", "P4", "P4", "P1", "N00000", "O0A0",}, +// {"\u0003", "O0A0", "O0A0", "P1", "M2224222", "\u0004", "G2Q2", "G2Q2", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "G2Q2", "G2Q2", "\u0004", "M2224222", "P1", "O0A0", "O0A0",}, +// {"\u0002", "O0A0", "N00000", "P1", "P4", "\u0006", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "\u0006", "P4", "P1", "N00000", "O0A0",}, +// {"\u0001", "O0A0", "O0A0", "P1", "M2224222", "\u0006", "E2U2", "E2U2", "B00A2U2A00", "D14U41", "B00A2U2A00", "E2U2", "E2U2", "\u0006", "M2224222", "P1", "O0A0", "O0A0",}, +// {"\u0001", "O0A0", "P1", "P4", "\u0009", "B0[0", "C14W41", "B0[0", "\u0009", "P4", "P1", "O0A0",}, +// {E, "O0A0", "O0A0", "P1", "P4", "\u0009", "A00[00", "C14W41", "A00[00", "\u0009", "P4", "P1", "O0A0", "O0A0",}, +// {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",}, +// {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",}, +// {"O0A0", "O0A0", "M1111111", "\u0009", "B1[1", "B1[1", "001[100", "B1[1", "001[100", "B1[1", "B1[1", "\u0009", "M1111111", "O0A0", "O0A0",}, +// {"O0A0", "N11111", "L11E11", "\u0001", "G2Q2", E, "E2U2", "\u0003", "B1[1", "B1[1", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "B1[1", "B1[1", "\u0003", "E2U2", E, "G2Q2", "\u0001", "L11E11", "N11111", "O0A0",}, +// {"O0A0", "M1101011", "L1B222B1", E, "F0S0", "G2Q2", "D0W0", "E2U2", "\u0003", "B1[1", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "B1[1", "\u0003", "E2U2", "D0W0", "G2Q2", "F0S0", E, "L1B222B1", "M1101011", "O0A0",}, +// {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",}, +// {"O0A0", "M1111111", "J111A23332A111", "H11M11", "F0144M4410", "F14Q41", "D014S410", "D14U41", "C14W41", "C14W41", "B1[1", "B1[1", "B1[1", "A1]1", "A12[21", "013[310", "A13[31", "013[310", "A12[21", "A1]1", "B1[1", "B1[1", "B1[1", "C14W41", "C14W41", "D14U41", "D014S410", "F14Q41", "F0144M4410", "H11M11", "J111A23332A111", "M1111111", "O0A0",}, +// {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",}, +// {"O0A0", "M1101011", "L1B222B1", E, "F0S0", "G2Q2", "D0W0", "E2U2", "\u0003", "B1[1", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "B1[1", "\u0003", "E2U2", "D0W0", "G2Q2", "F0S0", E, "L1B222B1", "M1101011", "O0A0",}, +// {"O0A0", "N11111", "L11E11", "\u0001", "G2Q2", E, "E2U2", "\u0003", "B1[1", "B1[1", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "B1[1", "B1[1", "\u0003", "E2U2", E, "G2Q2", "\u0001", "L11E11", "N11111", "O0A0",}, +// {"O0A0", "O0A0", "M1111111", "\u0009", "B1[1", "B1[1", "001[100", "B1[1", "001[100", "B1[1", "B1[1", "\u0009", "M1111111", "O0A0", "O0A0",}, +// {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",}, +// {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",}, +// {E, "O0A0", "O0A0", "P1", "P4", "\u0009", "A00[00", "C14W41", "A00[00", "\u0009", "P4", "P1", "O0A0", "O0A0",}, +// {"\u0001", "O0A0", "P1", "P4", "\u0009", "B0[0", "C14W41", "B0[0", "\u0009", "P4", "P1", "O0A0",}, +// {"\u0001", "O0A0", "O0A0", "P1", "M2224222", "\u0006", "E2U2", "E2U2", "B00A2U2A00", "D14U41", "B00A2U2A00", "E2U2", "E2U2", "\u0006", "M2224222", "P1", "O0A0", "O0A0",}, +// {"\u0002", "O0A0", "N00000", "P1", "P4", "\u0006", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "\u0006", "P4", "P1", "N00000", "O0A0",}, +// {"\u0003", "O0A0", "O0A0", "P1", "M2224222", "\u0004", "G2Q2", "G2Q2", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "G2Q2", "G2Q2", "\u0004", "M2224222", "P1", "O0A0", "O0A0",}, +// {"\u0004", "O0A0", "N00000", "P1", "P4", "P4", "\u0003", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "\u0003", "P4", "P4", "P1", "N00000", "O0A0",}, +// {"\u0005", "O0A0", "O0A0", "P1", "P1", "\u0004", "F00Q00", "H11M11", "F00Q00", "\u0004", "P1", "P1", "O0A0", "O0A0",}, +// {"\u0006", "O0A0", "O0A0", "O0A0", "P1", "P1", "M1111111", "L11E11", "L1B222B1", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "L1B222B1", "L11E11", "M1111111", "P1", "P1", "O0A0", "O0A0", "O0A0",}, +// {"\u0008", "O0A0", "O0A0", "O0A0", "O0A0", "N11111", "M1101011", "I000010010010000", "M1111111", "I000010010010000", "M1101011", "N11111", "O0A0", "O0A0", "O0A0", "O0A0",}, +// {"\u000B", "O0A0", "O0A0", "O0A0", "L000000000", "O0A0", "L000000000", "O0A0", "O0A0", "O0A0",}, +// }) +// .addShape("t2",new String[][]{ +// {"\u000B", "M0000000", "L00 00", "L0 0", "L0 !!! 0", "L0 !.! 0", "L0 !!! 0", "L0 0", "L00 00", "M0000000",}, +// {"\u0008", "O0A0", "M550A055", "L5550A0555", "K55550A05555", "J5555111115555", "J5551101011555", "I000010010010000", "M1111111", "I000010010010000", "J5551101011555", "J5555111115555", "K55550A05555", "L5550A0555", "M550A055", "O0A0",}, +// {"\u0006", "O0A0", "M550A055", "K55550A05555", "J555C1C555", "I555D1D555", "I55B1111111B55", "H55B11E11B55", "H55B1B222B1B55", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "H55B1B222B1B55", "H55B11E11B55", "I55B1111111B55", "I555D1D555", "J555C1C555", "K55550A05555", "M550A055", "O0A0",}, +// {"\u0005", "O0A0", "L5550A0555", "J555C1C555", "I55E1E55", "H55M55", "H5O5", "G55O55", "G5Q5", "G5Q5", "F00Q00", "H11M11", "F00Q00", "G5Q5", "G5Q5", "G55O55", "H5O5", "H55M55", "I55E1E55", "J555C1C555", "L5550A0555", "O0A0",}, +// {"\u0004", "O0A0", "K55500000555", "I555D1D555", "H55F4F55", "G55G4G55", "G5Q5", "F55Q55", "F5S5", "F5S5", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "F5S5", "F5S5", "F55Q55", "G5Q5", "G55G4G55", "H55F4F55", "I555D1D555", "K55500000555", "O0A0",}, +// {"\u0003", "O0A0", "J555550A055555", "H555E1E555", "G55D2224222D55", "F55Q55", "F5S5", "E55S55", "E5U5", "E5U5", "E5A2Q2A5", "E5A2Q2A5", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "E5A2Q2A5", "E5A2Q2A5", "E5U5", "E5U5", "E55S55", "F5S5", "F55Q55", "G55D2224222D55", "H555E1E555", "J555550A055555", "O0A0",}, +// {"\u0002", "O0A0", "K55500000555", "H555E1E555", "G55G4G55", "F5S5", "E55S55", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "E55S55", "F5S5", "G55G4G55", "H555E1E555", "K55500000555", "O0A0",}, +// {"\u0001", "O0A0", "L5550A0555", "I555D1D555", "G55D2224222D55", "F5S5", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "C5Y5", "C5A2U2A5", "C5A2U2A5", "B00A2U2A00", "D14U41", "B00A2U2A00", "C5A2U2A5", "C5A2U2A5", "C5Y5", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "F5S5", "G55D2224222D55", "I555D1D555", "L5550A0555", "O0A0",}, +// {"\u0001", "M550A055", "J555C1C555", "H55F4F55", "F55Q55", "E55S55", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B0[0", "C14W41", "B0[0", "B5[5", "B5[5", "C5Y5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "E55S55", "F55Q55", "H55F4F55", "J555C1C555", "M550A055",}, +// {E, "O0A0", "K55550A05555", "I55E1E55", "G55G4G55", "F5S5", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "B5[5", "A00[00", "C14W41", "A00[00", "B5[5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "F5S5", "G55G4G55", "I55E1E55", "K55550A05555", "O0A0",}, +// {E, "M550A055", "J555C1C555", "H55M55", "G5Q5", "E55S55", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "E55S55", "G5Q5", "H55M55", "J555C1C555", "M550A055",}, +// {E, "L5550A0555", "I555D1D555", "H5O5", "F55Q55", "E5U5", "D5W5", "D5W5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "D5W5", "D5W5", "E5U5", "F55Q55", "H5O5", "I555D1D555", "L5550A0555",}, +// {"O0A0", "K55550A05555", "I55B1111111B55", "G55O55", "F5S5", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "001[100", "B1[1", "001[100", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "F5S5", "G55O55", "I55B1111111B55", "K55550A05555", "O0A0",}, +// {"O0A0", "J5555111115555", "H55B11E11B55", "G5Q5", "F5S5", "E5A2Q2A5", "D5W5", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D5W5", "E5A2Q2A5", "F5S5", "G5Q5", "H55B11E11B55", "J5555111115555", "O0A0",}, +// {"O0A0", "J5551101011555", "H55B1B222B1B55", "G5Q5", "F0S0", "E5A2Q2A5", "D0W0", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D0W0", "E5A2Q2A5", "F0S0", "G5Q5", "H55B1B222B1B55", "J5551101011555", "O0A0",}, +// {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",}, +// {"O0A0", "M1111111", "J111A23332A111", "H11M11", "F0144M4410", "F14Q41", "D014S410", "D14U41", "C14W41", "C14W41", "B1[1", "B1[1", "B1[1", "A1]1", "A12[21", "013[310", "A13[31", "013[310", "A12[21", "A1]1", "B1[1", "B1[1", "B1[1", "C14W41", "C14W41", "D14U41", "D014S410", "F14Q41", "F0144M4410", "H11M11", "J111A23332A111", "M1111111", "O0A0",}, +// {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",}, +// {"O0A0", "J5551101011555", "H55B1B222B1B55", "G5Q5", "F0S0", "E5A2Q2A5", "D0W0", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D0W0", "E5A2Q2A5", "F0S0", "G5Q5", "H55B1B222B1B55", "J5551101011555", "O0A0",}, +// {"O0A0", "J5555111115555", "H55B11E11B55", "G5Q5", "F5S5", "E5A2Q2A5", "D5W5", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D5W5", "E5A2Q2A5", "F5S5", "G5Q5", "H55B11E11B55", "J5555111115555", "O0A0",}, +// {"O0A0", "K55550A05555", "I55B1111111B55", "G55O55", "F5S5", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "001[100", "B1[1", "001[100", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "F5S5", "G55O55", "I55B1111111B55", "K55550A05555", "O0A0",}, +// {E, "L5550A0555", "I555D1D555", "H5O5", "F55Q55", "E5U5", "D5W5", "D5W5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "D5W5", "D5W5", "E5U5", "F55Q55", "H5O5", "I555D1D555", "L5550A0555",}, +// {E, "M550A055", "J555C1C555", "H55M55", "G5Q5", "E55S55", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "E55S55", "G5Q5", "H55M55", "J555C1C555", "M550A055",}, +// {E, "O0A0", "K55550A05555", "I55E1E55", "G55G4G55", "F5S5", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "B5[5", "A00[00", "C14W41", "A00[00", "B5[5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "F5S5", "G55G4G55", "I55E1E55", "K55550A05555", "O0A0",}, +// {"\u0001", "M550A055", "J555C1C555", "H55F4F55", "F55Q55", "E55S55", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B0[0", "C14W41", "B0[0", "B5[5", "B5[5", "C5Y5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "E55S55", "F55Q55", "H55F4F55", "J555C1C555", "M550A055",}, +// {"\u0001", "O0A0", "L5550A0555", "I555D1D555", "G55D2224222D55", "F5S5", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "C5Y5", "C5A2U2A5", "C5A2U2A5", "B00A2U2A00", "D14U41", "B00A2U2A00", "C5A2U2A5", "C5A2U2A5", "C5Y5", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "F5S5", "G55D2224222D55", "I555D1D555", "L5550A0555", "O0A0",}, +// {"\u0002", "O0A0", "K55500000555", "H555E1E555", "G55G4G55", "F5S5", "E55S55", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "E55S55", "F5S5", "G55G4G55", "H555E1E555", "K55500000555", "O0A0",}, +// {"\u0003", "O0A0", "J555550A055555", "H555E1E555", "G55D2224222D55", "F55Q55", "F5S5", "E55S55", "E5U5", "E5U5", "E5A2Q2A5", "E5A2Q2A5", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "E5A2Q2A5", "E5A2Q2A5", "E5U5", "E5U5", "E55S55", "F5S5", "F55Q55", "G55D2224222D55", "H555E1E555", "J555550A055555", "O0A0",}, +// {"\u0004", "O0A0", "K55500000555", "I555D1D555", "H55F4F55", "G55G4G55", "G5Q5", "F55Q55", "F5S5", "F5S5", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "F5S5", "F5S5", "F55Q55", "G5Q5", "G55G4G55", "H55F4F55", "I555D1D555", "K55500000555", "O0A0",}, +// {"\u0005", "O0A0", "L5550A0555", "J555C1C555", "I55E1E55", "H55M55", "H5O5", "G55O55", "G5Q5", "G5Q5", "F00Q00", "H11M11", "F00Q00", "G5Q5", "G5Q5", "G55O55", "H5O5", "H55M55", "I55E1E55", "J555C1C555", "L5550A0555", "O0A0",}, +// {"\u0006", "O0A0", "M550A055", "K55550A05555", "J555C1C555", "I555D1D555", "I55B1111111B55", "H55B11E11B55", "H55B1B222B1B55", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "H55B1B222B1B55", "H55B11E11B55", "I55B1111111B55", "I555D1D555", "J555C1C555", "K55550A05555", "M550A055", "O0A0",}, +// {"\u0008", "O0A0", "M550A055", "L5550A0555", "K55550A05555", "J5555111115555", "J5551101011555", "I000010010010000", "M1111111", "I000010010010000", "J5551101011555", "J5555111115555", "K55550A05555", "L5550A0555", "M550A055", "O0A0",}, +// {"\u000B", "O0A0", "O0A0", "O0A0", "L000000000", "O0A0", "L000000000", "O0A0", "O0A0", "O0A0",}, +// }) +// .addElement('0', ofBlock(sBlockCasingsTT,12)) +// .addElement('1', ofBlock(sBlockCasingsTT,13)) +// .addElement('2', ofBlock(sBlockCasingsTT,14)) +// .addElement('3', ofBlock(sBlockCasingsTT,10)) +// .addElement('4', ofBlock(sBlockCasingsTT,11)) +// .addElement('5', ofBlock(QuantumGlassBlock.INSTANCE,0)) +// .addElement(' ', ofHatchAdderOptional(GT_MetaTileEntity_EM_bhg::addClassicToMachineList, +// textureOffset,1,sBlockCasingsTT,0)) +// .addElement('!', ofHatchAdderOptional(GT_MetaTileEntity_EM_bhg::addElementalToMachineList, +// textureOffset + 4,2,sBlockCasingsTT,4)) +// .build(); + @Override public IStructureDefinition getStructure_EM() { return STRUCTURE_DEFINITION; @@ -308,7 +391,12 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - structureBuild_EM((stackSize.stackSize&1)==1?"t1":"t2", 16, 16, 0, hintsOnly,stackSize); + try { + structureBuild_EM((stackSize.stackSize & 1) == 1 ? "main_t1" : "main_t2", 16, 16, 0, hintsOnly, stackSize); + } + catch (Exception e) { + e.printStackTrace(); + } } @Override -- cgit From 63c1c84e5b8f4d43712db484e8d7558342fd8d44 Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 9 Sep 2021 02:23:29 -0700 Subject: Gleese told me how to fix this bug --- .../multi/base/GT_MetaTileEntity_MultiblockBase_EM.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java index 86de270ba4..75e9d016c2 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java @@ -5,15 +5,18 @@ import com.github.technus.tectech.TecTech; import com.github.technus.tectech.loader.NetworkDispatcher; import com.github.technus.tectech.mechanics.structure.Structure; +import com.gtnewhorizon.structurelib.StructureLibAPI; import com.gtnewhorizon.structurelib.alignment.AlignmentMessage; import com.gtnewhorizon.structurelib.alignment.IAlignment; import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; +import com.gtnewhorizon.structurelib.alignment.IAlignmentProvider; import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; import com.gtnewhorizon.structurelib.alignment.enumerable.Flip; import com.gtnewhorizon.structurelib.alignment.enumerable.Rotation; import com.gtnewhorizon.structurelib.structure.StructureUtility; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.util.Vec3Impl; +import cpw.mods.fml.common.network.NetworkRegistry; import gregtech.api.util.GT_StructureUtility; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; @@ -180,9 +183,12 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt IGregTechTileEntity base = getBaseMetaTileEntity(); mMachine = false; if (getBaseMetaTileEntity().isServerSide()) { - NetworkDispatcher.INSTANCE.sendToAllAround(new AlignmentMessage.AlignmentData(this), - base.getWorld().provider.dimensionId, - base.getXCoord(), base.getYCoord(), base.getZCoord(), 512); + //NetworkDispatcher.INSTANCE.sendToAllAround(new AlignmentMessage.AlignmentData(this), + // base.getWorld().provider.dimensionId, + // base.getXCoord(), base.getYCoord(), base.getZCoord(), 512); + StructureLibAPI.sendAlignment((IAlignmentProvider) base, + new NetworkRegistry.TargetPoint(base.getWorld().provider.dimensionId, + base.getXCoord(), base.getYCoord(), base.getZCoord(), 512)); }else{ base.issueTextureUpdate(); } -- cgit From 88f564f102b2d54f6699c79ab9c0ac38e8147b8f Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 9 Sep 2021 04:34:32 -0700 Subject: some minor fixes --- .../thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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 773fbb5ec9..10619522d6 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 @@ -314,11 +314,11 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape("main", new String[][]{ + .addShape("main", transpose(new String[][]{ {" A A A "," AAAAAAA "," BBBBIIIBBBB "," BAAAAAAAAAAAB "," BAAAA AAAAB "," BAAA AAAB "," BAAA AAAB "," BAA AAB "," ABAA AABA ","AABA ABAA"," AIA AIA ","AAIA AIAA"," AIA AIA ","AABA ABAA"," ABAA AABA "," BAA AAB "," BAAA AAAB "," BAAA AAAB "," BAAAABJJJBAAAAB "," BAHHBBBBBHHAB "," BBBBGFGBBBB "}, {" AAAAA "," AADDDDDAA "," CDDEEEEEDDC "," CDEEDDDDDEEDC "," CDEDD DDEDC "," CDED DEDC "," CDED DEDC "," ADED DEDA "," ADED DEDA ","ADED DEDA","ADED DEDA","ADED DEDA","ADED DEDA","ADED DEDA"," ADED DEDA "," ADED DEDA "," CDED DEDC "," CDED DEDC "," CDEDDBJ~JBDDEDC "," CDEEDDDDDEEDC "," CDDEEEEEDDC "}, {" A A A "," AAAAAAA "," BBBBIIIBBBB "," BAAAAAAAAAAAB "," BAAAA AAAAB "," BAAA AAAB "," BAAA AAAB "," BAA AAB "," ABAA AABA ","AABA ABAA"," AIA AIA ","AAIA AIAA"," AIA AIA ","AABA ABAA"," ABAA AABA "," BAA AAB "," BAAA AAAB "," BAAA AAAB "," BAAAABJJJBAAAAB "," BAHHBBBBBHHAB "," BBBBGFGBBBB "} - }) + })) .addElement('A', ofBlock(sBlockCasingsTT, 4)) .addElement('B', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), error(), ofBlock(sBlockCasingsTT, 4), ofBlock(sBlockCasingsTT, 5))) .addElement('C', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), error(), ofBlock(sBlockCasingsTT, 4), ofBlock(sBlockCasingsTT, 6))) @@ -376,7 +376,7 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB // .build(); @Override - public IStructureDefinition getStructure_EM() { + public IStructureDefinition getStructure_EM() { return STRUCTURE_DEFINITION; } -- cgit From b6dabec16a277ed1ac812c89451e10b7fed128c1 Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 9 Sep 2021 04:58:16 -0700 Subject: now uses StructureLib API --- .../GT_MetaTileEntity_DebugStructureWriter.java | 34 +++++++++++++++++----- 1 file changed, 26 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java index 3b194c516b..01d5e2321e 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java @@ -1,12 +1,12 @@ package com.github.technus.tectech.thing.metaTileEntity.single; import com.github.technus.tectech.TecTech; -import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing; -import com.github.technus.tectech.mechanics.structure.StructureUtility; import com.github.technus.tectech.thing.metaTileEntity.single.gui.GT_Container_DebugStructureWriter; import com.github.technus.tectech.thing.metaTileEntity.single.gui.GT_GUIContainer_DebugStructureWriter; import com.github.technus.tectech.util.CommonValues; import com.github.technus.tectech.util.Util; +import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; +import com.gtnewhorizon.structurelib.structure.StructureUtility; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; @@ -20,9 +20,13 @@ 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.tileentity.TileEntity; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.common.util.ForgeDirection; +import java.util.Comparator; +import java.util.function.Function; + import static com.github.technus.tectech.thing.metaTileEntity.Textures.MACHINE_CASINGS_TT; import static net.minecraft.util.StatCollector.translateToLocal; @@ -115,11 +119,18 @@ public class GT_MetaTileEntity_DebugStructureWriter extends GT_MetaTileEntity_Ti @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isAllowedToWork()) { - String pseudoJavaCode = StructureUtility.getPseudoJavaCode(aBaseMetaTileEntity.getWorld(), - ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())), +// String pseudoJavaCode = StructureUtility.getPseudoJavaCode(aBaseMetaTileEntity.getWorld(), +// ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())), +// aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(), +// numbers[0], numbers[1], numbers[2], +// numbers[3], numbers[4], numbers[5],false); + String pseudoJavaCode = StructureUtility.getPseudoJavaCode( + aBaseMetaTileEntity.getWorld(), ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())), aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(), numbers[0], numbers[1], numbers[2], - numbers[3], numbers[4], numbers[5],false); + te -> te.getClass().getCanonicalName(), + numbers[3], numbers[4], numbers[5], + false); TecTech.LOGGER.info(pseudoJavaCode); result = pseudoJavaCode.split("\\n"); aBaseMetaTileEntity.disableWorking(); @@ -129,11 +140,18 @@ public class GT_MetaTileEntity_DebugStructureWriter extends GT_MetaTileEntity_Ti @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { IGregTechTileEntity aBaseMetaTileEntity = getBaseMetaTileEntity(); - String pseudoJavaCode = StructureUtility.getPseudoJavaCode(aBaseMetaTileEntity.getWorld(), - ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())), +// String pseudoJavaCode = StructureUtility.getPseudoJavaCode(aBaseMetaTileEntity.getWorld(), +// ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())), +// aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(), +// numbers[0], numbers[1], numbers[2], +// numbers[3], numbers[4], numbers[5],true); + String pseudoJavaCode = StructureUtility.getPseudoJavaCode( + aBaseMetaTileEntity.getWorld(), ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())), aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(), numbers[0], numbers[1], numbers[2], - numbers[3], numbers[4], numbers[5],true); + te -> te.getClass().getCanonicalName(), + numbers[3], numbers[4], numbers[5], + false); TecTech.LOGGER.info(pseudoJavaCode); result = pseudoJavaCode.split("\\n"); aBaseMetaTileEntity.disableWorking(); -- cgit From f841902897850cf35787173219543fd54b300c59 Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 9 Sep 2021 05:13:59 -0700 Subject: marked as deprecated --- src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java | 1 + .../java/com/github/technus/tectech/entity/fx/WeightlessParticleFX.java | 1 + .../com/github/technus/tectech/mechanics/alignment/AlignmentLimits.java | 1 + .../com/github/technus/tectech/mechanics/alignment/AlignmentMessage.java | 1 + .../com/github/technus/tectech/mechanics/alignment/AlignmentUtility.java | 1 + .../java/com/github/technus/tectech/mechanics/alignment/IAlignment.java | 1 + .../com/github/technus/tectech/mechanics/alignment/IAlignmentLimits.java | 1 + .../github/technus/tectech/mechanics/alignment/IAlignmentProvider.java | 1 + .../com/github/technus/tectech/mechanics/alignment/IntegerAxisSwap.java | 1 + .../github/technus/tectech/mechanics/alignment/enumerable/Direction.java | 1 + .../technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java | 1 + .../com/github/technus/tectech/mechanics/alignment/enumerable/Flip.java | 1 + .../github/technus/tectech/mechanics/alignment/enumerable/Rotation.java | 1 + .../technus/tectech/mechanics/constructable/ConstructableUtility.java | 1 + .../github/technus/tectech/mechanics/constructable/IConstructable.java | 1 + .../tectech/mechanics/constructable/IMultiblockInfoContainer.java | 1 + .../com/github/technus/tectech/thing/item/ConstructableTriggerItem.java | 1 + .../com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java | 1 + 18 files changed, 18 insertions(+) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java b/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java index dd5cd59ac7..3c7f18ff32 100644 --- a/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java +++ b/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java @@ -13,6 +13,7 @@ import net.minecraft.world.World; import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) +@Deprecated public class BlockHint extends EntityFX { private IIcon[] icons = new IIcon[6]; private short[] mRGBa = Dyes._NULL.mRGBa; diff --git a/src/main/java/com/github/technus/tectech/entity/fx/WeightlessParticleFX.java b/src/main/java/com/github/technus/tectech/entity/fx/WeightlessParticleFX.java index d1d2ed611c..92fa34990e 100644 --- a/src/main/java/com/github/technus/tectech/entity/fx/WeightlessParticleFX.java +++ b/src/main/java/com/github/technus/tectech/entity/fx/WeightlessParticleFX.java @@ -6,6 +6,7 @@ import net.minecraft.client.particle.EntityFX; import net.minecraft.world.World; @SideOnly(Side.CLIENT) +@Deprecated public class WeightlessParticleFX extends EntityFX { public WeightlessParticleFX(World p_i1205_1_, double p_i1205_2_, double p_i1205_4_, double p_i1205_6_, double p_i1205_8_, double p_i1205_10_, double p_i1205_12_) diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentLimits.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentLimits.java index 26a6d80dd8..779406371a 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentLimits.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentLimits.java @@ -12,6 +12,7 @@ import java.util.function.Function; import static com.github.technus.tectech.mechanics.alignment.IAlignment.STATES_COUNT; +@Deprecated public class AlignmentLimits implements IAlignmentLimits { protected final boolean[] validStates=new boolean[STATES_COUNT]; diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentMessage.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentMessage.java index 07a3e02c1f..61fc398171 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentMessage.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentMessage.java @@ -16,6 +16,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; +@Deprecated public class AlignmentMessage implements IMessage { int mPosX; int mPosY; diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentUtility.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentUtility.java index 68e11b77af..af3369465c 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentUtility.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentUtility.java @@ -8,6 +8,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.FakePlayer; +@Deprecated public class AlignmentUtility { private AlignmentUtility(){ diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignment.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignment.java index a2a6301070..0ea202cc98 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignment.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignment.java @@ -8,6 +8,7 @@ import net.minecraftforge.common.util.ForgeDirection; import java.util.Arrays; +@Deprecated public interface IAlignment extends IAlignmentLimits,IAlignmentProvider { int DIRECTIONS_COUNT= Direction.VALUES.length; int ROTATIONS_COUNT= Rotation.VALUES.length; diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentLimits.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentLimits.java index 68b4d84dab..a1f505baff 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentLimits.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentLimits.java @@ -4,6 +4,7 @@ import com.github.technus.tectech.mechanics.alignment.enumerable.Flip; import com.github.technus.tectech.mechanics.alignment.enumerable.Rotation; import net.minecraftforge.common.util.ForgeDirection; +@Deprecated public interface IAlignmentLimits { IAlignmentLimits UNLIMITED= (direction, rotation, flip) -> true; diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentProvider.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentProvider.java index 07dc972aac..23bf9ae266 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentProvider.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentProvider.java @@ -1,5 +1,6 @@ package com.github.technus.tectech.mechanics.alignment; +@Deprecated public interface IAlignmentProvider { IAlignment getAlignment(); } \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/IntegerAxisSwap.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/IntegerAxisSwap.java index 1c44164731..2ec6ea6893 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/IntegerAxisSwap.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/IntegerAxisSwap.java @@ -7,6 +7,7 @@ import net.minecraftforge.common.util.ForgeDirection; import static com.github.technus.tectech.mechanics.alignment.enumerable.Direction.getAxisVector; import static java.lang.Math.abs; +@Deprecated public class IntegerAxisSwap { private final Vec3Impl forFirstAxis; private final Vec3Impl forSecondAxis; diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Direction.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Direction.java index cc3971fedb..56356b3606 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Direction.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Direction.java @@ -3,6 +3,7 @@ package com.github.technus.tectech.mechanics.alignment.enumerable; import com.github.technus.tectech.util.Vec3Impl; import net.minecraftforge.common.util.ForgeDirection; +@Deprecated public enum Direction { DOWN(ForgeDirection.DOWN), UP(ForgeDirection.UP), diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java index 5949b432df..04f2a55bd5 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java @@ -14,6 +14,7 @@ import static java.lang.Math.abs; import static java.util.Arrays.stream; import static java.util.stream.Collectors.toMap; +@Deprecated public enum ExtendedFacing { DOWN_NORMAL_NONE("down normal none"), DOWN_NORMAL_HORIZONTAL("down normal horizontal"), diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Flip.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Flip.java index 4b1dff70ec..0b85c5197e 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Flip.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Flip.java @@ -9,6 +9,7 @@ import static java.lang.Math.abs; import static java.util.Arrays.stream; import static java.util.stream.Collectors.toMap; +@Deprecated public enum Flip { NONE(3, "none"), HORIZONTAL(2, "horizontal"), diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Rotation.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Rotation.java index 5d41f54a11..b6cd1aa015 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Rotation.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Rotation.java @@ -9,6 +9,7 @@ import static java.lang.Math.abs; import static java.util.Arrays.stream; import static java.util.stream.Collectors.toMap; +@Deprecated public enum Rotation { NORMAL(2, "normal"), CLOCKWISE(3, "clockwise"), diff --git a/src/main/java/com/github/technus/tectech/mechanics/constructable/ConstructableUtility.java b/src/main/java/com/github/technus/tectech/mechanics/constructable/ConstructableUtility.java index 2dc74330f9..6d605eef6e 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/constructable/ConstructableUtility.java +++ b/src/main/java/com/github/technus/tectech/mechanics/constructable/ConstructableUtility.java @@ -13,6 +13,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.FakePlayer; import net.minecraftforge.common.util.ForgeDirection; +@Deprecated public class ConstructableUtility { private ConstructableUtility(){ diff --git a/src/main/java/com/github/technus/tectech/mechanics/constructable/IConstructable.java b/src/main/java/com/github/technus/tectech/mechanics/constructable/IConstructable.java index 1de0381f1f..ed0cdfbf7d 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/constructable/IConstructable.java +++ b/src/main/java/com/github/technus/tectech/mechanics/constructable/IConstructable.java @@ -7,6 +7,7 @@ import net.minecraft.item.ItemStack; /** * Created by Tec on 24.03.2017. */ +@Deprecated public interface IConstructable { void construct(ItemStack stackSize, boolean hintsOnly); diff --git a/src/main/java/com/github/technus/tectech/mechanics/constructable/IMultiblockInfoContainer.java b/src/main/java/com/github/technus/tectech/mechanics/constructable/IMultiblockInfoContainer.java index 173e0d16ec..da124fcf4d 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/constructable/IMultiblockInfoContainer.java +++ b/src/main/java/com/github/technus/tectech/mechanics/constructable/IMultiblockInfoContainer.java @@ -12,6 +12,7 @@ import java.util.HashMap; /** * To implement IConstructable on not own TileEntities */ +@Deprecated public interface IMultiblockInfoContainer { HashMap> MULTIBLOCK_MAP = new HashMap<>(); diff --git a/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java b/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java index 752f2d1bcc..81fec52ebd 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java +++ b/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java @@ -18,6 +18,7 @@ import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by Tec on 15.03.2017. */ +@Deprecated public final class ConstructableTriggerItem extends Item { public static ConstructableTriggerItem INSTANCE; diff --git a/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java b/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java index d71abb34b7..39193fd598 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java +++ b/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java @@ -18,6 +18,7 @@ import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by Tec on 15.03.2017. */ +@Deprecated public final class FrontRotationTriggerItem extends Item { public static FrontRotationTriggerItem INSTANCE; -- cgit From e93e0546e67215cb05161cdbdb09899bbc781005 Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 9 Sep 2021 09:24:07 -0700 Subject: marked as deprecated --- src/main/java/com/github/technus/tectech/util/Vec3Impl.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/util/Vec3Impl.java b/src/main/java/com/github/technus/tectech/util/Vec3Impl.java index 9ba96d741a..56a9176767 100644 --- a/src/main/java/com/github/technus/tectech/util/Vec3Impl.java +++ b/src/main/java/com/github/technus/tectech/util/Vec3Impl.java @@ -4,6 +4,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.dispenser.IPosition; import net.minecraftforge.common.util.ForgeDirection; +@Deprecated public class Vec3Impl implements Comparable { public static final Vec3Impl NULL_VECTOR = new Vec3Impl(0, 0, 0); private final int val0; -- cgit From d84c3d5ea6559f997de70887adddc00ffd8c42dd Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 9 Sep 2021 10:35:08 -0700 Subject: I think I did this right --- .../multi/GT_MetaTileEntity_EM_junction.java | 92 ++++++++++++++++------ 1 file changed, 66 insertions(+), 26 deletions(-) (limited to 'src') 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 b63079d2dc..4aeb537226 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 @@ -1,7 +1,5 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; -import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_OutputElemental; @@ -10,9 +8,14 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.INameFunction; import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunction; import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureUtility; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; +import gregtech.api.util.IGT_HatchAdder; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; @@ -22,7 +25,9 @@ import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texture import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static com.github.technus.tectech.util.CommonValues.V; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static gregtech.api.enums.GT_Values.E; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -31,32 +36,55 @@ import static net.minecraft.util.StatCollector.translateToLocal; public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { //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!", "!!!",}, - {"!!!", "!!!", "!!!",}, - }; - private static final String[][] shapeBig = new String[][]{ - {E, "A ", "A . ", "A ",}, - {"A!!!", "!000!", "!010!", "!000!", "A!!!",}, - {"!!!!!", "!000!", "!000!", "!000!", "!!!!!",}, - {"A!!!", "!000!", "!000!", "!000!", "A!!!",}, - {"A!!!", "!!!!!", "!!!!!", "!!!!!", "A!!!",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{4, 5}; - private static final IHatchAdder[] addingMethods = adders( - GT_MetaTileEntity_EM_junction::addClassicToMachineList, - GT_MetaTileEntity_EM_junction::addElementalToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.junction.hint.0"),//1 - Classic Hatches or High Power Casing translateToLocal("gt.blockmachines.multimachine.em.junction.hint.1"),//2 - Elemental Hatches or Molecular Casing }; + + private static final IStructureDefinition STRUCTURE_DEFINITION = + StructureDefinition.builder() + .addShape("main", new String[][]{ + {"CCC", "C~C", "CCC"}, + {"AAA", "AAA", "AAA"}, + {"CCC", "CAC", "CCC"}, + {"CCC", "CCC", "CCC"} + }) + .addShape("mainBig", new String[][]{ + {" ", " CCC ", " C~C ", " CCC ", " "}, + {" DDD ", "DAAAD", "DABAD", "DAAAD", " DDD "}, + {"DDDDD", "DAAAD", "DAAAD", "DAAAD", "DDDDD"}, + {" DDD ", "DAAAD", "DAAAD", "DAAAD", " DDD "}, + {" DDD ", "DDDDD", "DDDDD", "DDDDD", " DDD "} + }) + .addElement('A', ofBlock(sBlockCasingsTT, 4)) + .addElement('B', ofBlock(sBlockCasingsTT, 5)) + .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_junction::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_junction::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4)) + .build(); + +// private static final String[][] shape = new String[][]{ +// {" ", " . ", " ",}, +// {"000", "000", "000",}, +// {"!!!", "!0!", "!!!",}, +// {"!!!", "!!!", "!!!",}, +// }; +// private static final String[][] shapeBig = new String[][]{ +// {E, "A ", "A . ", "A ",}, +// {"A!!!", "!000!", "!010!", "!000!", "A!!!",}, +// {"!!!!!", "!000!", "!000!", "!000!", "!!!!!",}, +// {"A!!!", "!000!", "!000!", "!000!", "A!!!",}, +// {"A!!!", "!!!!!", "!!!!!", "!!!!!", "A!!!",}, +// }; +// private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; +// private static final byte[] blockMeta = new byte[]{4, 5}; +// private static final IGT_HatchAdder[] addingMethods = adders( +// GT_MetaTileEntity_EM_junction::addClassicToMachineList, +// GT_MetaTileEntity_EM_junction::addElementalToMachineList); +// private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; +// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; +// private static final byte[] blockMetaFallback = new byte[]{0, 4}; + //endregion //region parameters @@ -106,9 +134,11 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { int meta = iGregTechTileEntity.getMetaIDAtSide(GT_Utility.getOppositeSide(iGregTechTileEntity.getFrontFacing())); if (meta == 4) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); + //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); + return structureCheck_EM("main", 1, 1, 0); } else if (meta == 5) { - return structureCheck_EM(shapeBig, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); + //return structureCheck_EM(shapeBig, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); + return structureCheck_EM("mainBig", 2, 2, 0); } return false; } @@ -177,7 +207,17 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + //Structure.builder((stackSize.stackSize & 1) == 1 ? shape : shapeBig, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + if ((stackSize.stackSize & 1) == 1) { + structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize); + } else { + structureBuild_EM("mainBig", 2, 2, 0, hintsOnly, stackSize); + } + } + + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override -- cgit From 15d761b22ccff56ec7927381140b0abff11982d9 Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 9 Sep 2021 10:40:02 -0700 Subject: tweaked the structure definition --- .../thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 4aeb537226..67667f0e1a 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 @@ -47,8 +47,8 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB .addShape("main", new String[][]{ {"CCC", "C~C", "CCC"}, {"AAA", "AAA", "AAA"}, - {"CCC", "CAC", "CCC"}, - {"CCC", "CCC", "CCC"} + {"DDD", "DAD", "DDD"}, + {"DDD", "DDD", "DDD"} }) .addShape("mainBig", new String[][]{ {" ", " CCC ", " C~C ", " CCC ", " "}, -- cgit From 6c7410682705189a62e9500008f6b89a9be6159d Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 9 Sep 2021 12:00:29 -0700 Subject: required StructureLib to load before TecTech --- src/main/java/com/github/technus/tectech/TecTech.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/TecTech.java b/src/main/java/com/github/technus/tectech/TecTech.java index 809a7e877d..bca0bbba70 100644 --- a/src/main/java/com/github/technus/tectech/TecTech.java +++ b/src/main/java/com/github/technus/tectech/TecTech.java @@ -32,7 +32,7 @@ import java.util.Iterator; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; @Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION, dependencies = "required-after:Forge@[10.13.4.1614,);" - + "required-after:YAMCore@[0.5.70,);" + "required-after:gregtech;" + "after:CoFHCore;" + "after:Thaumcraft;" + "after:dreamcraft;") + + "required-after:YAMCore@[0.5.70,);" + "required-after:gregtech;" + "after:CoFHCore;" + "after:Thaumcraft;" + "after:dreamcraft;" + "required-after:StructureLib") public class TecTech { @SidedProxy(clientSide = Reference.CLIENTSIDE, serverSide = Reference.SERVERSIDE) public static CommonProxy proxy; -- cgit From b4b990ffc31ee34c6f2781d40206d55d4ef401ad Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 9 Sep 2021 12:27:23 -0700 Subject: I think I did this right --- .../GT_MetaTileEntity_EM_essentiaQuantizer.java | 67 ++++++++++++++++------ 1 file changed, 48 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java index a716420e81..4111e04c61 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java @@ -12,10 +12,13 @@ import com.github.technus.tectech.thing.casing.TT_Container_Casings; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_quantizer; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.IGT_HatchAdder; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.item.ItemStack; @@ -27,9 +30,13 @@ import net.minecraftforge.common.util.ForgeDirection; import static com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity.multi.EssentiaCompat.essentiaContainerCompat; import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; +import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsNH; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.util.CommonValues.V; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static gregtech.api.enums.GT_Values.E; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -38,29 +45,49 @@ import static net.minecraft.util.StatCollector.translateToLocal; public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { //region structure //use multi A energy inputs, use less power the longer it runs - private static final String[][] shape = new String[][]{ - {" ", " . ", " ",}, - {"0A0", E, "0A0",}, - {"121", "232", "121",}, - {"\"\"\"", "\"1\"", "\"\"\"",}, - {"010", "1!1", "010",}, - }; - private static final Block[] blockType = new Block[]{QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{0, 4, 0, 8}; - private static final IHatchAdder[] addingMethods = adders( - GT_MetaTileEntity_EM_essentiaQuantizer::addClassicToMachineList, - GT_MetaTileEntity_EM_essentiaQuantizer::addElementalOutputToMachineList, - GT_MetaTileEntity_EM_essentiaQuantizer::addElementalMufflerToMachineList); - 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 + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.0"),//1 - Classic Hatches or High Power Casing translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.1"),//2 - Elemental Output Hatch - translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.2"),//3 - Elemental Overflow Hatches or Elemental Casing + translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.2"),//3 - Elemental Overflow Hatches or Molecular Casing translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.3"),//General - Some sort of Essentia Storage }; + + private static final IStructureDefinition STRUCTURE_DEFINITION = + StructureDefinition.builder() + .addShape("main", new String[][]{ + {"FFF", "F~F", "FFF"}, + {"E E", " ", "E E"}, + {"BAB", "ACA", "BAB"}, + {"DDD", "DBD", "DDD"}, + {"EBE", "BGB", "EBE"} + }) + .addElement('A', ofBlock(sBlockCasingsTT, 0)) + .addElement('B', ofBlock(sBlockCasingsTT, 4)) + .addElement('C', ofBlock(sBlockCasingsTT, 8)) + .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_essentiaQuantizer::addElementalMufflerToMachineList, textureOffset + 4, 3, sBlockCasingsTT, 4)) + .addElement('E', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_essentiaQuantizer::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .addElement('G', ofHatchAdder(GT_MetaTileEntity_EM_essentiaQuantizer::addElementalOutputToMachineList, textureOffset + 4, 2)) + .build(); + +// private static final String[][] shape = new String[][]{ +// {" ", " . ", " ",}, +// {"0A0", E, "0A0",}, +// {"121", "232", "121",}, +// {"\"\"\"", "\"1\"", "\"\"\"",}, +// {"010", "1!1", "010",}, +// }; +// private static final Block[] blockType = new Block[]{QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; +// private static final byte[] blockMeta = new byte[]{0, 4, 0, 8}; +// private static final IGT_HatchAdder[] addingMethods = adders( +// GT_MetaTileEntity_EM_essentiaQuantizer::addClassicToMachineList, +// GT_MetaTileEntity_EM_essentiaQuantizer::addElementalOutputToMachineList, +// GT_MetaTileEntity_EM_essentiaQuantizer::addElementalMufflerToMachineList); +// 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}; + //endregion public GT_MetaTileEntity_EM_essentiaQuantizer(int aID, String aName, String aNameRegional) { @@ -78,7 +105,8 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return essentiaContainerCompat.check(this) && structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); + //return essentiaContainerCompat.check(this) && structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); + return essentiaContainerCompat.check(this) && structureCheck_EM("main", 1, 1, 0); } @Override @@ -144,7 +172,8 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2); } } - Structure.builder(shape, blockType, blockMeta, 1, 1, 0, iGregTechTileEntity, getExtendedFacing(), hintsOnly); + //Structure.builder(shape, blockType, blockMeta, 1, 1, 0, iGregTechTileEntity, getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize); } @Override -- cgit From 86b3f5847d19226c4f704666dcb1770410b5fcb1 Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 9 Sep 2021 12:28:01 -0700 Subject: forgot getStructure_EM() --- .../metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java index 4111e04c61..91e822da94 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java @@ -176,6 +176,11 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize); } + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; + } + @Override public String[] getStructureDescription(ItemStack stackSize) { return description; -- cgit From 55e0ee4122188d3c2b5425a1a2456963e678060a Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 9 Sep 2021 12:41:03 -0700 Subject: I think I did this right --- .../GT_MetaTileEntity_EM_essentiaDequantizer.java | 72 ++++++++++++++++------ 1 file changed, 53 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java index 87e2660e01..51a5ba66cd 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java @@ -9,13 +9,17 @@ import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.casing.TT_Container_Casings; +import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_dequantizer; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_quantizer; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.IGT_HatchAdder; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.item.ItemStack; @@ -29,7 +33,10 @@ import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.util.CommonValues.V; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static gregtech.api.enums.GT_Values.E; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -38,29 +45,49 @@ import static net.minecraft.util.StatCollector.translateToLocal; public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { //region structure //use multi A energy inputs, use less power the longer it runs - private static final String[][] shape = new String[][]{ - {" ", " . ", " ",}, - {"0A0", E, "0A0",}, - {"121", "232", "121",}, - {"\"\"\"", "\"2\"", "\"\"\"",}, - {"202", "0!0", "202",}, - }; - private static final Block[] blockType = new Block[]{QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{0, 0, 4, 8}; - private static final IHatchAdder[] addingMethods = adders( - GT_MetaTileEntity_EM_essentiaDequantizer::addClassicToMachineList, - GT_MetaTileEntity_EM_essentiaDequantizer::addElementalInputToMachineList, - GT_MetaTileEntity_EM_essentiaDequantizer::addElementalMufflerToMachineList); - 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 + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.0"),//1 - Classic Hatches or High Power Casing translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.1"),//2 - Elemental Input Hatch - translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.2"),//3 - Elemental Overflow Hatches or Elemental Casing + translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.2"),//3 - Elemental Overflow Hatches or Molecular Casing translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.3"),//General - Some sort of Essentia Storage }; + + private static final IStructureDefinition STRUCTURE_DEFINITION = + StructureDefinition.builder() + .addShape("main", new String[][]{ + {"DDD", "DHD", "DDD"}, + {"E E", " ", "E E"}, + {"ABA", "BCB", "ABA"}, + {"FFF", "FBF", "FFF"}, + {"BEB", "EGE", "BEB"} + }) + .addElement('A', ofBlock(sBlockCasingsTT, 0)) + .addElement('B', ofBlock(sBlockCasingsTT, 4)) + .addElement('C', ofBlock(sBlockCasingsTT, 8)) + .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_essentiaDequantizer::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .addElement('E', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_essentiaDequantizer::addElementalMufflerToMachineList, textureOffset + 4, 3, sBlockCasingsTT, 4)) + .addElement('G', ofHatchAdder(GT_MetaTileEntity_EM_essentiaDequantizer::addElementalInputToMachineList, textureOffset + 4, 2)) + .build(); + +// private static final String[][] shape = new String[][]{ +// {" ", " . ", " ",}, +// {"0A0", E, "0A0",}, +// {"121", "232", "121",}, +// {"\"\"\"", "\"2\"", "\"\"\"",}, +// {"202", "0!0", "202",}, +// }; +// private static final Block[] blockType = new Block[]{QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; +// private static final byte[] blockMeta = new byte[]{0, 0, 4, 8}; +// private static final IGT_HatchAdder[] addingMethods = adders( +// GT_MetaTileEntity_EM_essentiaDequantizer::addClassicToMachineList, +// GT_MetaTileEntity_EM_essentiaDequantizer::addElementalInputToMachineList, +// GT_MetaTileEntity_EM_essentiaDequantizer::addElementalMufflerToMachineList); +// 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}; + //endregion public GT_MetaTileEntity_EM_essentiaDequantizer(int aID, String aName, String aNameRegional) { @@ -78,7 +105,8 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_ @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return essentiaContainerCompat.check(this) && structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); + //return essentiaContainerCompat.check(this) && structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); + return essentiaContainerCompat.check(this) && structureCheck_EM("main", 1, 1, 0); } @Override @@ -140,7 +168,13 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_ iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2); } } - Structure.builder(shape, blockType, blockMeta, 1, 1, 0, iGregTechTileEntity, getExtendedFacing(), hintsOnly); + //Structure.builder(shape, blockType, blockMeta, 1, 1, 0, iGregTechTileEntity, getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override -- cgit From 3b79f996eff82e5625b13399c3ee8a822a06037e Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 9 Sep 2021 15:39:50 -0700 Subject: reverting structurelib dependency in TecTech since gt5u depends on it --- src/main/java/com/github/technus/tectech/TecTech.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/TecTech.java b/src/main/java/com/github/technus/tectech/TecTech.java index bca0bbba70..809a7e877d 100644 --- a/src/main/java/com/github/technus/tectech/TecTech.java +++ b/src/main/java/com/github/technus/tectech/TecTech.java @@ -32,7 +32,7 @@ import java.util.Iterator; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; @Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION, dependencies = "required-after:Forge@[10.13.4.1614,);" - + "required-after:YAMCore@[0.5.70,);" + "required-after:gregtech;" + "after:CoFHCore;" + "after:Thaumcraft;" + "after:dreamcraft;" + "required-after:StructureLib") + + "required-after:YAMCore@[0.5.70,);" + "required-after:gregtech;" + "after:CoFHCore;" + "after:Thaumcraft;" + "after:dreamcraft;") public class TecTech { @SidedProxy(clientSide = Reference.CLIENTSIDE, serverSide = Reference.SERVERSIDE) public static CommonProxy proxy; -- cgit From 0d94e73a28cf0669e790d00957b3407e5b026ffb Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 9 Sep 2021 15:40:24 -0700 Subject: minor tweaks --- .../multi/GT_MetaTileEntity_EM_essentiaDequantizer.java | 4 ++-- .../metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java index 51a5ba66cd..abe8900ac7 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java @@ -2,7 +2,6 @@ package com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity import com.github.technus.tectech.TecTech; import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.ePrimalAspectDefinition; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack; import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; @@ -13,6 +12,7 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_E import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_quantizer; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; @@ -56,7 +56,7 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_ private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.builder() .addShape("main", new String[][]{ - {"DDD", "DHD", "DDD"}, + {"DDD", "D~D", "DDD"}, {"E E", " ", "E E"}, {"ABA", "BCB", "ABA"}, {"FFF", "FBF", "FFF"}, diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java index 91e822da94..d900ec8c30 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java @@ -2,7 +2,6 @@ package com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity import com.github.technus.tectech.TecTech; import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.ePrimalAspectDefinition; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack; import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; @@ -12,6 +11,7 @@ import com.github.technus.tectech.thing.casing.TT_Container_Casings; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_quantizer; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; -- cgit From 0abfa743383ae2e54221d59d539598c768b723d3 Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 9 Sep 2021 22:12:15 -0700 Subject: transposed structure definitions --- .../multi/GT_MetaTileEntity_EM_annihilation.java | 7 +++---- .../multi/GT_MetaTileEntity_EM_computer.java | 17 +++++++++-------- .../multi/GT_MetaTileEntity_EM_crafting.java | 5 +++-- .../multi/GT_MetaTileEntity_EM_dataBank.java | 5 +++-- .../multi/GT_MetaTileEntity_EM_decay.java | 5 +++-- .../multi/GT_MetaTileEntity_EM_dequantizer.java | 7 +++---- .../multi/GT_MetaTileEntity_EM_infuser.java | 5 +++-- .../multi/GT_MetaTileEntity_EM_quantizer.java | 5 +++-- .../multi/GT_MetaTileEntity_EM_research.java | 7 +++---- .../multi/GT_MetaTileEntity_EM_scanner.java | 5 +++-- .../multi/GT_MetaTileEntity_EM_stabilizer.java | 5 +++-- .../multi/GT_MetaTileEntity_EM_switch.java | 5 +++-- .../multi/GT_MetaTileEntity_EM_wormhole.java | 5 +++-- .../multi/GT_MetaTileEntity_TM_microwave.java | 5 +++-- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 4 ++-- 15 files changed, 50 insertions(+), 42 deletions(-) (limited to 'src') 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 c474c81b94..e7cd3948ef 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 @@ -21,8 +21,7 @@ import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texture import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sHintCasingsTT; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; @@ -44,7 +43,7 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl //region structure private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape("main", new String[][]{ + .addShape("main", transpose(new String[][]{ {" "," AB BA "," AB BA "," BBB "," A A A ","AA F AA"," A A A "," BBB "," AB BA "," AB BA "," "}, {" "," AB BA "," EECEEECEE "," EGGEEEGGE ","ACGGGEGGGCA","AEGGGDGGGEA","ACGGGEGGGCA"," EGGEEEGGE "," EECEEECEE "," AB BA "," "}, {" "," B B "," EGGEGEGGE "," G G "," G G "," G G "," G G "," G G "," EGGEGEGGE "," B B "," "}, @@ -56,7 +55,7 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl {" "," B B "," EGGEGEGGE "," G G "," G G "," G G "," G G "," G G "," EGGEGEGGE "," B B "," "}, {" "," AB BA "," EECEEECEE "," EGGEEEGGE ","ACGGGEGGGCA","AEGGGDGGGEA","ACGGGEGGGCA"," EGGEEEGGE "," EECEEECEE "," AB BA "," "}, {" "," AB BA "," AB BA "," BBB "," A A A ","AA F AA"," A A A "," BBB "," AB BA "," AB BA "," "} - }) + })) .addElement('A', ofBlock(sBlockCasingsTT, 4)) .addElement('B', ofBlock(sBlockCasingsTT, 5)) .addElement('C', ofBlock(sBlockCasingsTT, 6)) 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 429effb94b..51779d7f28 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 @@ -40,6 +40,7 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStat import static com.github.technus.tectech.util.CommonValues.MULTI_CHECK_AT; import static com.github.technus.tectech.util.CommonValues.V; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; @@ -63,30 +64,30 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape("front", new String[][]{ + .addShape("front", transpose(new String[][]{ {" AA"}, {" AA"}, {" ~A"}, {" AA"} - }) - .addShape("cap", new String[][]{ + })) + .addShape("cap", transpose(new String[][]{ {"-CB"}, {" DD"}, {" DD"}, {"-CB"} - }) - .addShape("slice", new String[][]{ + })) + .addShape("slice", transpose(new String[][]{ {"-CB"}, {" ED"}, {" ED"}, {"-CB"} - }) - .addShape("back", new String[][]{ + })) + .addShape("back", transpose(new String[][]{ {" AA"}, {" AA"}, {" AA"}, {" AA"} - }) + })) .addElement('A', ofHatchAdderOptional(GT_MetaTileEntity_EM_computer::addToMachineList, textureOffset + 1, 1, sBlockCasingsTT, 1)) .addElement('B', ofBlock(sBlockCasingsTT, 1)) .addElement('C', ofBlock(sBlockCasingsTT, 2)) diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java index b028394822..f6584d8d27 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java @@ -24,6 +24,7 @@ import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texture import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; @@ -47,13 +48,13 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB private static final IStructureDefinition STRUCTURE_DEFINITION= StructureDefinition .builder() - .addShape("main", new String[][]{ + .addShape("main", transpose(new String[][]{ {" AAA ","AAAAA","A A","BBBBB","BGCGB","BGGGB","BGCGB","BBBBB","A A","AAAAA"," AAA "}, {"AHHHA","AAAAA"," FFF ","BBBBB","GGGGG","GGGGG","GGGGG","BBBBB"," FFF ","AAAAA","AHHHA"}, {"AH~HA","AAAAA"," FEF ","BBEBB","CGEGC","GGDGG","CGEGC","BBEBB"," FEF ","AAAAA","AHHHA"}, {"AHHHA","AAAAA"," FFF ","BBBBB","GGGGG","GGGGG","GGGGG","BBBBB"," FFF ","AAAAA","AHHHA"}, {" AAA ","AAAAA","A A","BBBBB","BGCGB","BGGGB","BGCGB","BBBBB","A A","AAAAA"," AAA "} - }) + })) .addElement('A', ofBlock(sBlockCasingsTT, 4)) .addElement('B', ofBlock(sBlockCasingsTT, 5)) .addElement('C', ofBlock(sBlockCasingsTT, 6)) diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java index 1b8f95f5f5..dc78b264b3 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java @@ -36,6 +36,7 @@ import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texture import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.util.CommonValues.V; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; @@ -55,11 +56,11 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape("main", new String[][]{ + .addShape("main", transpose(new String[][]{ {"BCCCB","BDDDB","BDDDB"}, {"BC~CB","BAAAB","BDDDB"}, {"BCCCB","BDDDB","BDDDB"} - }) + })) .addElement('A', ofBlock(sBlockCasingsTT, 1)) .addElement('B', ofBlock(sBlockCasingsTT, 2)) .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_dataBank::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) 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 e49a4980ed..acffd600c1 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 @@ -42,6 +42,7 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStat import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.STATUS_TOO_LOW; import static com.github.technus.tectech.util.CommonValues.VN; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; import static net.minecraft.util.StatCollector.translateToLocalFormatted; @@ -70,13 +71,13 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape("main", new String[][]{ + .addShape("main",transpose(new String[][]{ {"A A","AAAAA","A A","ABBBA","ABCBA","ABBBA","A A","AAAAA","A A"}, {" FFF ","AAAAA"," EEE ","BDDDB","BDDDB","BDDDB"," EEE ","AAAAA"," FFF "}, {" F~F ","AAAAA"," EAE ","BDDDB","CDDDC","BDDDB"," EAE ","AAAAA"," FFF "}, {" FFF ","AAAAA"," EEE ","BDDDB","BDDDB","BDDDB"," EEE ","AAAAA"," FFF "}, {"A A","AAAAA","A A","ABBBA","ABCBA","ABBBA","A A","AAAAA","A A"} - }) + })) .addElement('A', ofBlock(sBlockCasingsTT, 4)) .addElement('B', ofBlock(sBlockCasingsTT, 5)) .addElement('C', ofBlock(sBlockCasingsTT, 6)) 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 ce328fa480..d45e8d7e7f 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 @@ -35,8 +35,7 @@ import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.*; import static com.github.technus.tectech.util.CommonValues.V; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockHint; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; @@ -50,11 +49,11 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape("main", new String[][]{ + .addShape("main", transpose(new String[][]{ {"CCC","ABA","EEE","BDB"}, {"C~C","BBB","EBE","DFD"}, {"CCC","ABA","EEE","BDB"} - }) + })) .addElement('A', ofBlock(sBlockCasingsTT, 0)) .addElement('B', ofBlock(sBlockCasingsTT, 4)) .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_dequantizer::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) 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 5a5c778f69..e18c4596bf 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 @@ -29,6 +29,7 @@ import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.GregTech_API.mEUtoRF; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; @@ -45,13 +46,13 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape("main", new String[][]{ + .addShape("main", transpose(new String[][]{ {"CCC","CCC","CCC"}, {"BBB","BAB","BBB"}, {"A~A","AAA","AAA"}, {"BBB","BAB","BBB"}, {"CCC","CCC","CCC"} - }) + })) .addElement('A', ofBlock(sBlockCasingsTT, 4)) .addElement('B', ofBlock(sBlockCasingsTT, 7)) .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_infuser::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) 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 0cac653157..d4e5ed9d59 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 @@ -43,6 +43,7 @@ import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBloc import static com.github.technus.tectech.util.CommonValues.V; import static com.github.technus.tectech.util.Util.isInputEqual; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; @@ -55,11 +56,11 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock //use multi A energy inputs, use less power the longer it runs private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape("main", new String[][]{ + .addShape("main", transpose(new String[][]{ {"CCC","BAB","EEE","DBD"}, {"C~C","ABA","EBE","BFB"}, {"CCC","BAB","EEE","DBD"} - }) + })) .addElement('A', ofBlock(sBlockCasingsTT, 0)) .addElement('B', ofBlock(sBlockCasingsTT, 4)) .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_quantizer::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) 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 2f99b46e45..c8d6f23ae3 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 @@ -46,8 +46,7 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileE import static com.github.technus.tectech.thing.metaTileEntity.multi.em_machine.GT_MetaTileEntity_EM_machine.machine; import static com.github.technus.tectech.util.CommonValues.V; import static com.github.technus.tectech.util.CommonValues.VN; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; import static gregtech.api.enums.GT_Values.E; import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; @@ -81,7 +80,7 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB //region structure private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape("main", new String[][]{ + .addShape("main", transpose(new String[][]{ {" ", " A ", " A ", "AAA", "AAA", "AAA", "AAA"}, {"AAA", "ACA", "ACA", "ACA", "BCB", "BCB", "BBB"}, {" ", " C ", " ", " ", "ACA", "CCC", "DDD"}, @@ -89,7 +88,7 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB {" ", " C ", " ", " ", "ACA", "CCC", "DDD"}, {"AAA", "ACA", "ACA", "ACA", "BCB", "BCB", "BBB"}, {" ", " A ", " A ", "AAA", "AAA", "AAA", "AAA"} - }) + })) .addElement('A', ofBlock(sBlockCasingsTT, 1)) .addElement('B', ofBlock(sBlockCasingsTT, 2)) .addElement('C', ofBlock(sBlockCasingsTT, 3)) 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 14209ca8f7..80f65a55ba 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 @@ -46,6 +46,7 @@ import static com.github.technus.tectech.util.CommonValues.V; import static com.github.technus.tectech.util.CommonValues.VN; import static com.github.technus.tectech.util.Util.areBitsSet; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; @@ -82,13 +83,13 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape("main", new String[][]{ + .addShape("main", transpose(new String[][]{ {"CCCCC","BBBBB","BBDBB","BDDDB","BDDDB","BDDDB","BBDBB","EEEEE"}, {"CAAAC","BBBBB","BDDDB","D---D","D---D","D---D","BDDDB","EBBBE"}, {"CA~AC","BBBBB","DDDDD","D---D","D---D","D---D","DDGDD","EBFBE"}, {"CAAAC","BBBBB","BDDDB","D---D","D---D","D---D","BDDDB","EBBBE"}, {"CCCCC","BBBBB","BBDBB","BDDDB","BDDDB","BDDDB","BBDBB","EEEEE"} - }) + })) .addElement('A', ofBlock(sBlockCasingsTT, 0)) .addElement('B', ofBlock(sBlockCasingsTT, 4)) .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_scanner::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) 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 2b7c85ffc2..573c1ef4e9 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 @@ -18,6 +18,7 @@ import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; @@ -34,13 +35,13 @@ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_Multibloc private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape("main", new String[][]{ + .addShape("main", transpose(new String[][]{ {" AFA ","BCBCB","FBGBF","BCBCB"," AFA "}, {"AEEEA","CBBBC","BBDBB","CBBBC","AEEEA"}, {"FE~EF","BBBBB","GDDDG","BBBBB","FEEEF"}, {"AEEEA","CBBBC","BBDBB","CBBBC","AEEEA"}, {" AFA ","BCBCB","FBGBF","BCBCB"," AFA "} - }) + })) .addElement('A', ofBlock(sBlockCasingsTT, 4)) .addElement('B', ofBlock(sBlockCasingsTT, 5)) .addElement('C', ofBlock(sBlockCasingsTT, 6)) diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java index a71a5aaa59..8e68ca944b 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java @@ -33,6 +33,7 @@ import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBloc import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static com.github.technus.tectech.util.CommonValues.V; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; @@ -48,11 +49,11 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape("main", new String[][]{ + .addShape("main", transpose(new String[][]{ {"BBB","BBB","BBB"}, {"B~B","BAB","BBB"}, {"BBB","BBB","BBB"} - }) + })) .addElement('A', ofBlock(sBlockCasingsTT, 3)) .addElement('B', ofHatchAdderOptional(GT_MetaTileEntity_EM_switch::addClassicToMachineList, textureOffset + 1, 1, sBlockCasingsTT, 1)) .build(); 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 92eec32628..29956c962f 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 @@ -24,6 +24,7 @@ import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texture import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.enums.GT_Values.E; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; @@ -46,7 +47,7 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape("main", new String[][]{ + .addShape("main", transpose(new String[][]{ {" "," "," "," "," "," D "," DDDDD "," DGGGD "," DGGGD "," DGGGD "," DDDDD "}, {" "," "," "," D "," D "," D "," DDAAADD "," EABBBAE "," EABBBAE "," EABBBAE "," DDAAADD "}, {" "," D "," D "," D "," "," ","DDA ADD","DABFFFBAD","DABCCCBAD","DABFFFBAD","DDA ADD"}, @@ -56,7 +57,7 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB {" "," D "," D "," D "," "," ","DDA ADD","DABFFFBAD","DABCCCBAD","DABFFFBAD","DDA ADD"}, {" "," "," "," D "," D "," D "," DDAAADD "," EABBBAE "," EABBBAE "," EABBBAE "," DDAAADD "}, {" "," "," "," "," "," D "," DDDDD "," DGGGD "," DGGGD "," DGGGD "," DDDDD "} - }) + })) .addElement('A', ofBlock(sBlockCasingsTT, 5)) .addElement('B', ofBlock(sBlockCasingsTT, 10)) .addElement('C', ofBlock(sBlockCasingsTT, 11)) diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java index 1c64effb38..e5ec4b9983 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java @@ -32,6 +32,7 @@ import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.GregTech_API.sBlockCasings4; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.AxisAlignedBB.getBoundingBox; @@ -55,12 +56,12 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape("main", new String[][]{ + .addShape("main", transpose(new String[][]{ {"AAAAA","A---A","A---A","A---A","AAAAA"}, {"AAAAA","A---A","A---A","A---A","AAAAA"}, {"AA~AA","A---A","A---A","A---A","AAAAA"}, {"ABBBA","BAAAB","BAAAB","BAAAB","ABBBA"} - }) + })) .addElement('A', ofBlock(sBlockCasings4, 1)) .addElement('B', ofHatchAdderOptional(GT_MetaTileEntity_TM_microwave::addClassicToMachineList, 49, 1, sBlockCasings4, 1)) .build(); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java index 40bc786e8e..eeb89f6812 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java @@ -114,7 +114,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape("main", new String[][]{ + .addShape("main", transpose(new String[][]{ {" "," "," BBB "," BBB "," BBB "," "," "}, {" "," BBB "," BBBBB "," BBBBB "," BBBBB "," BBB "," "}, {" "," BBB "," BBBBB "," BBBBB "," BBBBB "," BBB "," "}, @@ -132,7 +132,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock {" "," "," "," C "," "," "," "}, {" "," DDD "," D D "," D C D "," D D "," DDD "," "}, {" EE~EE ","EAAAAAE","EADDDAE","EADADAE","EADDDAE"," AAAAAE"," EEEEE "} - }) + })) .addElement('A', ofBlock(sBlockCasingsBA0, 6)) .addElement('B', ofBlock(sBlockCasingsBA0, 7)) .addElement('C', ofBlock(sBlockCasingsBA0, 8)) -- cgit From 7c53dac7767c6d8042caedfa046c59ef5c75fa07 Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 9 Sep 2021 23:19:46 -0700 Subject: removed commented code --- .../GT_MetaTileEntity_EM_essentiaDequantizer.java | 19 ----- .../GT_MetaTileEntity_EM_essentiaQuantizer.java | 20 ------ .../multi/GT_MetaTileEntity_EM_annihilation.java | 27 ------- .../multi/GT_MetaTileEntity_EM_bhg.java | 84 ---------------------- .../multi/GT_MetaTileEntity_EM_collider.java | 44 ------------ .../multi/GT_MetaTileEntity_EM_computer.java | 24 ------- .../multi/GT_MetaTileEntity_EM_crafting.java | 25 ------- .../multi/GT_MetaTileEntity_EM_dataBank.java | 17 ----- .../multi/GT_MetaTileEntity_EM_decay.java | 22 ------ .../multi/GT_MetaTileEntity_EM_dequantizer.java | 18 ----- .../multi/GT_MetaTileEntity_EM_infuser.java | 16 ----- .../multi/GT_MetaTileEntity_EM_junction.java | 26 ------- .../multi/GT_MetaTileEntity_EM_quantizer.java | 19 ----- .../multi/GT_MetaTileEntity_EM_research.java | 26 ------- .../multi/GT_MetaTileEntity_EM_scanner.java | 24 ------- .../multi/GT_MetaTileEntity_EM_stabilizer.java | 19 ----- .../multi/GT_MetaTileEntity_EM_switch.java | 16 ----- .../multi/GT_MetaTileEntity_EM_wormhole.java | 25 ------- .../multi/GT_MetaTileEntity_TM_microwave.java | 19 ----- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 28 -------- .../em_machine/GT_MetaTileEntity_EM_machine.java | 20 ------ 21 files changed, 538 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java index abe8900ac7..d77502fcc3 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java @@ -71,23 +71,6 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_ .addElement('G', ofHatchAdder(GT_MetaTileEntity_EM_essentiaDequantizer::addElementalInputToMachineList, textureOffset + 4, 2)) .build(); -// private static final String[][] shape = new String[][]{ -// {" ", " . ", " ",}, -// {"0A0", E, "0A0",}, -// {"121", "232", "121",}, -// {"\"\"\"", "\"2\"", "\"\"\"",}, -// {"202", "0!0", "202",}, -// }; -// private static final Block[] blockType = new Block[]{QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; -// private static final byte[] blockMeta = new byte[]{0, 0, 4, 8}; -// private static final IGT_HatchAdder[] addingMethods = adders( -// GT_MetaTileEntity_EM_essentiaDequantizer::addClassicToMachineList, -// GT_MetaTileEntity_EM_essentiaDequantizer::addElementalInputToMachineList, -// GT_MetaTileEntity_EM_essentiaDequantizer::addElementalMufflerToMachineList); -// 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}; - //endregion public GT_MetaTileEntity_EM_essentiaDequantizer(int aID, String aName, String aNameRegional) { @@ -105,7 +88,6 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_ @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - //return essentiaContainerCompat.check(this) && structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); return essentiaContainerCompat.check(this) && structureCheck_EM("main", 1, 1, 0); } @@ -168,7 +150,6 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_ iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2); } } - //Structure.builder(shape, blockType, blockMeta, 1, 1, 0, iGregTechTileEntity, getExtendedFacing(), hintsOnly); structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize); } diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java index d900ec8c30..332f162025 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java @@ -70,24 +70,6 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_essentiaQuantizer::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) .addElement('G', ofHatchAdder(GT_MetaTileEntity_EM_essentiaQuantizer::addElementalOutputToMachineList, textureOffset + 4, 2)) .build(); - -// private static final String[][] shape = new String[][]{ -// {" ", " . ", " ",}, -// {"0A0", E, "0A0",}, -// {"121", "232", "121",}, -// {"\"\"\"", "\"1\"", "\"\"\"",}, -// {"010", "1!1", "010",}, -// }; -// private static final Block[] blockType = new Block[]{QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; -// private static final byte[] blockMeta = new byte[]{0, 4, 0, 8}; -// private static final IGT_HatchAdder[] addingMethods = adders( -// GT_MetaTileEntity_EM_essentiaQuantizer::addClassicToMachineList, -// GT_MetaTileEntity_EM_essentiaQuantizer::addElementalOutputToMachineList, -// GT_MetaTileEntity_EM_essentiaQuantizer::addElementalMufflerToMachineList); -// 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}; - //endregion public GT_MetaTileEntity_EM_essentiaQuantizer(int aID, String aName, String aNameRegional) { @@ -105,7 +87,6 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - //return essentiaContainerCompat.check(this) && structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); return essentiaContainerCompat.check(this) && structureCheck_EM("main", 1, 1, 0); } @@ -172,7 +153,6 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2); } } - //Structure.builder(shape, blockType, blockMeta, 1, 1, 0, iGregTechTileEntity, getExtendedFacing(), hintsOnly); structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize); } 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 e7cd3948ef..4510294f63 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 @@ -65,31 +65,6 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl .addElement('G', ofBlock(QuantumGlassBlock.INSTANCE, 0)) .addElement('H', ofHatchAdderOptional(GT_MetaTileEntity_EM_annihilation::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) .build(); - - /* - private static final String[][] shape = new String[][]{ - {"\u0002", "D000", "C0 0", "C0 . 0", "C0 0", "D000"}, - {"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",}, - {"A0C0C0", "03444244430", "A4G4", "A4G4", "A4G4", "02G20", "A4G4", "A4G4", "A4G4", "03444244430", "A0C0C0",}, - {"00C!C00", "02444544420", "A4G4", "A4G4", "A4G4", "!5G5!", "A4G4", "A4G4", "A4G4", "02444544420", "00C!C00",}, - {"A0C0C0", "03444244430", "A4G4", "A4G4", "A4G4", "02G20", "A4G4", "A4G4", "A4G4", "03444244430", "A0C0C0",}, - {"D111", "A244222442", "A4G4", "A4G4", "12G21", "12G21", "12G21", "A4G4", "A4G4", "A244222442", "D111",}, - {"C01A10", "A223222322", "A244242442", "03442424430", "12225252221", "A244222442", "12225252221", "03442424430", "A244242442", "A223222322", "C01A10",}, - {"C01A10", "C01A10", "D1A1", "00B101B00", "11111111111", "C01110", "11111111111", "00B101B00", "D1A1", "C01A10", "C01A10",}, - {"\u0002", "D000", "C0 0", "C0 0", "C0 0", "D000"}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{4, 5, 12, 6, 0, 10}; - private static final IGT_HatchAdder[] addingMethods = adders( - GT_MetaTileEntity_EM_annihilation::addClassicToMachineList, - GT_MetaTileEntity_EM_annihilation::addElementalToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 4}; - */ - //endregion public GT_MetaTileEntity_EM_annihilation(int aID, String aName, String aNameRegional) { @@ -107,7 +82,6 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 5, 5, 0); return structureCheck_EM("main", 5, 5, 0); } @@ -138,7 +112,6 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - //Structure.builder(shape, blockType, blockMeta, 5, 5, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); structureBuild_EM("main", 5, 5, 0, hintsOnly, stackSize); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java index 4cc21ffc72..0ed2b38c19 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java @@ -132,90 +132,6 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E .addElement('H', ofHatchAdderOptional(GT_MetaTileEntity_EM_bhg::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) .build(); -// private static final IStructureDefinition STRUCTURE_DEFINITION= StructureDefinition -// .builder() -// .addShape("t1",new String[][]{ -// {"\u000B", "M0000000", "L00 00", "L0 0", "L0 !!! 0", "L0 !.! 0", "L0 !!! 0", "L0 0", "L00 00", "M0000000",}, -// {"\u0008", "O0A0", "O0A0", "O0A0", "O0A0", "N11111", "M1101011", "I000010010010000", "M1111111", "I000010010010000", "M1101011", "N11111", "O0A0", "O0A0", "O0A0", "O0A0",}, -// {"\u0006", "O0A0", "O0A0", "O0A0", "P1", "P1", "M1111111", "L11E11", "L1B222B1", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "L1B222B1", "L11E11", "M1111111", "P1", "P1", "O0A0", "O0A0", "O0A0",}, -// {"\u0005", "O0A0", "O0A0", "P1", "P1", "\u0004", "F00Q00", "H11M11", "F00Q00", "\u0004", "P1", "P1", "O0A0", "O0A0",}, -// {"\u0004", "O0A0", "N00000", "P1", "P4", "P4", "\u0003", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "\u0003", "P4", "P4", "P1", "N00000", "O0A0",}, -// {"\u0003", "O0A0", "O0A0", "P1", "M2224222", "\u0004", "G2Q2", "G2Q2", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "G2Q2", "G2Q2", "\u0004", "M2224222", "P1", "O0A0", "O0A0",}, -// {"\u0002", "O0A0", "N00000", "P1", "P4", "\u0006", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "\u0006", "P4", "P1", "N00000", "O0A0",}, -// {"\u0001", "O0A0", "O0A0", "P1", "M2224222", "\u0006", "E2U2", "E2U2", "B00A2U2A00", "D14U41", "B00A2U2A00", "E2U2", "E2U2", "\u0006", "M2224222", "P1", "O0A0", "O0A0",}, -// {"\u0001", "O0A0", "P1", "P4", "\u0009", "B0[0", "C14W41", "B0[0", "\u0009", "P4", "P1", "O0A0",}, -// {E, "O0A0", "O0A0", "P1", "P4", "\u0009", "A00[00", "C14W41", "A00[00", "\u0009", "P4", "P1", "O0A0", "O0A0",}, -// {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",}, -// {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",}, -// {"O0A0", "O0A0", "M1111111", "\u0009", "B1[1", "B1[1", "001[100", "B1[1", "001[100", "B1[1", "B1[1", "\u0009", "M1111111", "O0A0", "O0A0",}, -// {"O0A0", "N11111", "L11E11", "\u0001", "G2Q2", E, "E2U2", "\u0003", "B1[1", "B1[1", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "B1[1", "B1[1", "\u0003", "E2U2", E, "G2Q2", "\u0001", "L11E11", "N11111", "O0A0",}, -// {"O0A0", "M1101011", "L1B222B1", E, "F0S0", "G2Q2", "D0W0", "E2U2", "\u0003", "B1[1", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "B1[1", "\u0003", "E2U2", "D0W0", "G2Q2", "F0S0", E, "L1B222B1", "M1101011", "O0A0",}, -// {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",}, -// {"O0A0", "M1111111", "J111A23332A111", "H11M11", "F0144M4410", "F14Q41", "D014S410", "D14U41", "C14W41", "C14W41", "B1[1", "B1[1", "B1[1", "A1]1", "A12[21", "013[310", "A13[31", "013[310", "A12[21", "A1]1", "B1[1", "B1[1", "B1[1", "C14W41", "C14W41", "D14U41", "D014S410", "F14Q41", "F0144M4410", "H11M11", "J111A23332A111", "M1111111", "O0A0",}, -// {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",}, -// {"O0A0", "M1101011", "L1B222B1", E, "F0S0", "G2Q2", "D0W0", "E2U2", "\u0003", "B1[1", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "B1[1", "\u0003", "E2U2", "D0W0", "G2Q2", "F0S0", E, "L1B222B1", "M1101011", "O0A0",}, -// {"O0A0", "N11111", "L11E11", "\u0001", "G2Q2", E, "E2U2", "\u0003", "B1[1", "B1[1", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "B1[1", "B1[1", "\u0003", "E2U2", E, "G2Q2", "\u0001", "L11E11", "N11111", "O0A0",}, -// {"O0A0", "O0A0", "M1111111", "\u0009", "B1[1", "B1[1", "001[100", "B1[1", "001[100", "B1[1", "B1[1", "\u0009", "M1111111", "O0A0", "O0A0",}, -// {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",}, -// {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",}, -// {E, "O0A0", "O0A0", "P1", "P4", "\u0009", "A00[00", "C14W41", "A00[00", "\u0009", "P4", "P1", "O0A0", "O0A0",}, -// {"\u0001", "O0A0", "P1", "P4", "\u0009", "B0[0", "C14W41", "B0[0", "\u0009", "P4", "P1", "O0A0",}, -// {"\u0001", "O0A0", "O0A0", "P1", "M2224222", "\u0006", "E2U2", "E2U2", "B00A2U2A00", "D14U41", "B00A2U2A00", "E2U2", "E2U2", "\u0006", "M2224222", "P1", "O0A0", "O0A0",}, -// {"\u0002", "O0A0", "N00000", "P1", "P4", "\u0006", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "\u0006", "P4", "P1", "N00000", "O0A0",}, -// {"\u0003", "O0A0", "O0A0", "P1", "M2224222", "\u0004", "G2Q2", "G2Q2", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "G2Q2", "G2Q2", "\u0004", "M2224222", "P1", "O0A0", "O0A0",}, -// {"\u0004", "O0A0", "N00000", "P1", "P4", "P4", "\u0003", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "\u0003", "P4", "P4", "P1", "N00000", "O0A0",}, -// {"\u0005", "O0A0", "O0A0", "P1", "P1", "\u0004", "F00Q00", "H11M11", "F00Q00", "\u0004", "P1", "P1", "O0A0", "O0A0",}, -// {"\u0006", "O0A0", "O0A0", "O0A0", "P1", "P1", "M1111111", "L11E11", "L1B222B1", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "L1B222B1", "L11E11", "M1111111", "P1", "P1", "O0A0", "O0A0", "O0A0",}, -// {"\u0008", "O0A0", "O0A0", "O0A0", "O0A0", "N11111", "M1101011", "I000010010010000", "M1111111", "I000010010010000", "M1101011", "N11111", "O0A0", "O0A0", "O0A0", "O0A0",}, -// {"\u000B", "O0A0", "O0A0", "O0A0", "L000000000", "O0A0", "L000000000", "O0A0", "O0A0", "O0A0",}, -// }) -// .addShape("t2",new String[][]{ -// {"\u000B", "M0000000", "L00 00", "L0 0", "L0 !!! 0", "L0 !.! 0", "L0 !!! 0", "L0 0", "L00 00", "M0000000",}, -// {"\u0008", "O0A0", "M550A055", "L5550A0555", "K55550A05555", "J5555111115555", "J5551101011555", "I000010010010000", "M1111111", "I000010010010000", "J5551101011555", "J5555111115555", "K55550A05555", "L5550A0555", "M550A055", "O0A0",}, -// {"\u0006", "O0A0", "M550A055", "K55550A05555", "J555C1C555", "I555D1D555", "I55B1111111B55", "H55B11E11B55", "H55B1B222B1B55", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "H55B1B222B1B55", "H55B11E11B55", "I55B1111111B55", "I555D1D555", "J555C1C555", "K55550A05555", "M550A055", "O0A0",}, -// {"\u0005", "O0A0", "L5550A0555", "J555C1C555", "I55E1E55", "H55M55", "H5O5", "G55O55", "G5Q5", "G5Q5", "F00Q00", "H11M11", "F00Q00", "G5Q5", "G5Q5", "G55O55", "H5O5", "H55M55", "I55E1E55", "J555C1C555", "L5550A0555", "O0A0",}, -// {"\u0004", "O0A0", "K55500000555", "I555D1D555", "H55F4F55", "G55G4G55", "G5Q5", "F55Q55", "F5S5", "F5S5", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "F5S5", "F5S5", "F55Q55", "G5Q5", "G55G4G55", "H55F4F55", "I555D1D555", "K55500000555", "O0A0",}, -// {"\u0003", "O0A0", "J555550A055555", "H555E1E555", "G55D2224222D55", "F55Q55", "F5S5", "E55S55", "E5U5", "E5U5", "E5A2Q2A5", "E5A2Q2A5", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "E5A2Q2A5", "E5A2Q2A5", "E5U5", "E5U5", "E55S55", "F5S5", "F55Q55", "G55D2224222D55", "H555E1E555", "J555550A055555", "O0A0",}, -// {"\u0002", "O0A0", "K55500000555", "H555E1E555", "G55G4G55", "F5S5", "E55S55", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "E55S55", "F5S5", "G55G4G55", "H555E1E555", "K55500000555", "O0A0",}, -// {"\u0001", "O0A0", "L5550A0555", "I555D1D555", "G55D2224222D55", "F5S5", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "C5Y5", "C5A2U2A5", "C5A2U2A5", "B00A2U2A00", "D14U41", "B00A2U2A00", "C5A2U2A5", "C5A2U2A5", "C5Y5", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "F5S5", "G55D2224222D55", "I555D1D555", "L5550A0555", "O0A0",}, -// {"\u0001", "M550A055", "J555C1C555", "H55F4F55", "F55Q55", "E55S55", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B0[0", "C14W41", "B0[0", "B5[5", "B5[5", "C5Y5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "E55S55", "F55Q55", "H55F4F55", "J555C1C555", "M550A055",}, -// {E, "O0A0", "K55550A05555", "I55E1E55", "G55G4G55", "F5S5", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "B5[5", "A00[00", "C14W41", "A00[00", "B5[5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "F5S5", "G55G4G55", "I55E1E55", "K55550A05555", "O0A0",}, -// {E, "M550A055", "J555C1C555", "H55M55", "G5Q5", "E55S55", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "E55S55", "G5Q5", "H55M55", "J555C1C555", "M550A055",}, -// {E, "L5550A0555", "I555D1D555", "H5O5", "F55Q55", "E5U5", "D5W5", "D5W5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "D5W5", "D5W5", "E5U5", "F55Q55", "H5O5", "I555D1D555", "L5550A0555",}, -// {"O0A0", "K55550A05555", "I55B1111111B55", "G55O55", "F5S5", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "001[100", "B1[1", "001[100", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "F5S5", "G55O55", "I55B1111111B55", "K55550A05555", "O0A0",}, -// {"O0A0", "J5555111115555", "H55B11E11B55", "G5Q5", "F5S5", "E5A2Q2A5", "D5W5", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D5W5", "E5A2Q2A5", "F5S5", "G5Q5", "H55B11E11B55", "J5555111115555", "O0A0",}, -// {"O0A0", "J5551101011555", "H55B1B222B1B55", "G5Q5", "F0S0", "E5A2Q2A5", "D0W0", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D0W0", "E5A2Q2A5", "F0S0", "G5Q5", "H55B1B222B1B55", "J5551101011555", "O0A0",}, -// {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",}, -// {"O0A0", "M1111111", "J111A23332A111", "H11M11", "F0144M4410", "F14Q41", "D014S410", "D14U41", "C14W41", "C14W41", "B1[1", "B1[1", "B1[1", "A1]1", "A12[21", "013[310", "A13[31", "013[310", "A12[21", "A1]1", "B1[1", "B1[1", "B1[1", "C14W41", "C14W41", "D14U41", "D014S410", "F14Q41", "F0144M4410", "H11M11", "J111A23332A111", "M1111111", "O0A0",}, -// {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",}, -// {"O0A0", "J5551101011555", "H55B1B222B1B55", "G5Q5", "F0S0", "E5A2Q2A5", "D0W0", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D0W0", "E5A2Q2A5", "F0S0", "G5Q5", "H55B1B222B1B55", "J5551101011555", "O0A0",}, -// {"O0A0", "J5555111115555", "H55B11E11B55", "G5Q5", "F5S5", "E5A2Q2A5", "D5W5", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D5W5", "E5A2Q2A5", "F5S5", "G5Q5", "H55B11E11B55", "J5555111115555", "O0A0",}, -// {"O0A0", "K55550A05555", "I55B1111111B55", "G55O55", "F5S5", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "001[100", "B1[1", "001[100", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "F5S5", "G55O55", "I55B1111111B55", "K55550A05555", "O0A0",}, -// {E, "L5550A0555", "I555D1D555", "H5O5", "F55Q55", "E5U5", "D5W5", "D5W5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "D5W5", "D5W5", "E5U5", "F55Q55", "H5O5", "I555D1D555", "L5550A0555",}, -// {E, "M550A055", "J555C1C555", "H55M55", "G5Q5", "E55S55", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "E55S55", "G5Q5", "H55M55", "J555C1C555", "M550A055",}, -// {E, "O0A0", "K55550A05555", "I55E1E55", "G55G4G55", "F5S5", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "B5[5", "A00[00", "C14W41", "A00[00", "B5[5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "F5S5", "G55G4G55", "I55E1E55", "K55550A05555", "O0A0",}, -// {"\u0001", "M550A055", "J555C1C555", "H55F4F55", "F55Q55", "E55S55", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B0[0", "C14W41", "B0[0", "B5[5", "B5[5", "C5Y5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "E55S55", "F55Q55", "H55F4F55", "J555C1C555", "M550A055",}, -// {"\u0001", "O0A0", "L5550A0555", "I555D1D555", "G55D2224222D55", "F5S5", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "C5Y5", "C5A2U2A5", "C5A2U2A5", "B00A2U2A00", "D14U41", "B00A2U2A00", "C5A2U2A5", "C5A2U2A5", "C5Y5", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "F5S5", "G55D2224222D55", "I555D1D555", "L5550A0555", "O0A0",}, -// {"\u0002", "O0A0", "K55500000555", "H555E1E555", "G55G4G55", "F5S5", "E55S55", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "E55S55", "F5S5", "G55G4G55", "H555E1E555", "K55500000555", "O0A0",}, -// {"\u0003", "O0A0", "J555550A055555", "H555E1E555", "G55D2224222D55", "F55Q55", "F5S5", "E55S55", "E5U5", "E5U5", "E5A2Q2A5", "E5A2Q2A5", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "E5A2Q2A5", "E5A2Q2A5", "E5U5", "E5U5", "E55S55", "F5S5", "F55Q55", "G55D2224222D55", "H555E1E555", "J555550A055555", "O0A0",}, -// {"\u0004", "O0A0", "K55500000555", "I555D1D555", "H55F4F55", "G55G4G55", "G5Q5", "F55Q55", "F5S5", "F5S5", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "F5S5", "F5S5", "F55Q55", "G5Q5", "G55G4G55", "H55F4F55", "I555D1D555", "K55500000555", "O0A0",}, -// {"\u0005", "O0A0", "L5550A0555", "J555C1C555", "I55E1E55", "H55M55", "H5O5", "G55O55", "G5Q5", "G5Q5", "F00Q00", "H11M11", "F00Q00", "G5Q5", "G5Q5", "G55O55", "H5O5", "H55M55", "I55E1E55", "J555C1C555", "L5550A0555", "O0A0",}, -// {"\u0006", "O0A0", "M550A055", "K55550A05555", "J555C1C555", "I555D1D555", "I55B1111111B55", "H55B11E11B55", "H55B1B222B1B55", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "H55B1B222B1B55", "H55B11E11B55", "I55B1111111B55", "I555D1D555", "J555C1C555", "K55550A05555", "M550A055", "O0A0",}, -// {"\u0008", "O0A0", "M550A055", "L5550A0555", "K55550A05555", "J5555111115555", "J5551101011555", "I000010010010000", "M1111111", "I000010010010000", "J5551101011555", "J5555111115555", "K55550A05555", "L5550A0555", "M550A055", "O0A0",}, -// {"\u000B", "O0A0", "O0A0", "O0A0", "L000000000", "O0A0", "L000000000", "O0A0", "O0A0", "O0A0",}, -// }) -// .addElement('0', ofBlock(sBlockCasingsTT,12)) -// .addElement('1', ofBlock(sBlockCasingsTT,13)) -// .addElement('2', ofBlock(sBlockCasingsTT,14)) -// .addElement('3', ofBlock(sBlockCasingsTT,10)) -// .addElement('4', ofBlock(sBlockCasingsTT,11)) -// .addElement('5', ofBlock(QuantumGlassBlock.INSTANCE,0)) -// .addElement(' ', ofHatchAdderOptional(GT_MetaTileEntity_EM_bhg::addClassicToMachineList, -// textureOffset,1,sBlockCasingsTT,0)) -// .addElement('!', ofHatchAdderOptional(GT_MetaTileEntity_EM_bhg::addElementalToMachineList, -// textureOffset + 4,2,sBlockCasingsTT,4)) -// .build(); - @Override public IStructureDefinition getStructure_EM() { return STRUCTURE_DEFINITION; 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 10619522d6..49c43d6b4e 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 @@ -331,50 +331,6 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB .addElement('J', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) .build(); -// private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition -// .builder() -// .addShape("main", new String[][]{ -// {"I0A0A0", "I00000", "I0A0A0",}, -// {"H0000000", "G001111100", "H0000000",}, -// {"F22223332222", "F41155555114", "F22223332222",}, -// {"E2000000000002", "E4155111115514", "E2000000000002",}, -// {"D20000E00002", "D41511E11514", "D20000E00002",}, -// {"C2000I0002", "C4151I1514", "C2000I0002",}, -// {"B2000K0002", "B4151K1514", "B2000K0002",}, -// {"B200M002", "A0151M1510", "B200M002",}, -// {"A0200M0020", "A0151M1510", "A0200M0020",}, -// {"0020O0200", "0151O1510", "0020O0200",}, -// {"A030O030", "0151O1510", "A030O030",}, -// {"0030O0300", "0151O1510", "0030O0300",}, -// {"A030O030", "0151O1510", "A030O030",}, -// {"0020O0200", "0151O1510", "0020O0200",}, -// {"A0200M0020", "A0151M1510", "A0200M0020",}, -// {"B200M002", "A0151M1510", "B200M002",}, -// {"B2000K0002", "B4151K1514", "B2000K0002",}, -// {"C2000I0002", "C4151I1514", "C2000I0002",}, -// {"D200002&&&200002", "D415112&.&211514", "D200002&&&200002",}, -// {"E20!!22222!!02", "E4155111115514", "E20!!22222!!02",}, -// {"F2222#$#2222", "F41155555114", "F2222#$#2222",}, -// }) -// .addElement('0', ofBlock(sBlockCasingsTT, 4)) -// .addElement('1', ofBlock(sBlockCasingsTT, 7)) -// .addElement('2', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), -// error(), ofBlock(sBlockCasingsTT, 4), ofBlock(sBlockCasingsTT, 5))) -// .addElement('3', ofBlock(QuantumGlassBlock.INSTANCE, 0)) -// .addElement('4', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), -// error(), ofBlock(sBlockCasingsTT, 4), ofBlock(sBlockCasingsTT, 6))) -// .addElement('5', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), -// error(), ofBlock(sBlockCasingsTT, 8), ofBlock(sBlockCasingsTT, 9))) -// .addElement('&', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addClassicToMachineList, -// textureOffset, 1, sBlockCasingsTT, 0)) -// .addElement('!', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalInputToMachineList, -// textureOffset + 4, 2, sBlockCasingsTT, 4)) -// .addElement('$', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalOutputToMachineList, -// textureOffset + 4, 3, sBlockCasingsTT, 4)) -// .addElement('#', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalMufflerToMachineList, -// textureOffset + 4, 4, sBlockCasingsTT, 4)) -// .build(); - @Override public IStructureDefinition getStructure_EM() { return STRUCTURE_DEFINITION; 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 51779d7f28..16167b74a2 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 @@ -94,20 +94,6 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB .addElement('D', ofBlock(sBlockCasingsTT, 3)) .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_computer::addRackToMachineList, textureOffset + 3, 2, sBlockCasingsTT, 3)) .build(); - -// 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",},}; -// private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; -// private static final byte[] blockMeta = new byte[]{2, 1, 3}; -// private static final IGT_HatchAdder[] addingMethods = adders( -// GT_MetaTileEntity_EM_computer::addToMachineList, -// GT_MetaTileEntity_EM_computer::addRackToMachineList); -// private static final short[] casingTextures = new short[]{textureOffset + 1, textureOffset + 3}; -// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; -// private static final byte[] blockMetaFallback = new byte[]{1, 3}; - //endregion //region parameters @@ -169,17 +155,14 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB } } eRacks.clear(); - //if (!structureCheck_EM(front, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, 0)) { if (!structureCheck_EM("front", 1, 2, 0)) { return false; } - //if (!structureCheck_EM(cap, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, -1)) { if (!structureCheck_EM("cap", 1, 2, -1)) { return false; } byte offset = -2, totalLen = 4; while (offset > -16) { - //if (!structureCheck_EM(slice, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, offset)) { if (!structureCheck_EM("slice", 1, 2, offset)) { break; } @@ -189,11 +172,9 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB if (totalLen > 17) { return false; } - //if (!structureCheck_EM(cap, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, ++offset)) { if (!structureCheck_EM("cap", 1, 2, ++offset)) { return false; } - //if (!structureCheck_EM(terminator, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, --offset)) { if (!structureCheck_EM("back", 1, 2, --offset)) { return false; } @@ -407,20 +388,15 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB @Override public void construct(ItemStack stackSize, boolean hintsOnly) { IGregTechTileEntity igt = getBaseMetaTileEntity(); - //Structure.builder(front, blockType, blockMeta, 1, 2, 0, igt, getExtendedFacing(), hintsOnly); structureBuild_EM("front", 1, 2, 0, hintsOnly, stackSize); - //Structure.builder(cap, blockType, blockMeta, 1, 2, -1, igt, getExtendedFacing(), hintsOnly); structureBuild_EM("cap", 1, 2, -1, hintsOnly, stackSize); byte offset = -2; for (int rackSlices = Math.min(stackSize.stackSize, 12); rackSlices > 0; rackSlices--) { - //Structure.builder(slice, blockType, blockMeta, 1, 2, offset--, igt, getExtendedFacing(), hintsOnly); structureBuild_EM("slice", 1 , 2, offset--, hintsOnly, stackSize); } - //Structure.builder(cap, blockType, blockMeta, 1, 2, offset--, igt, getExtendedFacing(), hintsOnly); structureBuild_EM("cap", 1, 2, offset--, hintsOnly, stackSize); - //Structure.builder(terminator, blockType, blockMeta, 1, 2, offset, igt, getExtendedFacing(), hintsOnly); structureBuild_EM("back", 1, 2, offset, hintsOnly, stackSize); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java index f6584d8d27..ad72a069a9 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java @@ -64,29 +64,6 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB .addElement('G', ofBlock(QuantumGlassBlock.INSTANCE, 0)) .addElement('H', ofHatchAdderOptional(GT_MetaTileEntity_EM_crafting::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) .build(); - -// private static final String[][] shape = new String[][]{ -// {"A000", "0 0", "0 . 0", "0 0", "A000",}, -// {"00000", "00000", "00000", "00000", "00000",}, -// {"0C0", "A!!!", "A!1!", "A!!!", "0C0",}, -// {"22222", "22222", "22122", "22222", "22222",}, -// {"23432", "33333", "43134", "33333", "23432",}, -// {"23332", "33333", "33533", "33333", "23332",}, -// {"23432", "33333", "43134", "33333", "23432",}, -// {"22222", "22222", "22122", "22222", "22222",}, -// {"0C0", "A!!!", "A!1!", "A!!!", "0C0",}, -// {"00000", "00000", "00000", "00000", "00000",}, -// {"A000", "0 0", "0 0", "0 0", "A000",}, -// }; -// private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT}; -// private static final byte[] blockMeta = new byte[]{4, 10, 5, 0, 6, 9}; -// private static final IGT_HatchAdder[] addingMethods = adders( -// GT_MetaTileEntity_EM_crafting::addClassicToMachineList, -// GT_MetaTileEntity_EM_crafting::addElementalToMachineList); -// private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; -// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; -// private static final byte[] blockMetaFallback = new byte[]{0, 4}; - //endregion public GT_MetaTileEntity_EM_crafting(int aID, String aName, String aNameRegional) { @@ -104,7 +81,6 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); return structureCheck_EM("main", 2, 2, 0); } @@ -135,7 +111,6 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - //Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java index dc78b264b3..54d936fe0c 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java @@ -66,21 +66,6 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_dataBank::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_dataBank::addDataBankHatchToMachineList, textureOffset + 1, 2, sBlockCasingsTT, 1)) .build(); - -// private static final String[][] shape = new String[][]{ -// {"0 0", "0 . 0", "0 0",}, -// {"0!!!0", "01110", "0!!!0",}, -// {"0!!!0", "0!!!0", "0!!!0",}, -// }; -// private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; -// private static final byte[] blockMeta = new byte[]{2, 1}; -// private static final IGT_HatchAdder[] addingMethods = adders( -// GT_MetaTileEntity_EM_dataBank::addClassicToMachineList, -// GT_MetaTileEntity_EM_dataBank::addDataBankHatchToMachineList); -// private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 1}; -// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; -// private static final byte[] blockMetaFallback = new byte[]{0, 1}; - //endregion public GT_MetaTileEntity_EM_dataBank(int aID, String aName, String aNameRegional) { @@ -100,7 +85,6 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { eDataAccessHatches.clear(); eStacksDataOutputs.clear(); - //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 1, 0); return structureCheck_EM("main", 2, 1, 0); } @@ -195,7 +179,6 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - //Structure.builder(shape, blockType, blockMeta, 2, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); structureBuild_EM("main", 2, 1, 0, hintsOnly, stackSize); } 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 acffd600c1..62187f750d 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 @@ -85,26 +85,6 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_decay::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4)) .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_decay::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) .build(); -// private static final String[][] shape = new String[][]{ -// {"0C0", "A ", "A . ", "A ", "0C0",}, -// {"00000", "00000", "00000", "00000", "00000",}, -// {"0C0", "A!!!", "A!0!", "A!!!", "0C0",}, -// {"01110", "12221", "12221", "12221", "01110",}, -// {"01310", "12221", "32223", "12221", "01310",}, -// {"01110", "12221", "12221", "12221", "01110",}, -// {"0C0", "A!!!", "A!0!", "A!!!", "0C0",}, -// {"00000", "00000", "00000", "00000", "00000",}, -// {"0C0", "A ", "A ", "A ", "0C0",}, -// }; -// private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; -// private static final byte[] blockMeta = new byte[]{4, 5, 8, 6}; -// private static final IGT_HatchAdder[] addingMethods = adders( -// GT_MetaTileEntity_EM_decay::addClassicToMachineList, -// GT_MetaTileEntity_EM_decay::addElementalToMachineList); -// private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; -// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; -// private static final byte[] blockMetaFallback = new byte[]{0, 4}; - //endregion //region parameters @@ -133,7 +113,6 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); return structureCheck_EM("main", 2, 2, 0); } @@ -272,7 +251,6 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - //Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize); } 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 d45e8d7e7f..74ff85c698 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 @@ -68,22 +68,6 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo translateToLocal("gt.blockmachines.multimachine.em.emtomatter.hint.1"),//2 - Elemental Input Hatch translateToLocal("gt.blockmachines.multimachine.em.emtomatter.hint.2"),//3 - Elemental Overflow Hatches or Molecular Casing }; - -// private static final String[][] shape = new String[][]{ -// {" ", " . ", " ",}, -// {"010", "111", "010",}, -// {"\"\"\"", "\"1\"", "\"\"\"",}, -// {"121", "2!2", "121",}, -// }; -// private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE}; -// private static final byte[] blockMeta = new byte[]{0, 4, 0}; -// private static final IGT_HatchAdder[] addingMethods = adders( -// GT_MetaTileEntity_EM_dequantizer::addClassicToMachineList, -// GT_MetaTileEntity_EM_dequantizer::addElementalInputToMachineList, -// GT_MetaTileEntity_EM_dequantizer::addElementalMufflerToMachineList); -// 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}; //endregion public GT_MetaTileEntity_EM_dequantizer(int aID, String aName, String aNameRegional) { @@ -114,7 +98,6 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); return structureCheck_EM("main", 1, 1, 0); } @@ -178,7 +161,6 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - //Structure.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize); } 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 e18c4596bf..ec9cbcdb13 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 @@ -57,20 +57,6 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa .addElement('B', ofBlock(sBlockCasingsTT, 7)) .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_infuser::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) .build(); - -// private static final String[][] shape = new String[][]{ -// {" ", "000", "1.1", "000", " ",}, -// {" ", "010", "111", "010", " ",}, -// {" ", "000", "111", "000", " ",}, -// }; -// private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; -// private static final byte[] blockMeta = new byte[]{7, 4}; -// private static final IGT_HatchAdder[] addingMethods = adders( -// GT_MetaTileEntity_EM_infuser::addClassicToMachineList); -// private static final short[] casingTextures = new short[]{textureOffset}; -// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT}; -// private static final byte[] blockMetaFallback = new byte[]{0}; - //endregion public GT_MetaTileEntity_EM_infuser(int aID, String aName, String aNameRegional) { @@ -134,7 +120,6 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, 0); return structureCheck_EM("main", 1, 2, 0); } @@ -206,7 +191,6 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - //Structure.builder(shape, blockType, blockMeta, 1, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); structureBuild_EM("main", 1, 2, 0, hintsOnly, stackSize); } 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 67667f0e1a..3860f25701 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 @@ -62,29 +62,6 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_junction::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_junction::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4)) .build(); - -// private static final String[][] shape = new String[][]{ -// {" ", " . ", " ",}, -// {"000", "000", "000",}, -// {"!!!", "!0!", "!!!",}, -// {"!!!", "!!!", "!!!",}, -// }; -// private static final String[][] shapeBig = new String[][]{ -// {E, "A ", "A . ", "A ",}, -// {"A!!!", "!000!", "!010!", "!000!", "A!!!",}, -// {"!!!!!", "!000!", "!000!", "!000!", "!!!!!",}, -// {"A!!!", "!000!", "!000!", "!000!", "A!!!",}, -// {"A!!!", "!!!!!", "!!!!!", "!!!!!", "A!!!",}, -// }; -// private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; -// private static final byte[] blockMeta = new byte[]{4, 5}; -// private static final IGT_HatchAdder[] addingMethods = adders( -// GT_MetaTileEntity_EM_junction::addClassicToMachineList, -// GT_MetaTileEntity_EM_junction::addElementalToMachineList); -// private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; -// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; -// private static final byte[] blockMetaFallback = new byte[]{0, 4}; - //endregion //region parameters @@ -134,10 +111,8 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { int meta = iGregTechTileEntity.getMetaIDAtSide(GT_Utility.getOppositeSide(iGregTechTileEntity.getFrontFacing())); if (meta == 4) { - //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); return structureCheck_EM("main", 1, 1, 0); } else if (meta == 5) { - //return structureCheck_EM(shapeBig, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); return structureCheck_EM("mainBig", 2, 2, 0); } return false; @@ -207,7 +182,6 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - //Structure.builder((stackSize.stackSize & 1) == 1 ? shape : shapeBig, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); if ((stackSize.stackSize & 1) == 1) { structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize); } else { 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 d4e5ed9d59..62e3aca008 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 @@ -75,23 +75,6 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock translateToLocal("gt.blockmachines.multimachine.em.mattertoem.hint.1"),//2 - Elemental Output Hatch translateToLocal("gt.blockmachines.multimachine.em.mattertoem.hint.2"),//3 - Elemental Overflow Hatches or Molecular Casing }; - -// private static final String[][] shape = new String[][]{ -// {" ", " . ", " ",}, -// {"010", "101", "010",}, -// {"\"\"\"", "\"0\"", "\"\"\"",}, -// {"202", "0!0", "202",}, -// }; -// private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE}; -// private static final byte[] blockMeta = new byte[]{4, 0, 0}; -// private static final IGT_HatchAdder[] addingMethods = adders( -// GT_MetaTileEntity_EM_quantizer::addClassicToMachineList, -// GT_MetaTileEntity_EM_quantizer::addElementalOutputToMachineList, -// GT_MetaTileEntity_EM_quantizer::addElementalMufflerToMachineList); -// 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}; - //endregion public GT_MetaTileEntity_EM_quantizer(int aID, String aName, String aNameRegional) { @@ -109,7 +92,6 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); return structureCheck_EM("main", 1, 1, 0); } @@ -222,7 +204,6 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - //Structure.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize); } 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 c8d6f23ae3..959004bba4 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 @@ -95,25 +95,6 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_research::addClassicToMachineList, textureOffset + 1,1, sBlockCasingsTT,1)) .addElement('E', ofHatchAdder(GT_MetaTileEntity_EM_research::addHolderToMachineList, 3, 2)) .build(); - -// private static final String[][] shape = new String[][]{ -// {E, "000", E, E, E, "000"/*,E,*/}, -// {"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", "111", "111", "111", "212", "000",}, -// {"000", "222", " ", " ", " ", "222", "000",}, -// }; -// private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; -// private static final byte[] blockMeta = new byte[]{1, 3, 2}; -// private static final IGT_HatchAdder[] addingMethods = adders( -// GT_MetaTileEntity_EM_research::addClassicToMachineList, -// GT_MetaTileEntity_EM_research::addHolderToMachineList); -// private static final short[] casingTextures = new short[]{textureOffset + 1, textureOffset + 3}; -// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, Blocks.air}; -// private static final byte[] blockMetaFallback = new byte[]{1, 0}; - //endregion public GT_MetaTileEntity_EM_research(int aID, String aName, String aNameRegional) { @@ -290,12 +271,6 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB return false; } - /* - if (!structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 3, 4)) { - return false; - } - */ - for (GT_MetaTileEntity_Hatch_Holder rack : eHolders) { if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(rack)) { rack.getBaseMetaTileEntity().setActive(iGregTechTileEntity.isActive()); @@ -589,7 +564,6 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - //Structure.builder(shape, blockType, blockMeta, 1, 3, 4, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); structureBuild_EM("main", 1, 3, 4, hintsOnly, stackSize); } 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 80f65a55ba..8466069d99 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 @@ -98,28 +98,6 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa .addElement('F', ofHatchAdder(GT_MetaTileEntity_EM_scanner::addElementalInputToMachineList, textureOffset + 4, 2)) .addElement('G', ofHatchAdder(GT_MetaTileEntity_EM_scanner::addElementalOutputToMachineList, textureOffset + 4, 3)) .build(); - -// private static final String[][] shape = new String[][]{ -// {" ", " 222 ", " 2.2 ", " 222 ", " ",}, -// {"00000", "00000", "00000", "00000", "00000",}, -// {"00100", "01110", "11111", "01110", "00100",}, -// {"01110", "1---1", "1---1", "1---1", "01110",}, -// {"01110", "1---1", "1-A-1", "1---1", "01110",}, -// {"01110", "1---1", "1---1", "1---1", "01110",}, -// {"00100", "01110", "11\"11", "01110", "00100",}, -// {"#####", "#000#", "#0!0#", "#000#", "#####",}, -// }; -// private static final Block[] blockType = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT}; -// private static final byte[] blockMeta = new byte[]{4, 0, 0}; -// private static final IHatchAdder[] addingMethods = adders( -// GT_MetaTileEntity_EM_scanner::addClassicToMachineList, -// GT_MetaTileEntity_EM_scanner::addElementalInputToMachineList, -// GT_MetaTileEntity_EM_scanner::addElementalOutputToMachineList, -// GT_MetaTileEntity_EM_scanner::addElementalMufflerToMachineList); -// private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4, textureOffset + 4, textureOffset + 4}; -// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; -// private static final byte[] blockMetaFallback = new byte[]{0, 4, 4, 4}; - //endregion //region parameters @@ -236,7 +214,6 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { -// if (!structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0)) { if (!structureCheck_EM("main", 2, 2, 0)) { return false; } @@ -544,7 +521,6 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - //Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize); } 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 573c1ef4e9..0569d7533e 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 @@ -50,23 +50,6 @@ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_Multibloc .addElement('F', ofBlock(QuantumGlassBlock.INSTANCE, 0)) .addElement('G', ofHatchAdderOptional(GT_MetaTileEntity_EM_stabilizer::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4)) .build(); - -// private static final String[][] shape = new String[][]{ -// {"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",}, -// {"A010", "0 0", "1 1", "0 0", "A010",}, -// }; -// private static final Block[] blockType = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; -// private static final byte[] blockMeta = new byte[]{4, 0, 5, 6, 9}; -// private static final IGT_HatchAdder[] addingMethods = adders( -// GT_MetaTileEntity_EM_stabilizer::addClassicToMachineList, -// GT_MetaTileEntity_EM_stabilizer::addElementalToMachineList); -// private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; -// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; -// private static final byte[] blockMetaFallback = new byte[]{0, 4}; - //endregion public GT_MetaTileEntity_EM_stabilizer(int aID, String aName, String aNameRegional) { @@ -84,7 +67,6 @@ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_Multibloc @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); return structureCheck_EM("main", 2, 2, 0); } @@ -99,7 +81,6 @@ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_Multibloc @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - //Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java index 8e68ca944b..19ec588bc5 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java @@ -57,20 +57,6 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas .addElement('A', ofBlock(sBlockCasingsTT, 3)) .addElement('B', ofHatchAdderOptional(GT_MetaTileEntity_EM_switch::addClassicToMachineList, textureOffset + 1, 1, sBlockCasingsTT, 1)) .build(); - -// private static final String[][] shape = new String[][]{ -// {" ", " . ", " ",}, -// {" ", " 0 ", " ",}, -// {" ", " ", " ",}, -// }; -// private static final Block[] blockType = new Block[]{sBlockCasingsTT}; -// private static final byte[] blockMeta = new byte[]{3}; -// private static final IGT_HatchAdder[] addingMethods = adders( -// GT_MetaTileEntity_EM_switch::addClassicToMachineList); -// private static final short[] casingTextures = new short[]{textureOffset + 1}; -// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT}; -// private static final byte[] blockMetaFallback = new byte[]{1}; - //endregion //region parameters @@ -116,7 +102,6 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); return structureCheck_EM("main", 1, 1, 0); } @@ -244,7 +229,6 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - //StructureUtility.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize); } 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 29956c962f..0b74d36c78 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 @@ -66,29 +66,6 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB .addElement('F', ofBlock(QuantumGlassBlock.INSTANCE, 0)) .addElement('G', ofHatchAdderOptional(GT_MetaTileEntity_EM_wormhole::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4)) .build(); - -// private static final String[][] shape = new String[][]{ -// {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,*/}, -// {E, "D0", E, E, "A0E0", E, E, "D0"/*,E,*/}, -// {"D0", "D0", E, E, "00E00", E, E, "D0", "D0",}, -// {"B00000", "A0033300", "003C300", "03E30", "03E30", "03E30", "003C300", "A0033300", "B00000",}, -// {"B0!!!0", "A 31113 ", "031222130", "!12C21!", "!12C21!", "!12C21!", "031222130", "A 31113 ", "B0!!!0",}, -// {"B0!!!0", "A 31113 ", "031444130", "!14C41!", "!14C41!", "!14C41!", "031444130", "A 31113 ", "B0!!!0",}, -// {"B0!!!0", "A 31113 ", "031222130", "!12C21!", "!12C21!", "!12C21!", "031222130", "A 31113 ", "B0!!!0",}, -// {"B00000", "A0033300", "003C300", "03E30", "03E30", "03E30", "003C300", "A0033300", "B00000",}, -// }; -// private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT}; -// private static final byte[] blockMeta = new byte[]{12, 10, 0, 5, 11}; -// private static final IGT_HatchAdder[] addingMethods = adders( -// GT_MetaTileEntity_EM_wormhole::addClassicToMachineList, -// GT_MetaTileEntity_EM_wormhole::addElementalToMachineList); -// private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; -// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; -// private static final byte[] blockMetaFallback = new byte[]{0, 4}; - //endregion public GT_MetaTileEntity_EM_wormhole(int aID, String aName, String aNameRegional) { @@ -106,7 +83,6 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 4, 4, 0); return structureCheck_EM("main", 4, 4, 0); } @@ -137,7 +113,6 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - //Structure.builder(shape, blockType, blockMeta, 4, 4, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); structureBuild_EM("main", 4, 4, 0, hintsOnly, stackSize); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java index e5ec4b9983..1dfbc7c1d4 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java @@ -65,23 +65,6 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock .addElement('A', ofBlock(sBlockCasings4, 1)) .addElement('B', ofHatchAdderOptional(GT_MetaTileEntity_TM_microwave::addClassicToMachineList, 49, 1, sBlockCasings4, 1)) .build(); - -// private static final String[][] shape = new String[][]{ -// {"00000", "00000", "00.00", "0 0",}, -// {"0---0", "0---0", "0---0", " 000 ",}, -// {"0---0", "0---0", "0---0", " 000 ",}, -// {"0---0", "0---0", "0---0", " 000 ",}, -// {"00000", "00000", "00000", "0 0",}, -// }; -// private static final Block[] blockType = new Block[]{sBlockCasings4}; -// private static final byte[] blockMeta = new byte[]{1}; -// -// private static final IGT_HatchAdder[] addingMethods = adders( -// GT_MetaTileEntity_TM_microwave::addClassicToMachineList); -// private static final short[] casingTextures = new short[]{49}; -// private static final Block[] blockTypeFallback = new Block[]{sBlockCasings4}; -// private static final byte[] blockMetaFallback = new byte[]{1}; - //endregion //region parameters @@ -119,7 +102,6 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); return structureCheck_EM("main", 2, 2, 0); } @@ -268,7 +250,6 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - //Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java index eeb89f6812..19701b69b3 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java @@ -145,32 +145,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock Vec3Impl xyzOffsets = getExtendedFacing().getWorldOffset(new Vec3Impl(0, -1, 1)); return this.getBaseMetaTileEntity().getMetaIDOffset(xyzOffsets.get0(), xyzOffsets.get1(), xyzOffsets.get2()); } - -// private static final String[][] shape = new String[][]{//3 16 0 -// {"\u000F", "A . ",}, -// {E, "B000", "B000", "B000", "\u0001", "B000", E, "B000", E, "B000", E, "B000", "\u0001", "B111", " 22222 ",}, -// {"B000", "A00000", "A00000", "A00000", "B000", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", "\u0001", "A1C1", " 21112 ",}, -// {"B000", "A00000", "A00000", "A00000", "B030", "C3", "A0!3!0", "C3", "A0!3!0", "C3", "A0!3!0", "C3", "A0!3!0", "C3", "C3", "A1A3A1", " 21212 ",}, -// {"B000", "A00000", "A00000", "A00000", "B000", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", "\u0001", "A1C1", " 21112 ",}, -// {E, "B000", "B000", "B000", "\u0001", "B000", E, "B000", E, "B000", E, "B000", "\u0001", "B111", " 22222 ",}, -// {"\u000F", "A ",}, -// }; -// private static final Block[] blockType = new Block[]{sBlockCasingsBA0, sBlockCasingsBA0, sBlockCasingsBA0, sBlockCasingsBA0}; -// private static final byte[] blockMetaT0 = new byte[]{7, 0, 6, 8}; -// private static final byte[] blockMetaT1 = new byte[]{7, 1, 6, 8}; -// private static final byte[] blockMetaT2 = new byte[]{7, 2, 6, 8}; -// private static final byte[] blockMetaT3 = new byte[]{7, 3, 6, 8}; -// private static final byte[] blockMetaT4 = new byte[]{7, 4, 6, 8}; -// private static final byte[] blockMetaT5 = new byte[]{7, 5, 6, 8}; -// private static final byte[] blockMetaT6 = new byte[]{7, 9, 6, 8}; -// private static final byte[][] blockMetas = new byte[][]{blockMetaT0, blockMetaT1, blockMetaT2, blockMetaT3, blockMetaT4, blockMetaT5, blockMetaT6}; -// private static final IGT_HatchAdder[] addingMethods = adders( -// GT_MetaTileEntity_TM_teslaCoil::addCapacitorToMachineList, -// GT_MetaTileEntity_TM_teslaCoil::addFrameToMachineList); -// private static final short[] casingTextures = new short[]{(texturePage << 7) + 16 + 6, 0}; -// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsBA0, null}; -// private static final byte[] blockMetaFallback = new byte[]{6, 0}; - //endregion //region parameters @@ -390,7 +364,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock mTier = 6; }//Hacky remap because the ZPM coils were added later - //if (structureCheck_EM(shape, blockType, blockMetas[mTier], addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 3, 16, 0) && eCapacitorHatches.size() > 0) { if (structureCheck_EM("main", 3, 16, 0)) { for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) { if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { @@ -734,7 +707,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - //Structure.builder(shape, blockType, blockMetas[(stackSize.stackSize - 1) % 7], 3, 16, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); structureBuild_EM("main", 3, 16, 0, hintsOnly, stackSize); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java index 85ac8c1623..5ae2d05b14 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java @@ -68,24 +68,6 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa .addElement('E', ofBlock(QuantumGlassBlock.INSTANCE, 0)) .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_machine::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4)) .build(); - -// private static final String[][] shape = new String[][]{ -// {"B0", "A ", "0 - 0", "A ", "B0",}, -// {"A000", "00000", "00.00", "00000", "A000",}, -// {"A121", "1---1", "2---2", "1---1", "A121",}, -// {"A131", "1---1", "3-A-3", "1---1", "A131",}, -// {"A121", "1---1", "2---2", "1---1", "A121",}, -// {"A000", "00000", "00-00", "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 IHatchAdder[] addingMethods = adders( -// GT_MetaTileEntity_EM_machine::addClassicToMachineList, -// GT_MetaTileEntity_EM_machine::addElementalToMachineList); -// private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; -// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; -// private static final byte[] blockMetaFallback = new byte[]{0, 4}; - //endregion //region parameters @@ -215,7 +197,6 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 1); return structureCheck_EM("main", 2, 2, 1); } @@ -380,7 +361,6 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - //Structure.builder(shape, blockType, blockMeta, 2, 2, 1, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); structureBuild_EM("main", 2, 2, 1, hintsOnly, stackSize); } -- cgit From 9763950732e7f4e73f19eb2744405d7a6a3e9073 Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 9 Sep 2021 23:21:23 -0700 Subject: optimized imports --- .../multi/GT_MetaTileEntity_EM_essentiaDequantizer.java | 7 ------- .../multi/GT_MetaTileEntity_EM_essentiaQuantizer.java | 7 ------- .../multi/GT_MetaTileEntity_EM_annihilation.java | 5 ++--- .../metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java | 1 - .../multi/GT_MetaTileEntity_EM_computer.java | 4 ---- .../multi/GT_MetaTileEntity_EM_crafting.java | 3 --- .../multi/GT_MetaTileEntity_EM_dataBank.java | 4 ---- .../metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java | 4 ---- .../multi/GT_MetaTileEntity_EM_dequantizer.java | 10 ++++------ .../multi/GT_MetaTileEntity_EM_infuser.java | 3 --- .../multi/GT_MetaTileEntity_EM_junction.java | 6 ------ .../multi/GT_MetaTileEntity_EM_quantizer.java | 3 --- .../multi/GT_MetaTileEntity_EM_research.java | 8 ++------ .../multi/GT_MetaTileEntity_EM_scanner.java | 1 - .../multi/GT_MetaTileEntity_EM_stabilizer.java | 4 ---- .../metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java | 3 --- .../multi/GT_MetaTileEntity_EM_transformer.java | 4 ++-- .../multi/GT_MetaTileEntity_EM_wormhole.java | 4 ---- .../multi/GT_MetaTileEntity_TM_microwave.java | 3 --- .../multi/GT_MetaTileEntity_TM_proccessingStack.java | 15 --------------- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 8 +------- .../multi/em_machine/GT_MetaTileEntity_EM_machine.java | 4 ---- 22 files changed, 11 insertions(+), 100 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java index d77502fcc3..8e8aee4795 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java @@ -4,11 +4,8 @@ import com.github.technus.tectech.TecTech; import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.ePrimalAspectDefinition; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.casing.TT_Container_Casings; -import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_dequantizer; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_quantizer; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.util.CommonValues; @@ -19,8 +16,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.IGT_HatchAdder; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -29,12 +24,10 @@ import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.util.ForgeDirection; import static com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity.multi.EssentiaCompat.essentiaContainerCompat; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.util.CommonValues.V; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.enums.GT_Values.E; import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java index 332f162025..1e23408a0b 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java @@ -4,8 +4,6 @@ import com.github.technus.tectech.TecTech; import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.ePrimalAspectDefinition; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.casing.TT_Container_Casings; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_quantizer; @@ -18,8 +16,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.IGT_HatchAdder; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -28,13 +24,10 @@ import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.util.ForgeDirection; import static com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity.multi.EssentiaCompat.essentiaContainerCompat; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; -import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsNH; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.util.CommonValues.V; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.enums.GT_Values.E; import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; 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 4510294f63..05829c89e4 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 @@ -20,9 +20,8 @@ import net.minecraft.util.EnumChatFormatting; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; -import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sHintCasingsTT; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java index 0ed2b38c19..448c930351 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java @@ -24,7 +24,6 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileE import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_decay.URANIUM_MASS_TO_EU_INSTANT; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_Values.E; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; 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 16167b74a2..31d41fb39e 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 @@ -22,8 +22,6 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.util.IGT_HatchAdder; -import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; @@ -31,10 +29,8 @@ import net.minecraft.util.ResourceLocation; import java.util.ArrayList; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; -import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsNH; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static com.github.technus.tectech.util.CommonValues.MULTI_CHECK_AT; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java index ad72a069a9..9c631c8af6 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java @@ -13,13 +13,10 @@ 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.util.IGT_HatchAdder; -import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java index 54d936fe0c..bea2b8a0ba 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java @@ -20,8 +20,6 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess; -import gregtech.api.util.IGT_HatchAdder; -import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; @@ -29,7 +27,6 @@ import net.minecraft.util.ResourceLocation; import java.util.ArrayList; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; @@ -37,7 +34,6 @@ import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBloc import static com.github.technus.tectech.util.CommonValues.V; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; 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 62187f750d..b3a8e52bbf 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 @@ -21,10 +21,8 @@ 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_MultiBlockBase; -import gregtech.api.util.IGT_HatchAdder; import ic2.core.init.MainConfig; import ic2.core.util.ConfigUtil; -import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -33,8 +31,6 @@ import net.minecraft.util.EnumChatFormatting; import org.apache.commons.lang3.reflect.FieldUtils; import static com.github.technus.tectech.mechanics.elementalMatter.core.transformations.bTransformationInfo.AVOGADRO_CONSTANT; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; -import static com.github.technus.tectech.mechanics.structure.Structure.builder; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; 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 74ff85c698..f0dca07f9c 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 @@ -7,7 +7,6 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.transformations import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aItemDequantizationInfo; import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aOredictDequantizationInfo; import com.github.technus.tectech.thing.block.QuantumGlassBlock; -import com.github.technus.tectech.thing.casing.GT_Block_HintTT; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.util.CommonValues; @@ -18,8 +17,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.IGT_HatchAdder; -import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; @@ -31,11 +28,12 @@ import java.util.ArrayList; import static com.github.technus.tectech.mechanics.elementalMatter.core.templates.iElementalDefinition.STABLE_RAW_LIFE_TIME; import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.refMass; import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.refUnstableMass; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; -import static com.github.technus.tectech.thing.casing.TT_Container_Casings.*; +import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; +import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sHintCasingsTT; import static com.github.technus.tectech.util.CommonValues.V; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; 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 ec9cbcdb13..18416e70f6 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 @@ -14,10 +14,8 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.IGT_HatchAdder; import ic2.api.item.ElectricItem; import ic2.api.item.IElectricItem; -import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -25,7 +23,6 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; 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 3860f25701..53cf072293 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 @@ -1,6 +1,5 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; -import com.github.technus.tectech.mechanics.structure.Structure; 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 com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; @@ -11,22 +10,17 @@ import com.github.technus.tectech.util.CommonValues; import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import com.gtnewhorizon.structurelib.structure.StructureUtility; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; -import gregtech.api.util.IGT_HatchAdder; -import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static com.github.technus.tectech.util.CommonValues.V; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.enums.GT_Values.E; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; 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 62e3aca008..5b6b2c18e7 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 @@ -20,8 +20,6 @@ import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.IGT_HatchAdder; -import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; @@ -35,7 +33,6 @@ import static com.github.technus.tectech.mechanics.elementalMatter.core.template import static com.github.technus.tectech.mechanics.elementalMatter.core.templates.iElementalDefinition.STABLE_RAW_LIFE_TIME; import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.refMass; import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.refUnstableMass; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.recipe.TT_recipeAdder.nullFluid; import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; 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 959004bba4..9f3068aca8 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 @@ -22,11 +22,8 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockB import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; -import gregtech.api.util.IGT_HatchAdder; -import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; @@ -37,7 +34,6 @@ import org.apache.commons.lang3.reflect.FieldUtils; import java.util.ArrayList; import java.util.LinkedHashMap; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.recipe.TT_recipe.E_RECIPE_ID; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; @@ -46,8 +42,8 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileE import static com.github.technus.tectech.thing.metaTileEntity.multi.em_machine.GT_MetaTileEntity_EM_machine.machine; import static com.github.technus.tectech.util.CommonValues.V; import static com.github.technus.tectech.util.CommonValues.VN; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static gregtech.api.enums.GT_Values.E; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; 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 8466069d99..20f4fd5d28 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 @@ -36,7 +36,6 @@ import org.apache.commons.lang3.reflect.FieldUtils; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.cPrimitiveDefinition.nbtE__; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.recipe.TT_recipe.E_RECIPE_ID; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; 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 0569d7533e..0ff238e4c3 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,19 +2,15 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; -import com.github.technus.tectech.thing.metaTileEntity.multi.em_machine.GT_MetaTileEntity_EM_machine; import com.github.technus.tectech.util.CommonValues; import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.StructureDefinition; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.IGT_HatchAdder; -import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java index 19ec588bc5..1ca125977d 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java @@ -20,13 +20,10 @@ 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.util.IGT_HatchAdder; -import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java index ea3d79443a..b2f7da7bc3 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java @@ -20,13 +20,13 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sHintCasingsTT; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; import static gregtech.api.GregTech_API.sBlockCasings1; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; import static net.minecraft.util.StatCollector.translateToLocal; /** 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 0b74d36c78..7b85d3406a 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 @@ -13,19 +13,15 @@ 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.util.IGT_HatchAdder; -import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_Values.E; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java index 1dfbc7c1d4..b99ed26f5b 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java @@ -14,8 +14,6 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; -import gregtech.api.util.IGT_HatchAdder; -import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; @@ -28,7 +26,6 @@ import java.util.ArrayList; import java.util.HashSet; import static com.github.technus.tectech.loader.MainLoader.microwaving; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java index 2d64e608c5..3a1a5a5418 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java @@ -1,25 +1,10 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_Container_MultiMachineEM; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_GUIContainer_MultiMachineEM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; -import com.github.technus.tectech.util.CommonValues; -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.util.GT_Utility; -import net.minecraft.block.Block; -import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; - -import static com.github.technus.tectech.mechanics.structure.Structure.adders; -import static gregtech.api.GregTech_API.sBlockCasings4; -import static net.minecraft.util.StatCollector.translateToLocal; @Deprecated public class GT_MetaTileEntity_TM_proccessingStack extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java index 19701b69b3..a1e871adf4 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java @@ -29,21 +29,16 @@ 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.BaseMetaTileEntity; import gregtech.api.metatileentity.implementations.*; -import gregtech.api.util.IGT_HatchAdder; -import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import java.util.ArrayList; import java.util.HashSet; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.mechanics.tesla.ITeslaConnectable.TeslaUtil.*; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; @@ -51,10 +46,9 @@ import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBloc import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static com.github.technus.tectech.util.CommonValues.V; import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static gregtech.api.enums.GT_Values.E; import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; -import static java.lang.Math.*; +import static java.lang.Math.min; import static net.minecraft.util.StatCollector.translateToLocal; public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable, ITeslaConnectable { diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java index 5ae2d05b14..a43bf2b128 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java @@ -3,11 +3,8 @@ package com.github.technus.tectech.thing.metaTileEntity.multi.em_machine; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.block.QuantumStuffBlock; -import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_computer; import com.github.technus.tectech.thing.metaTileEntity.multi.base.*; import com.github.technus.tectech.util.CommonValues; import com.github.technus.tectech.util.Util; @@ -26,7 +23,6 @@ import net.minecraftforge.common.util.ForgeDirection; import java.util.HashMap; import java.util.function.Supplier; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; -- cgit From 838021277e8a585975ce3f602997ce238ad744d9 Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 10 Sep 2021 05:26:15 -0700 Subject: made requested changes --- .../thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java index a1e871adf4..c8e7f90675 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java @@ -46,8 +46,7 @@ import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBloc import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static com.github.technus.tectech.util.CommonValues.V; import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; +import static gregtech.api.util.GT_StructureUtility.*; import static java.lang.Math.min; import static net.minecraft.util.StatCollector.translateToLocal; @@ -130,9 +129,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock .addElement('A', ofBlock(sBlockCasingsBA0, 6)) .addElement('B', ofBlock(sBlockCasingsBA0, 7)) .addElement('C', ofBlock(sBlockCasingsBA0, 8)) - .addElement('D', lazy(t -> ofBlock(sBlockCasingsBA0, t.getCoilWindingMeta()))) + .addElement('D', defer(t -> ofBlock(sBlockCasingsBA0, t.getCoilWindingMeta()))) .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_TM_teslaCoil::addCapacitorToMachineList, textureOffset + 16 + 6, 1, sBlockCasingsBA0, 6)) - .addElement('F', ofHatchAdder(GT_MetaTileEntity_TM_teslaCoil::addFrameToMachineList, 0, 2)) + .addElement('F', ofFrame(Materials.get("Titanium"))) .build(); public int getCoilWindingMeta() { -- cgit From 32165c5d1aaf731044bc3ab4f87746d430ed70a5 Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 10 Sep 2021 05:37:49 -0700 Subject: made requested changes --- .../thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java index c8e7f90675..cbc20143b3 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java @@ -102,7 +102,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.hint.0"),//1 - Classic Hatches, Capacitor Hatches or Tesla Base Casing - translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.hint.1"),//2 - Titanium Frames }; private static final IStructureDefinition STRUCTURE_DEFINITION = -- cgit From 68923e9a5468506b9cfcfb7da4ca4078a6fe6229 Mon Sep 17 00:00:00 2001 From: GlodBlock <60341015+GlodBlock@users.noreply.github.com> Date: Sat, 18 Sep 2021 16:03:34 +0800 Subject: fix `NoClassDefFoundError` spam --- .../multi/base/GT_MetaTileEntity_MultiblockBase_EM.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java index 49d5eaf2f3..5e56f531bf 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java @@ -2,22 +2,18 @@ package com.github.technus.tectech.thing.metaTileEntity.multi.base; import com.github.technus.tectech.Reference; import com.github.technus.tectech.TecTech; -import com.github.technus.tectech.loader.NetworkDispatcher; import com.github.technus.tectech.mechanics.structure.Structure; import com.gtnewhorizon.structurelib.StructureLibAPI; -import com.gtnewhorizon.structurelib.alignment.AlignmentMessage; import com.gtnewhorizon.structurelib.alignment.IAlignment; import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; import com.gtnewhorizon.structurelib.alignment.IAlignmentProvider; import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; import com.gtnewhorizon.structurelib.alignment.enumerable.Flip; import com.gtnewhorizon.structurelib.alignment.enumerable.Rotation; -import com.gtnewhorizon.structurelib.structure.StructureUtility; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.util.Vec3Impl; import cpw.mods.fml.common.network.NetworkRegistry; -import gregtech.api.util.GT_StructureUtility; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalDefinitionStack; @@ -1105,7 +1101,9 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt public final void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { isFacingValid(aBaseMetaTileEntity.getFrontFacing()); if (getBaseMetaTileEntity().isClientSide()) { - NetworkDispatcher.INSTANCE.sendToServer(new AlignmentMessage.AlignmentQuery(this)); + StructureLibAPI.sendAlignment((IAlignmentProvider) aBaseMetaTileEntity, + new NetworkRegistry.TargetPoint(aBaseMetaTileEntity.getWorld().provider.dimensionId, + aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(), 512)); } onFirstTick_EM(aBaseMetaTileEntity); } -- cgit From 9512c2657c73a24c0ce7caf5e78f2318d160892c Mon Sep 17 00:00:00 2001 From: GlodBlock <60341015+GlodBlock@users.noreply.github.com> Date: Sat, 18 Sep 2021 17:49:07 +0800 Subject: change as requested --- .../multi/base/GT_MetaTileEntity_MultiblockBase_EM.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java index 5e56f531bf..a0755b947b 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java @@ -48,8 +48,6 @@ import net.minecraftforge.fluids.FluidStack; import java.util.ArrayList; -import static gregtech.api.util.GT_StructureUtility.*; - import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.util.CommonValues.*; @@ -1101,9 +1099,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt public final void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { isFacingValid(aBaseMetaTileEntity.getFrontFacing()); if (getBaseMetaTileEntity().isClientSide()) { - StructureLibAPI.sendAlignment((IAlignmentProvider) aBaseMetaTileEntity, - new NetworkRegistry.TargetPoint(aBaseMetaTileEntity.getWorld().provider.dimensionId, - aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(), 512)); + StructureLibAPI.queryAlignment((IAlignmentProvider) aBaseMetaTileEntity); } onFirstTick_EM(aBaseMetaTileEntity); } -- cgit From 8c882a8d5d6ff47ebe72345ebfd3e8759eb88a3f Mon Sep 17 00:00:00 2001 From: Prometheus0000 Date: Mon, 20 Sep 2021 19:13:41 -0400 Subject: Fixes silicone --- .../dreamcraft/DreamCraftRecipeLoader.java | 28 ++++++++-------------- 1 file changed, 10 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java index b679d3cff8..ef15a9d55b 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java @@ -711,7 +711,7 @@ public class DreamCraftRecipeLoader implements Runnable { new FluidStack(FluidRegistry.getFluid("ic2coolant"), 2000), }, CustomItemList.Machine_Multi_Infuser.get(1), 8000, 2000000); - //Motor UV-UHV + //Motor UHV-UEV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Electric_Motor_UV.get(1L), 24000, 32, 100000, 4, new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.SamariumMagnetic, 4L), @@ -750,7 +750,7 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(5184), Materials.Lubricant.getFluid(8000)}, ItemList.Electric_Motor_UEV.get(1L), 2000, 800000); - //Pumps UV-UHV + //Pumps UHV-UEV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Electric_Pump_UV.get(1L), 24000, 32, 100000, 4, new Object[]{ ItemList.Electric_Motor_UHV.get(1L), @@ -777,7 +777,7 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(5184), Materials.Lubricant.getFluid(8000)}, ItemList.Electric_Pump_UEV.get(1), 2000, 800000); - //Conveyor Belt UV-UHV + //Conveyor Belt UHV-UEV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Conveyor_Module_UV.get(1L), 24000, 32, 100000, 4, new Object[]{ ItemList.Electric_Motor_UHV.get(2L), @@ -801,10 +801,9 @@ public class DreamCraftRecipeLoader implements Runnable { new Object[]{OrePrefixes.plate.get(Materials.AnySyntheticRubber), 16L}}, new FluidStack[]{ Materials.Quantium.getMolten(2592), Materials.SolderingAlloy.getMolten(5184), - Materials.Lubricant.getFluid(8000), - Materials.Silicone.getMolten(11520)}, ItemList.Conveyor_Module_UEV.get(1), 2000, 800000); + Materials.Lubricant.getFluid(8000)}, ItemList.Conveyor_Module_UEV.get(1), 2000, 800000); - //Piston UV-UHV + //Piston UHV-UEV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Electric_Piston_UV.get(1L), 24000, 32, 100000, 4, new ItemStack[]{ ItemList.Electric_Motor_UHV.get(1L), @@ -833,7 +832,7 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(5184), Materials.Lubricant.getFluid(8000)}, ItemList.Electric_Piston_UEV.get(1), 2000, 800000); - //Robot Arm UV-UHV + //Robot Arm UHV-UEV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Robot_Arm_UV.get(1L), 24000, 32, 100000, 4, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.CosmicNeutronium, 8L), @@ -864,7 +863,7 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(9216), Materials.Lubricant.getFluid(8000)}, ItemList.Robot_Arm_UEV.get(1L), 2000, 800000); - //Emitter UV-UHV + //Emitter UHV-UEV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Emitter_UV.get(1L), 24000, 32, 100000, 4, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.CosmicNeutronium, 1L), @@ -897,7 +896,7 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(9216)}, ItemList.Emitter_UEV.get(1L), 2000, 800000); - //Sensor UV-UHV + //Sensor UHV-UEV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Sensor_UV.get(1L), 24000, 32, 100000, 4, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.CosmicNeutronium, 1L), @@ -930,7 +929,7 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(9216)}, ItemList.Sensor_UEV.get(1L), 2000, 800000); - //Fieldgen UV and UHV + //Fieldgen UHV and UEV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Field_Generator_UV.get(1), 48000, 64, 200000, 8, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.CosmicNeutronium, 1L), @@ -973,7 +972,7 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(9216)}, ItemList.Field_Generator_UEV.get(1L), 4000, 800000); - //UHV Energy Hatch & Dynamo + //UHV-UMV Energy Hatch & Dynamo TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Hatch_Energy_UV.get(1L), 24000, 16, 50000, 2, new Object[]{ ItemList.Hull_MAX.get(1L), @@ -995,7 +994,6 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(5760), }, ItemList.Hatch_Energy_MAX.get(1L), 1000, 2000000); - //UHV Dynamo Hatch TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Hatch_Dynamo_UV.get(1L), 48000, 32, 100000, 4, new Object[]{ ItemList.Hull_MAX.get(1L), @@ -1017,7 +1015,6 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(5760)}, ItemList.Hatch_Dynamo_MAX.get(1L), 1000, 2000000); - //UEV Energy Hatch TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Hatch_Energy_MAX.get(1L), 48000, 32, 100000, 4, new Object[]{ getItemContainer("Hull_UEV").get(1L), @@ -1035,7 +1032,6 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.UUMatter.getFluid(8000L)}, getItemContainer("Hatch_Energy_UEV").get(1L), 1000, 8000000); - //UEV Dynamo Hatch TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Hatch_Dynamo_MAX.get(1L), 96000, 64, 200000, 8, new Object[]{ getItemContainer("Hull_UEV").get(1L), @@ -1053,7 +1049,6 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.UUMatter.getFluid(8000L)}, getItemContainer("Hatch_Dynamo_UEV").get(1L), 1000, 8000000); - //UIV Energy Hatch TT_recipeAdder.addResearchableAssemblylineRecipe(getItemContainer("Hatch_Energy_UEV").get(1L), 96000, 64, 200000, 8, new Object[]{ getItemContainer("Hull_UIV").get(1L), @@ -1074,7 +1069,6 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.UUMatter.getFluid(16000L)}, getItemContainer("Hatch_Energy_UIV").get(1L), 1000, 16000000); - //UIV Dynamo Hatch TT_recipeAdder.addResearchableAssemblylineRecipe(getItemContainer("Hatch_Dynamo_UEV").get(1L), 192000, 128, 400000, 16, new Object[]{ getItemContainer("Hull_UIV").get(1L), @@ -1095,7 +1089,6 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.UUMatter.getFluid(16000L)}, getItemContainer("Hatch_Dynamo_UIV").get(1L), 1000, 16000000); - //UMV Energy Hatch TT_recipeAdder.addResearchableAssemblylineRecipe(getItemContainer("Hatch_Energy_UIV").get(1L), 192000, 128, 400000, 16, new Object[]{ getItemContainer("Hull_UMV").get(1L), @@ -1119,7 +1112,6 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.UUMatter.getFluid(32000L)}, getItemContainer("Hatch_Energy_UMV").get(1L), 1000, 32000000); - //UMV Dynamo Hatch TT_recipeAdder.addResearchableAssemblylineRecipe(getItemContainer("Hatch_Dynamo_UIV").get(1L), 384000, 256, 800000, 32, new Object[]{ getItemContainer("Hull_UMV").get(1L), -- cgit From 4e776b2f63e22c6f65f39972d34f9928615c440c Mon Sep 17 00:00:00 2001 From: glowredman <35727266+glowredman@users.noreply.github.com> Date: Wed, 13 Oct 2021 17:58:30 +0000 Subject: Fix UXV Multi Amp Dynamo Hatch Names --- src/main/resources/assets/tectech/lang/en_US.lang | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index 668f010410..adec911faa 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -313,9 +313,9 @@ gt.blockmachines.hatch.dynamomulti64.tier.11.name=UIV 64A Dynamo Hatch gt.blockmachines.hatch.dynamomulti04.tier.12.name=UMV 4A Dynamo Hatch gt.blockmachines.hatch.dynamomulti16.tier.12.name=UMV 16A Dynamo Hatch gt.blockmachines.hatch.dynamomulti64.tier.12.name=UMV 64A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti04.tier.13.name=IV 4A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti16.tier.13.name=IV 16A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti64.tier.13.name=IV 64A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti04.tier.13.name=UXV 4A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti16.tier.13.name=UXV 16A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti64.tier.13.name=UXV 64A Dynamo Hatch gt.blockmachines.hatch.dynamomulti.desc.0=Multiple Ampere Energy Extractor for Multiblocks gt.blockmachines.hatch.dynamomulti.desc.1=Amperes Out -- cgit From fbe8484b9975e2b68285084936f91fb070c64d6d Mon Sep 17 00:00:00 2001 From: Glease <4586901+Glease@users.noreply.github.com> Date: Mon, 18 Oct 2021 15:25:26 +0800 Subject: Fix cycle in class initialization order ExtendedFacing depends on IAlignment being fully initialized to be instantiated as part of its class initializer, which in turn require ExtendedFacing to be fully initialized to complete class initialization. How does this even work before? --- .../tectech/mechanics/alignment/enumerable/ExtendedFacing.java | 6 +++--- .../github/technus/tectech/mechanics/alignment/enumerable/Flip.java | 1 + .../technus/tectech/mechanics/alignment/enumerable/Rotation.java | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java index 04f2a55bd5..8e384e098c 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java @@ -138,9 +138,9 @@ public enum ExtendedFacing { ExtendedFacing(String name) { this.name = name; - direction= Direction.VALUES[ordinal()/(ROTATIONS_COUNT*FLIPS_COUNT)].getForgeDirection(); - rotation=Rotation.VALUES[ordinal()/FLIPS_COUNT-direction.ordinal()*ROTATIONS_COUNT]; - flip=Flip.VALUES[ordinal()%FLIPS_COUNT]; + direction= Direction.VALUES[ordinal()/(Rotation.COUNT*Flip.COUNT)].getForgeDirection(); + rotation=Rotation.VALUES[ordinal()/Flip.COUNT-direction.ordinal()*Rotation.COUNT]; + flip=Flip.VALUES[ordinal()%Flip.COUNT]; ForgeDirection a,b,c; switch (direction){ case DOWN: diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Flip.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Flip.java index 0b85c5197e..400f94f869 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Flip.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Flip.java @@ -20,6 +20,7 @@ public enum Flip { private final String name; public static final Flip[] VALUES = values(); + public static final int COUNT = VALUES.length; private static final Map NAME_LOOKUP = stream(VALUES).collect(toMap(Flip::getName2, (flip) -> flip)); Flip(int oppositeIn, String nameIn) { diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Rotation.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Rotation.java index b6cd1aa015..ed4872828a 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Rotation.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Rotation.java @@ -20,6 +20,7 @@ public enum Rotation { private final String name; public static final Rotation[] VALUES = values(); + public static final int COUNT = VALUES.length; private static final Map NAME_LOOKUP = stream(VALUES).collect(toMap(Rotation::getName2, (rotation) -> rotation)); Rotation(int oppositeIn, String nameIn) { -- cgit From 5a160bdd841a52007a9972f7f2a14eb108ec3ae1 Mon Sep 17 00:00:00 2001 From: DreamMasterXXL Date: Mon, 18 Oct 2021 21:04:12 +0200 Subject: remove blueprint recipe. It has no use anymore use structurelib blueprint instead --- .../java/com/github/technus/tectech/loader/recipe/RecipeLoader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/loader/recipe/RecipeLoader.java b/src/main/java/com/github/technus/tectech/loader/recipe/RecipeLoader.java index 5a153ce5f8..a2e2f65384 100644 --- a/src/main/java/com/github/technus/tectech/loader/recipe/RecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/recipe/RecipeLoader.java @@ -55,10 +55,10 @@ public class RecipeLoader implements Runnable { 'S', OrePrefixes.stick.get(Materials.Wood),}); //BLUEprint - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(ConstructableTriggerItem.INSTANCE, 1), + /*GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(ConstructableTriggerItem.INSTANCE, 1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{Dyes.dyeBlue, OrePrefixes.plate.get(Materials.Paper), Dyes.dyeBlue, Dyes.dyeWhite}); - + */ //GT EU reader GT_ModHandler.addCraftingRecipe(new ItemStack(EuMeterGT.INSTANCE,1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, -- cgit From 106ed318dad013382092ba05eed41c345be52651 Mon Sep 17 00:00:00 2001 From: Prometheus0000 Date: Mon, 18 Oct 2021 18:20:06 -0400 Subject: Change to make it divisible by 144 --- .../compatibility/dreamcraft/DreamCraftRecipeLoader.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java index ef15a9d55b..ba72375f80 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java @@ -260,9 +260,9 @@ public class DreamCraftRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Transformer_UIV_UEV").get(1), CustomItemList.eM_dynamoMulti4_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Bedrockium", Materials.Neutronium), 4)}, Materials.Electrum.getMolten(4608), CustomItemList.eM_dynamoMulti16_UEV.get(1), 200, 2000000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("WetTransformer_UIV_UEV").get(1), CustomItemList.eM_dynamoMulti16_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Bedrockium", Materials.Neutronium), 6)}, Materials.Tungsten.getMolten(4608), CustomItemList.eM_dynamoMulti64_UEV.get(1), 400, 2000000); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hatch_Dynamo_UIV").get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("BlackPlutonium", Materials.Neutronium), 2)}, Materials.Silver.getMolten(8000), CustomItemList.eM_dynamoMulti4_UIV.get(1), 100, 8000000); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Transformer_UMV_UIV").get(1), CustomItemList.eM_dynamoMulti4_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("BlackPlutonium", Materials.Neutronium), 4)}, Materials.Electrum.getMolten(8000), CustomItemList.eM_dynamoMulti16_UIV.get(1), 200, 8000000); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("WetTransformer_UMV_UIV").get(1), CustomItemList.eM_dynamoMulti16_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("BlackPlutonium", Materials.Neutronium), 6)}, Materials.Tungsten.getMolten(8000), CustomItemList.eM_dynamoMulti64_UIV.get(1), 400, 8000000); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hatch_Dynamo_UIV").get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("BlackPlutonium", Materials.Neutronium), 2)}, Materials.Silver.getMolten(9216), CustomItemList.eM_dynamoMulti4_UIV.get(1), 100, 8000000); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Transformer_UMV_UIV").get(1), CustomItemList.eM_dynamoMulti4_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("BlackPlutonium", Materials.Neutronium), 4)}, Materials.Electrum.getMolten(9216), CustomItemList.eM_dynamoMulti16_UIV.get(1), 200, 8000000); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("WetTransformer_UMV_UIV").get(1), CustomItemList.eM_dynamoMulti16_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("BlackPlutonium", Materials.Neutronium), 6)}, Materials.Tungsten.getMolten(9216), CustomItemList.eM_dynamoMulti64_UIV.get(1), 400, 8000000); //Energy Hatches IV-UIV GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hatch_Energy_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Tungsten, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 2)}, Materials.Silver.getMolten(144), CustomItemList.eM_energyMulti4_IV.get(1), 100, 1920); @@ -289,9 +289,9 @@ public class DreamCraftRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Transformer_UIV_UEV").get(1), CustomItemList.eM_energyMulti4_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Bedrockium", Materials.Neutronium), 4)}, Materials.Electrum.getMolten(4608), CustomItemList.eM_energyMulti16_UEV.get(1), 200, 2000000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("WetTransformer_UIV_UEV").get(1), CustomItemList.eM_energyMulti16_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Bedrockium", Materials.Neutronium), 6)}, Materials.Tungsten.getMolten(4608), CustomItemList.eM_energyMulti64_UEV.get(1), 400, 2000000); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hatch_Energy_UIV").get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("BlackPlutonium", Materials.Neutronium), 2)}, Materials.Silver.getMolten(8000), CustomItemList.eM_energyMulti4_UIV.get(1), 100, 8000000); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Transformer_UMV_UIV").get(1), CustomItemList.eM_energyMulti4_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("BlackPlutonium", Materials.Neutronium), 4)}, Materials.Electrum.getMolten(8000), CustomItemList.eM_energyMulti16_UIV.get(1), 200, 8000000); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("WetTransformer_UMV_UIV").get(1), CustomItemList.eM_energyMulti16_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("BlackPlutonium", Materials.Neutronium), 6)}, Materials.Tungsten.getMolten(8000), CustomItemList.eM_energyMulti64_UIV.get(1), 400, 8000000); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hatch_Energy_UIV").get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("BlackPlutonium", Materials.Neutronium), 2)}, Materials.Silver.getMolten(9216), CustomItemList.eM_energyMulti4_UIV.get(1), 100, 8000000); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Transformer_UMV_UIV").get(1), CustomItemList.eM_energyMulti4_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("BlackPlutonium", Materials.Neutronium), 4)}, Materials.Electrum.getMolten(9216), CustomItemList.eM_energyMulti16_UIV.get(1), 200, 8000000); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("WetTransformer_UMV_UIV").get(1), CustomItemList.eM_energyMulti16_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("BlackPlutonium", Materials.Neutronium), 6)}, Materials.Tungsten.getMolten(9216), CustomItemList.eM_energyMulti64_UIV.get(1), 400, 8000000); //Buck Converter IV-UIV if (Loader.isModLoaded("bartworks")) { -- cgit From 6228969677376c721923efc47d6f205ed3a5498d Mon Sep 17 00:00:00 2001 From: "[Kiwi233]" <[huaxia0611@qq.com]> Date: Sun, 31 Oct 2021 11:43:05 +0800 Subject: Update zh_CN.lang --- src/main/resources/assets/tectech/lang/zh_CN.lang | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/main/resources/assets/tectech/lang/zh_CN.lang b/src/main/resources/assets/tectech/lang/zh_CN.lang index 72fc8845b5..2d594ffb8e 100644 --- a/src/main/resources/assets/tectech/lang/zh_CN.lang +++ b/src/main/resources/assets/tectech/lang/zh_CN.lang @@ -50,8 +50,8 @@ item.em.EuMeterGT.desc.1=只需右键方块. item.em.frontRotate.name=正面旋转扳手 item.em.frontRotate.desc.0=触发正面旋转界面 -item.em.frontRotate.desc.1=仅旋转前面板, -item.em.frontRotate.desc.2=允许结构旋转. +item.em.frontRotate.desc.1=可以旋转多方块控制器, +item.em.frontRotate.desc.2=从而使整个结构可以旋转. item.em.parametrizerMemoryCard.name=数据化储存卡 item.em.parametrizerMemoryCard.desc.0=存储参数 @@ -313,9 +313,9 @@ gt.blockmachines.hatch.dynamomulti64.tier.11.name=64安UIV动力仓 gt.blockmachines.hatch.dynamomulti04.tier.12.name=4安UMV动力仓 gt.blockmachines.hatch.dynamomulti16.tier.12.name=16安UMV动力仓 gt.blockmachines.hatch.dynamomulti64.tier.12.name=64安UMV动力仓 -gt.blockmachines.hatch.dynamomulti04.tier.13.name=4安IV动力仓 -gt.blockmachines.hatch.dynamomulti16.tier.13.name=16安IV动力仓 -gt.blockmachines.hatch.dynamomulti64.tier.13.name=64安IV动力仓 +gt.blockmachines.hatch.dynamomulti04.tier.13.name=4安UXV动力仓 +gt.blockmachines.hatch.dynamomulti16.tier.13.name=16安UXV动力仓 +gt.blockmachines.hatch.dynamomulti64.tier.13.name=64安UXV动力仓 gt.blockmachines.hatch.dynamomulti.desc.0=从多方块机器以高电流输出能源 gt.blockmachines.hatch.dynamomulti.desc.1=输出电流 @@ -875,4 +875,3 @@ tt.keyphrase.Side_capabilities=辅助功能 #OpenTurrets compatibility tile.turretHeadEM.name=元物质炮塔 tile.turretBaseEM.name=元物质炮塔基座 -© 2021 GitHub, Inc. -- cgit From 1c8fd630d6654098d1820ee437d390a06e33faa0 Mon Sep 17 00:00:00 2001 From: Johann Bernhardt Date: Wed, 8 Dec 2021 14:11:35 +0100 Subject: Unify build script --- .github/scripts/test-no-crash-reports.sh | 9 + .github/workflows/build-and-test.yml | 45 ++ .github/workflows/release-tags.yml | 45 ++ .gitignore | 62 +-- addon.gradle | 14 + build.gradle | 529 +++++++++++++++++++++ build.gradle.kts | 282 ----------- dependencies.gradle | 41 ++ .../OpenModularTurrets-1.7.10-2.2.10-237-deobf.jar | Bin 0 -> 988221 bytes draw_io_graph.png | Bin 0 -> 113460 bytes gradle.properties | 70 ++- gradle/wrapper/gradle-wrapper.jar | Bin 54417 -> 55616 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 22 +- gradlew.bat | 18 +- jitpack.yml | 2 + libs/CoFHCore-[1.7.10]3.1.4-329-dev.jar | Bin 1213993 -> 0 bytes libs/GT-PlusPlus-1.7.0-prerelease-8-final.jar | Bin 4458558 -> 0 bytes .../OpenModularTurrets-1.7.10-2.2.10-237-deobf.jar | Bin 988221 -> 0 bytes real.gradle.properties | 20 - repositories.gradle | 26 + src/main/resources/mcmod.info | 8 +- 22 files changed, 839 insertions(+), 356 deletions(-) create mode 100644 .github/scripts/test-no-crash-reports.sh create mode 100644 .github/workflows/build-and-test.yml create mode 100644 .github/workflows/release-tags.yml create mode 100644 addon.gradle create mode 100644 build.gradle delete mode 100644 build.gradle.kts create mode 100644 dependencies.gradle create mode 100644 dependencies/OpenModularTurrets-1.7.10-2.2.10-237-deobf.jar create mode 100644 draw_io_graph.png create mode 100644 jitpack.yml delete mode 100644 libs/CoFHCore-[1.7.10]3.1.4-329-dev.jar delete mode 100644 libs/GT-PlusPlus-1.7.0-prerelease-8-final.jar delete mode 100644 libs/OpenModularTurrets-1.7.10-2.2.10-237-deobf.jar delete mode 100644 real.gradle.properties create mode 100644 repositories.gradle (limited to 'src') diff --git a/.github/scripts/test-no-crash-reports.sh b/.github/scripts/test-no-crash-reports.sh new file mode 100644 index 0000000000..c67e342c06 --- /dev/null +++ b/.github/scripts/test-no-crash-reports.sh @@ -0,0 +1,9 @@ +directory="run/crash-reports" +if [ -d $directory ]; then + echo "Crash reports detected:" + cat $directory/* + exit 1 +else + echo "No crash reports detected" + exit 0 +fi diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000000..a60a2b6468 --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,45 @@ +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Build and test + +on: + pull_request: + branches: [ master, main ] + push: + branches: [ master, main ] + +jobs: + build-and-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'adopt' + cache: gradle + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Setup the workspace + run: ./gradlew setupCIWorkspace + + - name: Build the mod + run: ./gradlew build + + - name: Run server for 1 minute + run: | + mkdir run + echo "eula=true" > run/eula.txt + timeout 60 ./gradlew runServer || true + + - name: Test no crashes happend + run: | + chmod +x .github/scripts/test-no-crash-reports.sh + .github/scripts/test-no-crash-reports.sh diff --git a/.github/workflows/release-tags.yml b/.github/workflows/release-tags.yml new file mode 100644 index 0000000000..25c354b227 --- /dev/null +++ b/.github/workflows/release-tags.yml @@ -0,0 +1,45 @@ +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Release tagged build + +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set release version + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'adopt' + cache: gradle + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Setup the workspace + run: ./gradlew setupCIWorkspace + + - name: Build the mod + run: ./gradlew build + + - name: Release under current tag + uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "${{ env.RELEASE_VERSION }}" + prerelease: false + title: "${{ env.RELEASE_VERSION }}" + files: build/libs/*.jar diff --git a/.gitignore b/.gitignore index 3d66b81105..558ad12d27 100644 --- a/.gitignore +++ b/.gitignore @@ -1,44 +1,28 @@ -.gradle/ -run/ -.settings/ +.gradle +.settings +/.idea/ +/run/ +/build/ +/eclipse/ .classpath .project -bin/ -out/ -libs/gregtech* -CREDITS-fml.txt -LICENSE-fml.txt -MinecraftForge-Credits.txt -MinecraftForge-License.txt -CoreMod.iml -CoreMod.ipr -CoreMod.iws -Idea.bat -SetupDevWorkspaces.bat +/bin/ +/config/ +/crash-reports/ +/logs/ +options.txt +/saves/ +usernamecache.json +banned-ips.json +banned-players.json +eula.txt +ops.json +server.properties +servers.dat +usercache.json +whitelist.json +/out/ *.iml *.ipr *.iws -*.bat -.idea/workspace.xml -*.db -*.log -.idea/ -\.directory -asm/ -config/ -saves/ -usernamecache.json -PlayerCache.dat -GregTech.cfg -options.txt -GregTech.lang -mods/ -classes/ -logs/ -libs/AsieLib-1.7.10-0.4.9-deobf.jar -libs/Computronics-1.7.10-1.6.6-deobf.jar -libs/Galacticraft-API-1.7-3.0.12.504.jar -libs/GTNewHorizonsCoreMod-1.7.10-1.6.10.jar -libs/MicdoodleCore-1.7-3.0.12.504.jar -libs/worldedit-forge-mc1.7.10-6.1.1-dist.jar -eclipse/ +src/main/resources/mixins.*.json diff --git a/addon.gradle b/addon.gradle new file mode 100644 index 0000000000..599a5cf195 --- /dev/null +++ b/addon.gradle @@ -0,0 +1,14 @@ +sourceSets.main { + java.srcDir("AVRcore/src") +} + +task initAVRcore(type: Exec) { + description = "Updates (and inits) git submodules" + group = "Build Setup" + commandLine("git", "submodule", "update", "--init", "--recursive", "--remote") +} + +tasks.setupCIWorkspace.dependsOn initAVRcore +tasks.setupDevWorkspace.dependsOn initAVRcore +tasks.setupDecompWorkspace.dependsOn initAVRcore +tasks.compileJava.dependsOn initAVRcore diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000000..cc7c49c4d7 --- /dev/null +++ b/build.gradle @@ -0,0 +1,529 @@ +//version: aa8aff90655e0509464d4a8dc42c38d3614c1260 +/* +DO NOT CHANGE THIS FILE! + +Also, you may replace this file at any time if there is an update available. +Please check https://github.com/SinTh0r4s/ExampleMod1.7.10/blob/main/build.gradle for updates. + */ + + +import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation +import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar + +import java.util.concurrent.TimeUnit + +buildscript { + repositories { + maven { + name = "forge" + url = "https://maven.minecraftforge.net" + } + maven { + name = "sonatype" + url = "https://oss.sonatype.org/content/repositories/snapshots/" + } + maven { + name = "Scala CI dependencies" + url = "https://repo1.maven.org/maven2/" + } + maven { + name = "jitpack" + url = "https://jitpack.io" + } + } + dependencies { + classpath 'com.github.GTNewHorizons:ForgeGradle:1.2.4' + } +} + +plugins { + id 'idea' + id 'scala' + id("org.ajoberstar.grgit") version("3.1.1") + id("com.github.johnrengelman.shadow") version("4.0.4") + id("com.palantir.git-version") version("0.12.3") +} + +apply plugin: 'forge' + +def projectJavaVersion = JavaLanguageVersion.of(8) + +java { + toolchain { + languageVersion.set(projectJavaVersion) + } +} + +idea { + module { + inheritOutputDirs = true + downloadJavadoc = true + downloadSources = true + } +} + +if(JavaVersion.current() != JavaVersion.VERSION_1_8) { + throw new GradleException("This project requires Java 8, but it's running on " + JavaVersion.current()) +} + +checkPropertyExists("modName") +checkPropertyExists("modId") +checkPropertyExists("modGroup") +checkPropertyExists("autoUpdateBuildScript") +checkPropertyExists("minecraftVersion") +checkPropertyExists("forgeVersion") +checkPropertyExists("replaceGradleTokenInFile") +checkPropertyExists("gradleTokenModId") +checkPropertyExists("gradleTokenModName") +checkPropertyExists("gradleTokenVersion") +checkPropertyExists("gradleTokenGroupName") +checkPropertyExists("apiPackage") +checkPropertyExists("accessTransformersFile") +checkPropertyExists("usesMixins") +checkPropertyExists("mixinPlugin") +checkPropertyExists("mixinsPackage") +checkPropertyExists("coreModClass") +checkPropertyExists("containsMixinsAndOrCoreModOnly") +checkPropertyExists("usesShadowedDependencies") +checkPropertyExists("developmentEnvironmentUserName") + + +String javaSourceDir = "src/main/java/" +String scalaSourceDir = "src/main/scala/" + +String targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") +String targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") +if((getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists()) == false) { + throw new GradleException("Could not resolve \"modGroup\"! Could not find " + targetPackageJava + " or " + targetPackageScala) +} + +if(apiPackage) { + targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + if((getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists()) == false) { + throw new GradleException("Could not resolve \"apiPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala) + } +} + +if(accessTransformersFile) { + String targetFile = "src/main/resources/META-INF/" + accessTransformersFile + if(getFile(targetFile).exists() == false) { + throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile) + } +} + +if(usesMixins.toBoolean()) { + if(mixinsPackage.isEmpty() || mixinPlugin.isEmpty()) { + throw new GradleException("\"mixinPlugin\" requires \"mixinsPackage\" and \"mixinPlugin\" to be set!") + } + + targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/") + targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/") + if((getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists()) == false) { + throw new GradleException("Could not resolve \"mixinsPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala) + } + + String targetFileJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".java" + String targetFileScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".scala" + String targetFileScalaJava = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".java" + if((getFile(targetFileJava).exists() || getFile(targetFileScala).exists() || getFile(targetFileScalaJava).exists()) == false) { + throw new GradleException("Could not resolve \"mixinPlugin\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava) + } +} + +if(coreModClass) { + String targetFileJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".java" + String targetFileScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".scala" + String targetFileScalaJava = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".java" + if((getFile(targetFileJava).exists() || getFile(targetFileScala).exists() || getFile(targetFileScalaJava).exists()) == false) { + throw new GradleException("Could not resolve \"coreModClass\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava) + } +} + +configurations.all { + resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS) + + // Make sure GregTech build won't time out + System.setProperty("org.gradle.internal.http.connectionTimeout", 120000 as String) + System.setProperty("org.gradle.internal.http.socketTimeout", 120000 as String) +} + +// Fix Jenkins' Git: chmod a file should not be detected as a change and append a '.dirty' to the version +'git config core.fileMode false'.execute() +// Pulls version from git tag +try { + version = minecraftVersion + "-" + gitVersion() +} +catch (Exception e) { + throw new IllegalStateException("This mod must be version controlled by Git AND the repository must provide at least one tag!"); +} + +group = modGroup +if(project.hasProperty("customArchiveBaseName") && customArchiveBaseName) { + archivesBaseName = customArchiveBaseName +} +else { + archivesBaseName = modId +} + +minecraft { + version = minecraftVersion + "-" + forgeVersion + "-" + minecraftVersion + runDir = "run" + + if (replaceGradleTokenInFile) { + replaceIn replaceGradleTokenInFile + if(gradleTokenModId) { + replace gradleTokenModId, modId + } + if(gradleTokenModName) { + replace gradleTokenModName, modName + } + if(gradleTokenVersion) { + replace gradleTokenVersion, versionDetails().lastTag + } + if(gradleTokenGroupName) { + replace gradleTokenGroupName, modGroup + } + } +} + +if(file("addon.gradle").exists()) { + apply from: "addon.gradle" +} + +apply from: 'repositories.gradle' + +configurations { + implementation.extendsFrom(shadowImplementation) +} + +repositories { + maven { + name = "Overmind forge repo mirror" + url = "https://gregtech.overminddl1.com/" + } + if(usesMixins.toBoolean()) { + maven { + name = "sponge" + url = "https://repo.spongepowered.org/repository/maven-public" + } + maven { + url = "https://jitpack.io" + } + } +} + +dependencies { + if(usesMixins.toBoolean()) { + annotationProcessor("org.ow2.asm:asm-debug-all:5.0.3") + annotationProcessor("com.google.guava:guava:24.1.1-jre") + annotationProcessor("com.google.code.gson:gson:2.8.6") + annotationProcessor("org.spongepowered:mixin:0.8-SNAPSHOT") + // using 0.8 to workaround a issue in 0.7 which fails mixin application + compile("org.spongepowered:mixin:0.7.11-SNAPSHOT") { + // Mixin includes a lot of dependencies that are too up-to-date + exclude module: "launchwrapper" + exclude module: "guava" + exclude module: "gson" + exclude module: "commons-io" + exclude module: "log4j-core" + } + compile("com.github.GTNewHorizons:SpongeMixins:1.3.3:dev") + } +} + +apply from: 'dependencies.gradle' + +def mixingConfigRefMap = "mixins." + modId + ".refmap.json" +def refMap = "${tasks.compileJava.temporaryDir}" + File.separator + mixingConfigRefMap +def mixinSrg = "${tasks.reobf.temporaryDir}" + File.separator + "mixins.srg" + +task generateAssets { + if(usesMixins.toBoolean()) { + getFile("/src/main/resources/mixins." + modId + ".json").text = """{ + "required": true, + "minVersion": "0.7.11", + "package": "${modGroup}.${mixinsPackage}", + "plugin": "${modGroup}.${mixinPlugin}", + "refmap": "${mixingConfigRefMap}", + "target": "@env(DEFAULT)", + "compatibilityLevel": "JAVA_8" +} + +""" + } +} + +task relocateShadowJar(type: ConfigureShadowRelocation) { + target = tasks.shadowJar + prefix = modGroup + ".shadow" +} + +shadowJar { + manifest { + attributes(getManifestAttributes()) + } + + minimize() // This will only allow shading for actually used classes + configurations = [project.configurations.shadowImplementation] + dependsOn(relocateShadowJar) +} + +jar { + manifest { + attributes(getManifestAttributes()) + } + + if(usesShadowedDependencies.toBoolean()) { + dependsOn(shadowJar) + enabled = false + } +} + +reobf { + if(usesMixins.toBoolean()) { + addExtraSrgFile mixinSrg + } +} + +afterEvaluate { + if(usesMixins.toBoolean()) { + tasks.compileJava { + options.compilerArgs += [ + "-AreobfSrgFile=${tasks.reobf.srg}", + "-AoutSrgFile=${mixinSrg}", + "-AoutRefMapFile=${refMap}", + // Elan: from what I understand they are just some linter configs so you get some warning on how to properly code + "-XDenableSunApiLintControl", + "-XDignore.symbol.file" + ] + } + } +} + +runClient { + def arguments = [] + + if(usesMixins.toBoolean()) { + arguments += [ + "--mods=../build/libs/$modId-${version}.jar", + "--tweakClass org.spongepowered.asm.launch.MixinTweaker" + ] + } + + if(developmentEnvironmentUserName) { + arguments += [ + "--username", + developmentEnvironmentUserName + ] + } + + args(arguments) +} + +runServer { + def arguments = [] + + if (usesMixins.toBoolean()) { + arguments += [ + "--mods=../build/libs/$modId-${version}.jar", + "--tweakClass org.spongepowered.asm.launch.MixinTweaker" + ] + } + + args(arguments) +} + +tasks.withType(JavaExec).configureEach { + javaLauncher.set( + javaToolchains.launcherFor { + languageVersion = projectJavaVersion + } + ) +} + +processResources + { + // this will ensure that this task is redone when the versions change. + inputs.property "version", project.version + inputs.property "mcversion", project.minecraft.version + + // replace stuff in mcmod.info, nothing else + from(sourceSets.main.resources.srcDirs) { + include 'mcmod.info' + + // replace version and mcversion + expand "minecraftVersion": project.minecraft.version, + "modVersion": versionDetails().lastTag, + "modId": modId, + "modName": modName + } + + if(usesMixins.toBoolean()) { + from refMap + } + + // copy everything else, thats not the mcmod.info + from(sourceSets.main.resources.srcDirs) { + exclude 'mcmod.info' + } + } + +def getManifestAttributes() { + def manifestAttributes = [:] + if(containsMixinsAndOrCoreModOnly.toBoolean() == false && (usesMixins.toBoolean() || coreModClass)) { + manifestAttributes += ["FMLCorePluginContainsFMLMod": true] + } + + if(accessTransformersFile) { + manifestAttributes += ["FMLAT" : accessTransformersFile.toString()] + } + + if(coreModClass) { + manifestAttributes += ["FMLCorePlugin": modGroup + "." + coreModClass] + } + + if(usesMixins.toBoolean()) { + manifestAttributes += [ + "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker", + "MixinConfigs" : "mixins." + modId + ".json", + "ForceLoadAsMod" : containsMixinsAndOrCoreModOnly.toBoolean() == false + ] + } + return manifestAttributes +} + +task sourcesJar(type: Jar) { + from (sourceSets.main.allJava) + from (file("$projectDir/LICENSE")) + getArchiveClassifier().set('sources') +} + +task shadowDevJar(type: ShadowJar) { + from sourceSets.main.output + getArchiveClassifier().set("dev") + + manifest { + attributes(getManifestAttributes()) + } + + minimize() // This will only allow shading for actually used classes + configurations = [project.configurations.shadowImplementation] +} + +task relocateShadowDevJar(type: ConfigureShadowRelocation) { + target = tasks.shadowDevJar + prefix = modGroup + ".shadow" +} + +task circularResolverJar(type: Jar) { + dependsOn(relocateShadowDevJar) + dependsOn(shadowDevJar) + enabled = false +} + +task devJar(type: Jar) { + from sourceSets.main.output + getArchiveClassifier().set("dev") + + manifest { + attributes(getManifestAttributes()) + } + + if(usesShadowedDependencies.toBoolean()) { + dependsOn(circularResolverJar) + enabled = false + } +} + +task apiJar(type: Jar) { + from (sourceSets.main.allJava) { + include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**' + } + + from (sourceSets.main.output) { + include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**' + } + + from (sourceSets.main.resources.srcDirs) { + include("LICENSE") + } + + getArchiveClassifier().set('api') +} + +artifacts { + archives sourcesJar + archives devJar + if(apiPackage) { + archives apiJar + } +} + +// Updating +task updateBuildScript { + doLast { + if (performBuildScriptUpdate(projectDir.toString())) return + + print("Build script already up-to-date!") + } +} + +if (isNewBuildScriptVersionAvailable(projectDir.toString())) { + if (autoUpdateBuildScript.toBoolean()) { + performBuildScriptUpdate(projectDir.toString()) + } else { + println("Build script update available! Run 'gradle updateBuildScript'") + } +} + +static URL availableBuildScriptUrl() { + new URL("https://raw.githubusercontent.com/SinTh0r4s/ExampleMod1.7.10/main/build.gradle") +} + +boolean performBuildScriptUpdate(String projectDir) { + if (isNewBuildScriptVersionAvailable(projectDir)) { + def buildscriptFile = getFile("build.gradle") + availableBuildScriptUrl().withInputStream { i -> buildscriptFile.withOutputStream { it << i } } + print("Build script updated. Please REIMPORT the project or RESTART your IDE!") + return true + } + return false +} + +boolean isNewBuildScriptVersionAvailable(String projectDir) { + Map parameters = ["connectTimeout": 2000, "readTimeout": 2000] + + String currentBuildScript = getFile("build.gradle").getText() + String currentBuildScriptHash = getVersionHash(currentBuildScript) + String availableBuildScript = availableBuildScriptUrl().newInputStream(parameters).getText() + String availableBuildScriptHash = getVersionHash(availableBuildScript) + + boolean isUpToDate = currentBuildScriptHash.empty || availableBuildScriptHash.empty || currentBuildScriptHash == availableBuildScriptHash + return !isUpToDate +} + +static String getVersionHash(String buildScriptContent) { + String versionLine = buildScriptContent.find("^//version: [a-z0-9]*") + if(versionLine != null) { + return versionLine.split(": ").last() + } + return "" +} + +configure(updateBuildScript) { + group = 'forgegradle' + description = 'Updates the build script to the latest version' +} + +// Helper methods + +def checkPropertyExists(String propertyName) { + if (project.hasProperty(propertyName) == false) { + throw new GradleException("This project requires a property \"" + propertyName + "\"! Please add it your \"gradle.properties\". You can find all properties and their description here: https://github.com/SinTh0r4s/ExampleMod1.7.10/blob/main/gradle.properties") + } +} + +def getFile(String relativePath) { + return new File(projectDir, relativePath) +} diff --git a/build.gradle.kts b/build.gradle.kts deleted file mode 100644 index 5688298c49..0000000000 --- a/build.gradle.kts +++ /dev/null @@ -1,282 +0,0 @@ -import net.minecraftforge.gradle.user.UserExtension -import java.io.FileInputStream -import java.util.* -import java.io.* - -buildscript { - repositories { - mavenCentral() - maven("https://gregtech.overminddl1.com/") - maven("https://jitpack.io") - - } - dependencies { - classpath("com.github.GTNH2:ForgeGradle:FG_1.2-SNAPSHOT") - } -} - -plugins { - idea - java - signing -} - -apply(plugin = "forge") - -//Downloads Javadocs and sources by default -idea { - module { - this.isDownloadJavadoc = true - this.isDownloadSources = true - } -} - -//Set Java to version 1.8 -java { - this.sourceCompatibility = JavaVersion.VERSION_1_8 - this.targetCompatibility = JavaVersion.VERSION_1_8 -} - -//Set standard encoding -tasks.withType { - options.encoding = "UTF-8" -} - -//Add extra sources here -sourceSets.getByName("main") { - java.srcDir("src/main/java") - java.srcDir("AVRcore/src") -} - -//Load Minecraft Version -val Project.minecraft: UserExtension - get() = extensions.getByName("minecraft") - -//TODO Delete this! This exists to load the configs from the real properties file, which is needed for Jenkins to build -//Gradle will load gradle.properties from it's home, it's install, and the project folder. Clearly whoever setup the -//Jenkins jar signing needs to be reminded of this! -val prop = Properties() -prop.load(FileInputStream("real.gradle.properties")) -val propSign = Properties() -propSign.load(FileInputStream("gradle.properties")) - -//TODO Delete -val projectVersion: String = prop.getProperty("projectVersion") -//TODO Uncomment -//val projectVersion: String by project - -//Generates a hash for each new commit to differentiate versions -var commitHash = Runtime - .getRuntime() - .exec("git rev-parse --short HEAD") - .let { process -> - process.waitFor() - val output = process.inputStream.use { - it.bufferedReader().use(BufferedReader::readText) - } - process.destroy() - output.trim() - } - -minecraft.version = "1.7.10-10.13.4.1614-1.7.10" -version = "$projectVersion-$commitHash" -group = "com.github.technus" - -//Minecraft Block -configure { - //Replaces version inside the mod - this.includes.addAll( - arrayOf( - "Reference.java" - ) - ) - this.replacements.putAll( - mapOf( - Pair("GRADLETOKEN_VERSION", project.version) - ) - ) - - //This is sometimes called 'eclipse' instead - this.runDir = "run" -} - -repositories { - mavenLocal() - maven("https://gregtech.overminddl1.com/") { this.name = "GT6Maven" } - maven("http://maven.ic2.player.to/") { this.name = "ic2" } - maven("http://jenkins.usrv.eu:8081/nexus/content/repositories/releases/") { this.name = "UsrvDE/GTNH" } - ivy { - this.name = "gtnh_download_source_underscores" - this.artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]_[revision].[ext]") - } - ivy { - this.name = "gtnh_download_source" - this.artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]-[revision].[ext]") - } - ivy { - this.name = "BuildCraft" - this.artifactPattern("http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision](-[classifier]).[ext]") - } - maven("http://maven.cil.li/") { this.name = "OpenComputers" } - maven("http://default.mobiusstrip.eu/maven") { this.name = "Jabba" } - maven("http://chickenbones.net/maven/") { this.name = "CodeChicken" } - maven("http://www.ryanliptak.com/maven/") { this.name = "appleCore" } - maven("https://jitpack.io") -} - -dependencies { - //Local Libraries - compile(fileTree("libs") { this.include("*.jar") }) - - //TODO Uncomment - //Versions from properties - //val ic2Version: String by project - //val gt5uVersion: String by project - //val yamcoreVersion: String by project - //val opencomputersVersion: String by project - //val computercraftVersion: String by project - //val baublesVersion: String by project - //val thaumcraftVersion: String by project - //val codechickenlibVersion: String by project - //val codechickencoreVersion: String by project - //val neiVersion: String by project - //val wailaVersion: String by project - //val galacticraftVersion: String by project - //val galacticGregVersion: String by project - //val buildcraftVersion: String by project - //val forestryVersion: String by project - //val enderioVersion: String by project - //val enderCoreVersion: String by project - - //TODO Delete - val ic2Version: String = prop.getProperty("ic2Version") - val gt5uVersion: String = prop.getProperty("gt5uVersion") - val yamcoreVersion: String = prop.getProperty("yamcoreVersion") - val opencomputersVersion: String = prop.getProperty("opencomputersVersion") - val computercraftVersion: String = prop.getProperty("computercraftVersion") - val baublesVersion: String = prop.getProperty("baublesVersion") - val thaumcraftVersion: String = prop.getProperty("thaumcraftVersion") - val codechickenlibVersion: String = prop.getProperty("codechickenlibVersion") - val codechickencoreVersion: String = prop.getProperty("codechickencoreVersion") - val neiVersion: String = prop.getProperty("neiVersion") - val wailaVersion: String = prop.getProperty("wailaVersion") - val galacticraftVersion: String = prop.getProperty("galacticraftVersion") - val galacticGregVersion: String = prop.getProperty("galacticGregVersion") - val buildcraftVersion: String = prop.getProperty("buildcraftVersion") - val forestryVersion: String = prop.getProperty("forestryVersion") - val enderioVersion: String = prop.getProperty("enderioVersion") - val enderCoreVersion: String = prop.getProperty("enderCoreVersion") - - //Hard Dependencies - compile("net.industrial-craft:industrialcraft-2:$ic2Version:dev") - compile("com.github.GTNewHorizons:StructureLib:1.0.9:deobf") - compile("com.github.GTNewHorizons:GT5-Unofficial:$gt5uVersion:dev"){ - exclude("net.industrial-craft", "industrialcraft-2") - } - compile("eu.usrv:YAMCore:$yamcoreVersion:deobf") - - //Compile Dependencies - compileOnly("li.cil.oc:OpenComputers:$opencomputersVersion:dev") - compileOnly("dan200.computercraft:ComputerCraft:$computercraftVersion") - compile("com.azanor.baubles:Baubles:$baublesVersion:deobf") - compile("thaumcraft:Thaumcraft:$thaumcraftVersion:dev") - compile("codechicken:CodeChickenLib:$codechickenlibVersion:dev") - compile("codechicken:CodeChickenCore:$codechickencoreVersion:dev") - compile("codechicken:NotEnoughItems:$neiVersion:dev") - - //Optional Libraries for Testing - runtimeOnly("mcp.mobius.waila:Waila:$wailaVersion") - - //runtimeOnly("micdoodle8.mods:MicdoodleCore:$galacticraftVersion:Dev") - //runtimeOnly("micdoodle8.mods:GalacticraftCore:$galacticraftVersion:Dev") - //runtimeOnly("micdoodle8.mods:Galacticraft-Planets:$galacticraftVersion:Dev") - //runtimeOnly("com.github.GTNewHorizons:GalacticGregGT5:$galacticGregVersion") - //runtimeOnly("com.mod-buildcraft:buildcraft:$buildcraftVersion:dev") - //runtimeOnly("net.sengir.forestry:forestry_1.7.10:$forestryVersion:dev") - //runtimeOnly("com.enderio.core:EnderCore:$enderCoreVersion:dev") - //runtimeOnly("com.enderio:EnderIO:$enderioVersion:dev"){ - // exclude("com.enderio.core", "EnderCore") - // exclude("mcp.mobius.waila", "Waila") - //} -} - -tasks.withType { - //Mark as outdated if versions change - this.inputs.properties += "version" to project.version - this.inputs.properties += "mcversion" to project.minecraft.version - this.archiveBaseName.set("TecTech-${project.minecraft.version}") - - //Replace versions in mcmod.info - this.filesMatching("/mcmod.info") { - this.expand( - mapOf( - "version" to project.version, - "mcversion" to project.minecraft.version - ) - ) - } -} - -//Load AVRcore -val submodulesUpdate by tasks.creating(Exec::class) { - this.description = "Updates (and inits) git submodules" - this.group = "Build Setup" - this.commandLine("git", "submodule", "update", "--init", "--recursive", "--remote") -} -tasks.named("setupCIWorkspace") { - dependsOn(":submodulesUpdate") -} -tasks.named("setupDevWorkspace") { - dependsOn(":submodulesUpdate") -} -tasks.named("setupDecompWorkspace") { - dependsOn(":submodulesUpdate") -} -tasks.named("compileJava") { - dependsOn(":submodulesUpdate") -} -tasks.named("sourceMainJava") { - dependsOn(":submodulesUpdate") -} - -tasks.jar { - //Needed for access transformer which allows nerfing hardness of blocks - this.manifest.attributes( - mapOf( - Pair("FMLAT", "tectech_at.cfg") - ) - ) -} - -val sourcesJar by tasks.creating(Jar::class) { - this.from(sourceSets.main.get().allSource) - this.archiveClassifier.set("sources") -} - -val devJar by tasks.creating(Jar::class) { - this.from(sourceSets.main.get().output) - this.archiveClassifier.set("dev") -} - -artifacts { - this.archives(sourcesJar) - this.archives(devJar) -} - -tasks.register("signJar") { - dependsOn("reobf") -} - -//TODO Fix, but technically it was never fully implemented -//signing { -// sign(tasks["jar"]) -//} -// -//tasks.named("signJar") { -// allprojects { -// extra["signing.keyId"] = propSign.getProperty("keyStoreAlias") -// extra["signing.secretKeyRingFile"] = propSign.getProperty("keyStore") -// extra["signing.password"] = propSign.getProperty("keyStorePass") -// } -// dependsOn(":reobf") -//} diff --git a/dependencies.gradle b/dependencies.gradle new file mode 100644 index 0000000000..7cff792573 --- /dev/null +++ b/dependencies.gradle @@ -0,0 +1,41 @@ +// Add your dependencies here + +dependencies { + compile("com.github.GTNewHorizons:GT5-Unofficial:master-SNAPSHOT:dev") + compile("com.github.GTNewHorizons:Yamcl:master-SNAPSHOT:dev") + + /*compile("com.github.GTNewHorizons:NotEnoughItems:master-SNAPSHOT:dev") { // Transitive by GT5-Unofficial + transitive = false + } + compile("com.github.GTNewHorizons:CodeChickenLib:master-SNAPSHOT:dev") { // Transitive by GT5-Unofficial + transitive = false + } + compile("com.github.GTNewHorizons:StructureLib:master-SNAPSHOT:dev") { // Transitive by GT5-Unofficial + transitive = false + } + compile("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev") { // Transitive by GT5-Unofficial + transitive = false + }*/ + + compileOnly("com.github.GTNewHorizons:GTplusplus:unified-build-script-SNAPSHOT:dev") { + transitive = false + } + compileOnly("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:master-SNAPSHOT:dev") { + transitive = false + } + + compileOnly("dan200.computercraft:ComputerCraft:1.75") { + transitive = false + } + compileOnly("li.cil.oc:OpenComputers:MC1.7.10-1.7.5.1356:dev") { + transitive = false + } + compileOnly("curse.maven:cofh-core-69162:2388751") { + transitive = false + } + compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") { + transitive = false + } + + compileOnly files("dependencies/OpenModularTurrets-1.7.10-2.2.10-237-deobf.jar") +} diff --git a/dependencies/OpenModularTurrets-1.7.10-2.2.10-237-deobf.jar b/dependencies/OpenModularTurrets-1.7.10-2.2.10-237-deobf.jar new file mode 100644 index 0000000000..e854bf7df9 Binary files /dev/null and b/dependencies/OpenModularTurrets-1.7.10-2.2.10-237-deobf.jar differ diff --git a/draw_io_graph.png b/draw_io_graph.png new file mode 100644 index 0000000000..241c41d604 Binary files /dev/null and b/draw_io_graph.png differ diff --git a/gradle.properties b/gradle.properties index 7fc32d532c..d18a0daa12 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,64 @@ -#Dummy File, replaced in Jenkins -systemProp.org.gradle.internal.http.connectionTimeout=120000 -systemProp.org.gradle.internal.http.socketTimeout=120000 -keyStoreAlias=w -keyStore=w -keyStorePass=w +modName = TecTech - Tec Technology! + +# This is a case-sensitive string to identify your mod. Convention is to use lower case. +modId = tectech + +modGroup = com.github.technus.tectech + +# WHY is there no version field? +# The build script relies on git to provide a version via tags. It is super easy and will enable you to always know the +# code base or your binary. Check out this tutorial: https://blog.mattclemente.com/2017/10/13/versioning-with-git-tags/ + +# Will update your build.gradle automatically whenever an update is available +autoUpdateBuildScript = false + +minecraftVersion = 1.7.10 +forgeVersion = 10.13.4.1614 + +# Select a username for testing your mod with breakpoints. You may leave this empty for a random user name each time you +# restart Minecraft in development. Choose this dependent on your mod: +# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name +# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty +developmentEnvironmentUserName = "Developer" + +# Define a source file of your project with: +# public static final String VERSION = "GRADLETOKEN_VERSION"; +# The string's content will be replaced with your mods version when compiled. You should use this to specify your mod's +# version in @Mod([...], version = VERSION, [...]) +# Leave these properties empty to skip individual token replacements +replaceGradleTokenInFile = Reference.java +gradleTokenModId = +gradleTokenModName = +gradleTokenVersion = GRADLETOKEN_VERSION +gradleTokenGroupName = + +# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise you can +# leave this property empty. +# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api +apiPackage = + +# Specify the configuration file for Forge's access transformers here. I must be placed into /src/main/resources/META-INF/ +# Example value: mymodid_at.cfg +accessTransformersFile = tectech_at.cfg + +# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled! +usesMixins = false +# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise. +mixinPlugin = +# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail! +mixinsPackage = +# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin! +# This parameter is for legacy compatability only +# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin +coreModClass = +# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class +# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false! +containsMixinsAndOrCoreModOnly = false + +# If enabled, you may use 'shadowImplementation' for dependencies. They will be integrated in your jar. It is your +# responsibility check the licence and request permission for distribution, if required. +usesShadowedDependencies = false + +# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older +# projects. New projects should not use this parameter. +customArchiveBaseName = TecTech diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 758de960ec..5c2d1cf016 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5028f28f8e..3ab0b725ef 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index cccdd3d517..83f2acfdc3 100644 --- a/gradlew +++ b/gradlew @@ -1,5 +1,21 @@ #!/usr/bin/env sh +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ############################################################################## ## ## Gradle start up script for UN*X @@ -28,7 +44,7 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" @@ -109,8 +125,8 @@ if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` JAVACMD=`cygpath --unix "$JAVACMD"` diff --git a/gradlew.bat b/gradlew.bat index f9553162f1..9618d8d960 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 0000000000..09bbb514fc --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,2 @@ +before_install: + - ./gradlew setupCIWorkspace \ No newline at end of file diff --git a/libs/CoFHCore-[1.7.10]3.1.4-329-dev.jar b/libs/CoFHCore-[1.7.10]3.1.4-329-dev.jar deleted file mode 100644 index 7a53464d53..0000000000 Binary files a/libs/CoFHCore-[1.7.10]3.1.4-329-dev.jar and /dev/null differ diff --git a/libs/GT-PlusPlus-1.7.0-prerelease-8-final.jar b/libs/GT-PlusPlus-1.7.0-prerelease-8-final.jar deleted file mode 100644 index 181475fc38..0000000000 Binary files a/libs/GT-PlusPlus-1.7.0-prerelease-8-final.jar and /dev/null differ diff --git a/libs/OpenModularTurrets-1.7.10-2.2.10-237-deobf.jar b/libs/OpenModularTurrets-1.7.10-2.2.10-237-deobf.jar deleted file mode 100644 index e854bf7df9..0000000000 Binary files a/libs/OpenModularTurrets-1.7.10-2.2.10-237-deobf.jar and /dev/null differ diff --git a/real.gradle.properties b/real.gradle.properties deleted file mode 100644 index 5cf1722acc..0000000000 --- a/real.gradle.properties +++ /dev/null @@ -1,20 +0,0 @@ -systemProp.org.gradle.internal.http.connectionTimeout=120000 -systemProp.org.gradle.internal.http.socketTimeout=120000 -projectVersion=4.10.8 -ic2Version=2.2.828-experimental -gt5uVersion=experimental-SNAPSHOT -yamcoreVersion=1.7.10-0.5.79 -opencomputersVersion=MC1.7.10-1.7.5.1291 -computercraftVersion=1.75 -baublesVersion=1.7.10-1.0.1.10 -thaumcraftVersion=1.7.10-4.2.3.5 -codechickenlibVersion=1.7.10-1.1.3.140 -codechickencoreVersion=1.7.10-1.0.7.47 -neiVersion=1.7.10-1.0.5.120 -wailaVersion=1.5.10_1.7.10 -galacticraftVersion=1.7-3.0.12.504 -galacticGregVersion=master-SNAPSHOT -buildcraftVersion=7.1.23 -forestryVersion=4.4.0.0 -enderioVersion=1.7.10-2.3.0.429_beta -enderCoreVersion=1.7.10-0.2.0.39_beta diff --git a/repositories.gradle b/repositories.gradle new file mode 100644 index 0000000000..130197c8aa --- /dev/null +++ b/repositories.gradle @@ -0,0 +1,26 @@ +// Add any additional repositories for your dependencies here + +repositories { + maven { + name "OpenComputers Repo" + url = "http://maven.cil.li/" + } + maven { + name = "sponge" + url = "https://repo.spongepowered.org/repository/maven-public" + } + maven { + name = "ic2" + url = "http://maven.ic2.player.to/" + metadataSources { + mavenPom() + artifact() + } + } + maven { + url "https://cursemaven.com" + } + maven { + url = "https://jitpack.io" + } +} diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index f7fc68f278..21ecee23f8 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -1,10 +1,10 @@ [ { - "modid": "tectech", - "name": "TecTech", + "modid": "${modId}", + "name": "${modName}", "description": "TecTech - Tec Technology Interdimensional! Replace UUMatter with something overly complicated and annoying! (GT5u Addon)", - "version": "${version}", - "mcversion": "${mcversion}", + "version": "${modVersion}", + "mcversion": "${minecraftVersion}", "url": "", "updateUrl": "", "authorList": ["_Technus_"], -- cgit From 090004325fe88859e70642587a617794f815987a Mon Sep 17 00:00:00 2001 From: boubou_19 Date: Sat, 11 Dec 2021 18:57:24 +0100 Subject: add recipe for infinite oil rig --- .../dreamcraft/DreamCraftRecipeLoader.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java index ba72375f80..0b40facca7 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java @@ -170,6 +170,23 @@ public class DreamCraftRecipeLoader implements Runnable { getOrDefault("Trinium", Materials.Osmium).getMolten(1296), }, CustomItemList.eM_Coil.get(4), 800, 2000000); + //infinite oil rig + TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.OilDrill3.get(1), + 1843200, 1024, 2000000, 4, new ItemStack[]{ + ItemList.OilDrill3.get(1), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 4), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Infinite, 4), + ItemList.Electric_Motor_UHV.get(4), + ItemList.Electric_Pump_UHV.get(4), + GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Neutronium, 4), + ItemList.Sensor_UHV.get(3), + ItemList.Field_Generator_UHV.get(3), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Neutronium, 12) + }, new FluidStack[]{ + Materials.SolderingAlloy.getMolten(1296), + Materials.Neutronium.getMolten(576) + }, ItemList.OilDrillInfinite.get(1), 1200, 2000000); + //Tesla Base GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 6), -- cgit From 3c9a892a341a1461f7a0b0c8467e501c99449b77 Mon Sep 17 00:00:00 2001 From: Glease <4586901+Glease@users.noreply.github.com> Date: Mon, 13 Dec 2021 00:27:28 +0800 Subject: Fix compat with gtpp, also fixed the build --- build.gradle.kts | 8 ++++++-- real.gradle.properties | 2 +- .../technus/tectech/compatibility/gtpp/GtppAtomLoader.java | 12 ++++++++++-- 3 files changed, 17 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/build.gradle.kts b/build.gradle.kts index 5688298c49..fe1dfcb909 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ buildscript { } dependencies { - classpath("com.github.GTNH2:ForgeGradle:FG_1.2-SNAPSHOT") + classpath("com.github.GTNewHorizons:ForgeGradle:1.2.4") } } @@ -169,9 +169,13 @@ dependencies { //Hard Dependencies compile("net.industrial-craft:industrialcraft-2:$ic2Version:dev") - compile("com.github.GTNewHorizons:StructureLib:1.0.9:deobf") + compile("com.github.GTNewHorizons:StructureLib:1.0.11:dev") compile("com.github.GTNewHorizons:GT5-Unofficial:$gt5uVersion:dev"){ exclude("net.industrial-craft", "industrialcraft-2") + exclude("com.github.GTNewHorizons", "StructureLib") + } + compileOnly("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:master-SNAPSHOT:dev") { + isTransitive = false } compile("eu.usrv:YAMCore:$yamcoreVersion:deobf") diff --git a/real.gradle.properties b/real.gradle.properties index 5cf1722acc..d97131bc7f 100644 --- a/real.gradle.properties +++ b/real.gradle.properties @@ -2,7 +2,7 @@ systemProp.org.gradle.internal.http.connectionTimeout=120000 systemProp.org.gradle.internal.http.socketTimeout=120000 projectVersion=4.10.8 ic2Version=2.2.828-experimental -gt5uVersion=experimental-SNAPSHOT +gt5uVersion=master-SNAPSHOT yamcoreVersion=1.7.10-0.5.79 opencomputersVersion=MC1.7.10-1.7.5.1291 computercraftVersion=1.75 diff --git a/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java b/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java index 32db2caed9..bf96d61795 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java @@ -40,6 +40,14 @@ public class GtppAtomLoader implements Runnable{ } //endregion + private static Method getMethodWithReplacements(Class owner, String name1, String name2, Class... arguments) throws ReflectiveOperationException { + try { + return owner.getMethod(name1, arguments); + } catch (ReflectiveOperationException e) { + return owner.getMethod(name2, arguments); + } + } + @Override public void run() { //region reflect a bit @@ -47,9 +55,9 @@ public class GtppAtomLoader implements Runnable{ ELEMENT=Class.forName("gtPlusPlus.core.material.ELEMENT"); ELEMENT_INSTANCE=ELEMENT.getMethod("getInstance").invoke(null); - Class clazz=Class.forName("gtPlusPlus.core.material.Material"); + Class clazz=Class.forName("gtPlusPlus.core.material.Material"); getUnlocalizedName=clazz.getMethod("getUnlocalizedName"); - getFluid=clazz.getMethod("getFluid", int.class); + getFluid=getMethodWithReplacements(clazz,"getFluidStack", "getFluid", int.class); clazz=Class.forName("gtPlusPlus.core.material.MaterialGenerator"); generate=clazz.getMethod("generate", Class.forName("gtPlusPlus.core.material.Material"), boolean.class, boolean.class); -- cgit From 6a35a18be754743973e339ee2adf7ee26235d4af Mon Sep 17 00:00:00 2001 From: GTNH-Afx237v7 <64365566+GTNH-Afx237v7@users.noreply.github.com> Date: Wed, 15 Dec 2021 13:08:06 +0100 Subject: Adjust ultimate battery soldering alloy amount see #9131 --- .../tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java index 0b40facca7..b8fa84543d 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java @@ -1401,7 +1401,7 @@ public class DreamCraftRecipeLoader implements Runnable { ItemList.Circuit_Parts_DiodeASMD.get(64), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorUHV, 64), }, new FluidStack[]{ - Materials.SolderingAlloy.getMolten(3760), + Materials.SolderingAlloy.getMolten(4608), Materials.Naquadria.getMolten(9216), new FluidStack(FluidRegistry.getFluid("ic2coolant"), 32000) }, ItemList.ZPM3.get(1), 4000, 1600000); -- cgit From 174827add16a3c4e539d46ac278cc032569ccfa4 Mon Sep 17 00:00:00 2001 From: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Date: Mon, 3 Jan 2022 11:10:58 +0000 Subject: Change computation & time requirements on infinite pump. Discussed in discord. --- .../tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java index b8fa84543d..646158cc5b 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java @@ -172,7 +172,7 @@ public class DreamCraftRecipeLoader implements Runnable { //infinite oil rig TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.OilDrill3.get(1), - 1843200, 1024, 2000000, 4, new ItemStack[]{ + 16777216, 2048, 2000000, 4, new ItemStack[]{ ItemList.OilDrill3.get(1), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 4), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Infinite, 4), @@ -185,7 +185,7 @@ public class DreamCraftRecipeLoader implements Runnable { }, new FluidStack[]{ Materials.SolderingAlloy.getMolten(1296), Materials.Neutronium.getMolten(576) - }, ItemList.OilDrillInfinite.get(1), 1200, 2000000); + }, ItemList.OilDrillInfinite.get(1), 6000, 2000000); //Tesla Base GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ -- cgit From 48e8812c1b72009f799a25dd0423cc9fbcb112a1 Mon Sep 17 00:00:00 2001 From: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Date: Tue, 18 Jan 2022 23:31:53 +0000 Subject: Update DreamCraftRecipeLoader.java --- .../dreamcraft/DreamCraftRecipeLoader.java | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java index 646158cc5b..5c2f8529a8 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java @@ -1274,28 +1274,28 @@ public class DreamCraftRecipeLoader implements Runnable { //Stargate Recipes if (Loader.isModLoaded("eternalsingularity") && Loader.isModLoaded("SGCraft")) { TT_recipeAdder.addResearchableAssemblylineRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Infinity, 1L), - 192000, 512, 2000000, 32, new ItemStack[]{ + 32000000, 8192, 128000000, 1, new ItemStack[]{ GT_ModHandler.getModItem("eternalsingularity", "eternal_singularity", 1L), - ItemList.Sensor_UV.get(16L), + ItemList.Sensor_UEV.get(16L), GT_OreDictUnificator.get(OrePrefixes.block, Materials.Infinity, 16L), GT_OreDictUnificator.get(OrePrefixes.block, Materials.CosmicNeutronium, 16L), GT_OreDictUnificator.get(OrePrefixes.block, Materials.NaquadahAlloy, 64L), GT_OreDictUnificator.get(OrePrefixes.block, Materials.NaquadahAlloy, 64L), GT_OreDictUnificator.get(OrePrefixes.block, Materials.NaquadahAlloy, 64L), - getItemContainer("NanoCircuit").get(1L).splitStack(16) + getItemContainer("QuantumCircuit").get(1L).splitStack(16) }, new FluidStack[]{ Materials.Neutronium.getMolten(36864L), Materials.Tritanium.getMolten(36864L), - Materials.Tetranaquadahdiindiumhexaplatiumosminid.getMolten(36864L), + Materials.Longasssuperconductornameforuhvwire.getMolten(36864L), Materials.Silver.getPlasma(36864L) }, - getItemContainer("StargateShieldingFoil").get(1L), 72000, 2000000); + getItemContainer("StargateShieldingFoil").get(1L), 72000, 500000000); TT_recipeAdder.addResearchableAssemblylineRecipe(getItemContainer("StargateShieldingFoil").get(1L), - 192000, 512, 2000000, 32, new ItemStack[]{ - ItemList.Electric_Piston_UV.get(16L), - ItemList.Electric_Motor_UV.get(64L), + 32000000, 8192, 128000000, 1, new ItemStack[]{ + ItemList.Electric_Piston_UEV.get(16L), + ItemList.Electric_Motor_UEV.get(64L), GT_OreDictUnificator.get(OrePrefixes.block, Materials.Infinity, 16L), GT_OreDictUnificator.get(OrePrefixes.block, Materials.NaquadahAlloy, 64L), GT_OreDictUnificator.get(OrePrefixes.block, Materials.NetherStar, 64L), @@ -1304,18 +1304,18 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Ardite, 8L), GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Ruby, 16L), GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Jasper, 16L), - getItemContainer("NanoCircuit").get(1L).splitStack(32) + getItemContainer("QuantumCircuit").get(1L).splitStack(32) }, new FluidStack[]{ Materials.Neutronium.getMolten(9216L), Materials.Tritanium.getMolten(9216L), - Materials.Tetranaquadahdiindiumhexaplatiumosminid.getMolten(9216L), + Materials.Longasssuperconductornameforuhvwire.getMolten(9216L), Materials.Silver.getPlasma(9216L) }, - getItemContainer("StargateChevron").get(1L), 72000, 2000000); + getItemContainer("StargateChevron").get(1L), 72000, 500000000); TT_recipeAdder.addResearchableAssemblylineRecipe(GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 1L), - 192000, 512, 2000000, 32, new ItemStack[]{ + 32000000, 8192, 128000000, 1, new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Infinity, 64L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.NaquadahAlloy, 64L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.CosmicNeutronium, 64L), @@ -1327,7 +1327,7 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.Tritanium.getMolten(73728L), Materials.Concrete.getMolten(73728L) }, - getItemContainer("StargateFramePart").get(1L), 72000, 2000000); + getItemContainer("StargateFramePart").get(1L), 72000, 500000000); } //endregion -- cgit From dbfb2dbcdfc9715bca3a61481c350687d6bdc4f1 Mon Sep 17 00:00:00 2001 From: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Date: Thu, 20 Jan 2022 23:02:16 +0000 Subject: Fix UMV energy hatch/dynamo recipe to use correct circuit --- .../tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java index 5c2f8529a8..2efe5c5c3e 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java @@ -1111,7 +1111,7 @@ public class DreamCraftRecipeLoader implements Runnable { getItemContainer("Hull_UMV").get(1L), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.SuperconductorUHV, 16L), ItemList.Circuit_Chip_QPIC.get(4L), - getItemContainer("PikoCircuit").get(2), + getItemContainer("QuantumCircuit").get(2), ItemList.UHV_Coil.get(16L), ItemList.Reactor_Coolant_Sp_6.get(1L), ItemList.Reactor_Coolant_Sp_6.get(1L), @@ -1134,7 +1134,7 @@ public class DreamCraftRecipeLoader implements Runnable { getItemContainer("Hull_UMV").get(1L), GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Longasssuperconductornameforuhvwire, 64L), ItemList.Circuit_Chip_QPIC.get(4L), - getItemContainer("PikoCircuit").get(2), + getItemContainer("QuantumCircuit").get(2), ItemList.UHV_Coil.get(16L), ItemList.Reactor_Coolant_Sp_6.get(1L), ItemList.Reactor_Coolant_Sp_6.get(1L), -- cgit