diff options
author | Technus <daniel112092@gmail.com> | 2017-08-28 09:46:23 +0200 |
---|---|---|
committer | Technus <daniel112092@gmail.com> | 2017-08-28 09:46:23 +0200 |
commit | 1021b7368595ecfe3dd20164c45c5ef6a622ae82 (patch) | |
tree | 0fddc8f693d4678cd4de7c8c7b72f335d69d9a8c /src/main | |
parent | 6952deff8fca78f0645d0debdaf3216a04fed1a3 (diff) | |
parent | 695fa3b9413795b352e379b96059d3a147b2c636 (diff) | |
download | GT5-Unofficial-1021b7368595ecfe3dd20164c45c5ef6a622ae82.tar.gz GT5-Unofficial-1021b7368595ecfe3dd20164c45c5ef6a622ae82.tar.bz2 GT5-Unofficial-1021b7368595ecfe3dd20164c45c5ef6a622ae82.zip |
Merge branch 'master' into bassAdditions
# Conflicts:
# src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
Diffstat (limited to 'src/main')
39 files changed, 585 insertions, 376 deletions
diff --git a/src/main/java/com/github/technus/tectech/loader/MachineLoader.java b/src/main/java/com/github/technus/tectech/loader/MachineLoader.java index aa591faa50..28aee6e262 100644 --- a/src/main/java/com/github/technus/tectech/loader/MachineLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/MachineLoader.java @@ -202,7 +202,7 @@ public class MachineLoader implements Runnable { Machine_Multi_EMmachine.set(new GT_MetaTileEntity_EM_machine(15360, "multimachine.em.processing", "Quantum Processing Machine").getStackForm(1L)); - Machine_Multi_EMCrafter.set(new GT_MetaTileEntity_EM_crafter(15370, "multimachine.em.crafter", "Matter Assembler").getStackForm(1L)); + Machine_Multi_EMCrafter.set(new GT_MetaTileEntity_EM_crafting(15370, "multimachine.em.crafter", "Matter Assembler").getStackForm(1L)); Machine_Multi_Stabilizer.set(new GT_MetaTileEntity_EM_stabilizer(15380, "multimachine.em.stabilizer", "Elemental Stabilizer").getStackForm(1L)); diff --git a/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java b/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java index d1933f0ba4..51c9982752 100644 --- a/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java +++ b/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java @@ -5,7 +5,7 @@ import com.github.technus.tectech.elementalMatter.classes.cElementalDefinitionSt import com.github.technus.tectech.elementalMatter.classes.cElementalDefinitionStackMap; import com.github.technus.tectech.elementalMatter.interfaces.iElementalDefinition; import com.github.technus.tectech.thing.item.DefinitionContainer_EM; -import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_crafter; +import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_crafting; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_machine; import gregtech.api.enums.ItemList; import gregtech.api.util.GT_Recipe; @@ -80,7 +80,7 @@ public class TT_recipeAdder extends GT_RecipeAdder { else if(researchAmperage > Short.MAX_VALUE) researchAmperage=Short.MAX_VALUE; if(computationRequiredPerSec<=0) computationRequiredPerSec=1; else if(computationRequiredPerSec > Short.MAX_VALUE) computationRequiredPerSec=Short.MAX_VALUE; - TT_recipe.GT_Recipe_MapTT.sResearchableFakeRecipes.addFakeRecipe(false, new ItemStack[]{aResearchItem}, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataOrb.getWithName(1L, "Writes Research result for "+ GT_MetaTileEntity_EM_crafter.crafter)}, null, null, totalComputationRequired, researchEUt, researchAmperage|(computationRequiredPerSec<<16)); + TT_recipe.GT_Recipe_MapTT.sResearchableFakeRecipes.addFakeRecipe(false, new ItemStack[]{aResearchItem}, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataOrb.getWithName(1L, "Writes Research result for "+ GT_MetaTileEntity_EM_crafting.crafter)}, null, null, totalComputationRequired, researchEUt, researchAmperage|(computationRequiredPerSec<<16)); TT_recipe.TT_Recipe_Map.sCrafterRecipes.add(new TT_recipe.TT_assLineRecipe(false,aResearchItem,null,new ItemStack[]{aOutput},new ItemStack[]{ItemList.Tool_DataOrb.getWithName(1L, "Reads Research result")}, null,crafterDuration,crafterEUt,crafterAmperage,eInputs,null,catalyst,check)); return true; @@ -125,7 +125,7 @@ public class TT_recipeAdder extends GT_RecipeAdder { else if(computationRequiredPerSec > Short.MAX_VALUE) computationRequiredPerSec=Short.MAX_VALUE; ItemStack placeholder=new ItemStack(DefinitionContainer_EM.INSTANCE); DefinitionContainer_EM.setContent(placeholder,new cElementalDefinitionStackMap(new cElementalDefinitionStack(aResearchEM,1))); - GT_Recipe thisRecipe=TT_recipe.GT_Recipe_MapTT.sScannableFakeRecipes.addFakeRecipe(false, new ItemStack[]{placeholder}, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataOrb.getWithName(1L, "Writes Research result for "+GT_MetaTileEntity_EM_crafter.crafter)}, null, null, totalComputationRequired, researchEUt, researchAmperage|(computationRequiredPerSec<<16)); + GT_Recipe thisRecipe=TT_recipe.GT_Recipe_MapTT.sScannableFakeRecipes.addFakeRecipe(false, new ItemStack[]{placeholder}, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataOrb.getWithName(1L, "Writes Research result for "+ GT_MetaTileEntity_EM_crafting.crafter)}, null, null, totalComputationRequired, researchEUt, researchAmperage|(computationRequiredPerSec<<16)); TT_recipe.TT_Recipe_Map_EM.sCrafterRecipesEM.add(new TT_recipe.TT_EMRecipe(false,thisRecipe,aResearchEM,null,new ItemStack[]{aOutput},new ItemStack[]{ItemList.Tool_DataOrb.getWithName(1L, "Reads Research result")}, null,crafterDuration,crafterEUt,crafterAmperage,eInputs,null,catalyst,check)); return true; 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 ec6e4497cd..2ff9659b73 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 @@ -3,20 +3,30 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; +import 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.objects.GT_RenderedTexture; 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.Util.StructureBuilder; 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; /** * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { + private static Textures.BlockIcons.CustomIcon ScreenOFF; + private static Textures.BlockIcons.CustomIcon ScreenON; + //region structure private static final String[][] shape = new String[][]{ {"\u0002","D000","C0 0","C0 . 0","C0 0","D000"}, @@ -57,6 +67,22 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl } @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister aBlockIconRegister) { + ScreenOFF = new Textures.BlockIcons.CustomIcon("iconsets/EM_ANNIHILATION"); + ScreenON = new Textures.BlockIcons.CustomIcon("iconsets/EM_ANNIHILATION_ACTIVE"); + super.registerIcons(aBlockIconRegister); + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][12], new GT_RenderedTexture(aActive ? ScreenON : ScreenOFF)}; + } + return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][12]}; + } + + @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 5, 5, 0); } 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 91b933a335..34a96c7810 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 @@ -9,6 +9,8 @@ import com.github.technus.tectech.thing.metaTileEntity.IConstructable; 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; +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; @@ -17,6 +19,7 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.objects.GT_RenderedTexture; import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; @@ -33,6 +36,9 @@ import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBloc * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { + private static Textures.BlockIcons.CustomIcon ScreenOFF; + private static Textures.BlockIcons.CustomIcon ScreenON; + private final ArrayList<GT_MetaTileEntity_Hatch_Rack> eRacks = new ArrayList<>(); private int maxTemp = 0; @@ -71,6 +77,14 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB } @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister aBlockIconRegister) { + ScreenOFF = new Textures.BlockIcons.CustomIcon("iconsets/EM_COMPUTER"); + ScreenON = new Textures.BlockIcons.CustomIcon("iconsets/EM_COMPUTER_ACTIVE"); + super.registerIcons(aBlockIconRegister); + } + + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { if (aSide == aFacing) { return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][3], new GT_RenderedTexture(aActive ? ScreenON : ScreenOFF)}; @@ -82,31 +96,50 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB public boolean checkRecipe_EM(ItemStack itemStack) { eAvailableData = 0; maxTemp = 0; - short thingsActive = 0; - int rackComputation; - - for (GT_MetaTileEntity_Hatch_Rack r : eRacks) { - if (!isValidMetaTileEntity(r)) continue; - if (r.heat > maxTemp) maxTemp = r.heat; - rackComputation = r.tickComponents(eParamsIn[0], eParamsIn[10]); - if (rackComputation > 0) { - eAvailableData += rackComputation; - thingsActive += 4; + if(eParamsIn[0]>=0 && eParamsIn[10]>=0){ + float eut=V[8] * eParamsIn[10]; + if(eut<Integer.MAX_VALUE-7) + mEUt = -(int)eut; + else{ + mEUt = -(int)V[8]; + mMaxProgresstime = 0; + mEfficiencyIncrease = 0; + for (GT_MetaTileEntity_Hatch_Rack r : eRacks) + r.getBaseMetaTileEntity().setActive(false); + return false; + } + short thingsActive = 0; + int rackComputation; + + for (GT_MetaTileEntity_Hatch_Rack r : eRacks) { + if (!isValidMetaTileEntity(r)) continue; + if (r.heat > maxTemp) maxTemp = r.heat; + rackComputation = r.tickComponents(eParamsIn[0], eParamsIn[10]); + if (rackComputation > 0) { + eAvailableData += rackComputation; + thingsActive += 4; + } + r.getBaseMetaTileEntity().setActive(true); } - r.getBaseMetaTileEntity().setActive(true); - } - for (GT_MetaTileEntity_Hatch_InputData di : eInputData) - if (di.q != null)//ok for power losses - thingsActive++; - - if (thingsActive > 0 && eCertainStatus == 0) { - thingsActive += eOutputData.size(); - mEUt = -(int) (V[8] * eParamsIn[10]); - eAmpereFlow = 1 + (thingsActive >> 2); - mMaxProgresstime = 20; - mEfficiencyIncrease = 10000; - return true; + for (GT_MetaTileEntity_Hatch_InputData di : eInputData) + if (di.q != null)//ok for power losses + thingsActive++; + + if (thingsActive > 0 && eCertainStatus == 0) { + thingsActive += eOutputData.size(); + eAmpereFlow = 1 + (thingsActive >> 2); + mMaxProgresstime = 20; + mEfficiencyIncrease = 10000; + return true; + } else { + eAvailableData=0; + mEUt = -(int)V[8]; + eAmpereFlow = 1; + mMaxProgresstime = 20; + mEfficiencyIncrease = 10000; + return true; + } } mMaxProgresstime = 0; mEfficiencyIncrease = 0; @@ -122,7 +155,7 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB @Override public void updateParameters_EM() { - if (eParamsIn[0] <= 0) + if (eParamsIn[0] < 0) eParamsInStatus[0] = PARAM_TOO_LOW; else if (eParamsIn[0] < 1) eParamsInStatus[0] = PARAM_LOW; @@ -132,7 +165,7 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB eParamsInStatus[0] = PARAM_HIGH; else eParamsInStatus[0] = PARAM_TOO_HIGH; - if (eParamsIn[10] <= 0.7f) + if (eParamsIn[10] < 0.7f) eParamsInStatus[10] = PARAM_TOO_LOW; else if (eParamsIn[10] < 0.8f) eParamsInStatus[10] = PARAM_LOW; @@ -184,6 +217,7 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB @Override public void stopMachine() { super.stopMachine(); + eAvailableData=0; for (GT_MetaTileEntity_Hatch_Rack r : eRacks) r.getBaseMetaTileEntity().setActive(false); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafter.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java index affcd442ee..79ece0f7be 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafter.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java @@ -3,20 +3,30 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; +import 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.objects.GT_RenderedTexture; 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.Util.StructureBuilder; 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; /** * Created by danie_000 on 17.12.2016. */ -public class GT_MetaTileEntity_EM_crafter extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { +public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { + private static Textures.BlockIcons.CustomIcon ScreenOFF; + private static Textures.BlockIcons.CustomIcon ScreenON; + public final static String crafter="EM Crafting"; //region structure private static final String[][] shape = new String[][]{ @@ -45,16 +55,32 @@ public class GT_MetaTileEntity_EM_crafter extends GT_MetaTileEntity_MultiblockBa }; //endregion - public GT_MetaTileEntity_EM_crafter(int aID, String aName, String aNameRegional) { + public GT_MetaTileEntity_EM_crafting(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } - public GT_MetaTileEntity_EM_crafter(String aName) { + public GT_MetaTileEntity_EM_crafting(String aName) { super(aName); } public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_EM_crafter(this.mName); + return new GT_MetaTileEntity_EM_crafting(this.mName); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister aBlockIconRegister) { + ScreenOFF = new Textures.BlockIcons.CustomIcon("iconsets/EM_CRAFTING"); + ScreenON = new Textures.BlockIcons.CustomIcon("iconsets/EM_CRAFTING_ACTIVE"); + super.registerIcons(aBlockIconRegister); + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][12], new GT_RenderedTexture(aActive ? ScreenON : ScreenOFF)}; + } + return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][12]}; } @Override 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 679e0a280d..6802518fc5 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 @@ -5,10 +5,16 @@ import com.github.technus.tectech.elementalMatter.classes.cElementalInstanceStac import com.github.technus.tectech.elementalMatter.classes.cElementalInstanceStackMap; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; +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.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; +import gregtech.api.objects.GT_RenderedTexture; import net.minecraft.block.Block; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; @@ -16,12 +22,16 @@ import static com.github.technus.tectech.Util.StructureBuilder; import static com.github.technus.tectech.Util.VN; import static com.github.technus.tectech.elementalMatter.interfaces.iElementalDefinition.stableRawLifeTime; 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; /** * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { + private static Textures.BlockIcons.CustomIcon ScreenOFF; + private static Textures.BlockIcons.CustomIcon ScreenON; + //region structure private static final String[][] shape = new String[][]{ {"0C0","A ","A . ","A ","0C0",}, @@ -60,6 +70,22 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase } @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister aBlockIconRegister) { + ScreenOFF = new Textures.BlockIcons.CustomIcon("iconsets/EM_DECAY"); + ScreenON = new Textures.BlockIcons.CustomIcon("iconsets/EM_DECAY_ACTIVE"); + super.registerIcons(aBlockIconRegister); + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][12], new GT_RenderedTexture(aActive ? ScreenON : ScreenOFF)}; + } + return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][12]}; + } + + @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 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 23d472f5eb..eb6b3f06c1 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java @@ -4,11 +4,14 @@ import cofh.api.energy.IEnergyContainerItem; import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; +import com.github.technus.tectech.thing.metaTileEntity.multi.gui.GT_Container_MultiMachineEM; +import com.github.technus.tectech.thing.metaTileEntity.multi.gui.GT_GUIContainer_MultiMachineEM; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import ic2.api.item.ElectricItem; import ic2.api.item.IElectricItem; import net.minecraft.block.Block; +import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; @@ -44,11 +47,13 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa public GT_MetaTileEntity_EM_infuser(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); minRepairStatus = (byte) getIdealStatus(); + eDismantleBoom=true; } public GT_MetaTileEntity_EM_infuser(String aName) { super(aName); minRepairStatus = (byte) getIdealStatus(); + eDismantleBoom=true; } @Override @@ -61,6 +66,16 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa } @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity,true,false,true); + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "EMDisplay.png",true,false,true); + } + + @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, 0); } @@ -82,18 +97,15 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa if (ofThis instanceof IElectricItem) { mEfficiencyIncrease = 10000; mMaxProgresstime = 20; - eDismatleBoom = true; return true; } else if (TecTech.hasCOFH && ofThis instanceof IEnergyContainerItem) { mEfficiencyIncrease = 10000; mMaxProgresstime = 20; - eDismatleBoom = true; return true; } } mEfficiencyIncrease = 0; mMaxProgresstime = 0; - eDismatleBoom = false; eAmpereFlow = 0; mEUt = 0; return false; @@ -118,13 +130,6 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa } @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if ((aTick & 31) == 31) { - eSafeVoid = false; - } - } - - @Override public String[] getDescription() { return new String[]{ CommonValues.tecMark, diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java index d481d5fd24..032f1d03b3 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 @@ -34,7 +34,7 @@ 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; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; -import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_crafter.crafter; +import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_crafting.crafter; import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_machine.machine; import static gregtech.api.enums.GT_Values.E; @@ -131,45 +131,46 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB } @Override - protected void onFirstTick_EM() { - if(getBaseMetaTileEntity().isClientSide()) return; - if(computationRemaining>0) { - aRecipe=null; - tRecipe=null; - if (holdItem != null) { - if (ItemList.Tool_DataStick.isStackEqual(mInventory[1], false, true)) { - for (GT_Recipe.GT_Recipe_AssemblyLine tRecipe : GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes) { - if (GT_Utility.areStacksEqual(tRecipe.mResearchItem, holdItem, true)) { - this.tRecipe = tRecipe; - break; - } - } - } else if (ItemList.Tool_DataOrb.isStackEqual(mInventory[1], false, true)) { - for (TT_recipe.TT_assLineRecipe assRecipeTT : TT_recipe.TT_Recipe_Map.sMachineRecipes.recipeList()) { - if (GT_Utility.areStacksEqual(assRecipeTT.mResearchItem, holdItem, true)) { - this.aRecipe = assRecipeTT; - machineType = machine; - break; + public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { + if(aBaseMetaTileEntity.isServerSide()) { + if (computationRemaining > 0) { + aRecipe = null; + tRecipe = null; + if (holdItem != null) { + if (ItemList.Tool_DataStick.isStackEqual(mInventory[1], false, true)) { + for (GT_Recipe.GT_Recipe_AssemblyLine tRecipe : GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes) { + if (GT_Utility.areStacksEqual(tRecipe.mResearchItem, holdItem, true)) { + this.tRecipe = tRecipe; + break; + } } - } - if (aRecipe == null) { - for (TT_recipe.TT_assLineRecipe assRecipeTT : TT_recipe.TT_Recipe_Map.sCrafterRecipes.recipeList()) { + } else if (ItemList.Tool_DataOrb.isStackEqual(mInventory[1], false, true)) { + for (TT_recipe.TT_assLineRecipe assRecipeTT : TT_recipe.TT_Recipe_Map.sMachineRecipes.recipeList()) { if (GT_Utility.areStacksEqual(assRecipeTT.mResearchItem, holdItem, true)) { this.aRecipe = assRecipeTT; - machineType = crafter; + machineType = machine; break; } } + if (aRecipe == null) { + for (TT_recipe.TT_assLineRecipe assRecipeTT : TT_recipe.TT_Recipe_Map.sCrafterRecipes.recipeList()) { + if (GT_Utility.areStacksEqual(assRecipeTT.mResearchItem, holdItem, true)) { + this.aRecipe = assRecipeTT; + machineType = crafter; + break; + } + } + } } } - } - if (tRecipe == null && aRecipe == null) { - holdItem=null; - computationRequired=computationRemaining=0; - mMaxProgresstime = 0; - mEfficiencyIncrease = 0; - for (GT_MetaTileEntity_Hatch_Holder r : eHolders) - r.getBaseMetaTileEntity().setActive(false); + if (tRecipe == null && aRecipe == null) { + holdItem = null; + computationRequired = computationRemaining = 0; + mMaxProgresstime = 0; + mEfficiencyIncrease = 0; + for (GT_MetaTileEntity_Hatch_Holder r : eHolders) + r.getBaseMetaTileEntity().setActive(false); + } } } } 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 e73a313619..5fcd1d054a 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 @@ -29,6 +29,8 @@ import static com.github.technus.tectech.elementalMatter.definitions.cPrimitiveD 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; +import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_crafting.crafter; +import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_machine.machine; /** * Created by danie_000 on 17.12.2016. @@ -71,10 +73,12 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa public GT_MetaTileEntity_EM_scanner(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); + eDismantleBoom=true; } public GT_MetaTileEntity_EM_scanner(String aName) { super(aName); + eDismantleBoom=true; } public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { @@ -139,30 +143,31 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa } @Override - protected void onFirstTick_EM() { - if(getBaseMetaTileEntity().isClientSide()) return; - if(computationRemaining>0) { - eRecipe=null; - if (objectResearched!=null) { - if(ItemList.Tool_DataOrb.isStackEqual(mInventory[1], false, true)) { - eRecipe = TT_recipe.TT_Recipe_Map_EM.sMachineRecipesEM.findRecipe(objectResearched.definition); - if(eRecipe!=null) { - machineType=GT_MetaTileEntity_EM_machine.machine; - } else { - eRecipe = TT_recipe.TT_Recipe_Map_EM.sCrafterRecipesEM.findRecipe(objectResearched.definition); + public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { + if(aBaseMetaTileEntity.isServerSide()) { + if (computationRemaining > 0) { + eRecipe = null; + if (objectResearched != null) { + if (ItemList.Tool_DataOrb.isStackEqual(mInventory[1], false, true)) { + eRecipe = TT_recipe.TT_Recipe_Map_EM.sMachineRecipesEM.findRecipe(objectResearched.definition); if (eRecipe != null) { - machineType = GT_MetaTileEntity_EM_crafter.crafter; + machineType = machine; + } else { + eRecipe = TT_recipe.TT_Recipe_Map_EM.sCrafterRecipesEM.findRecipe(objectResearched.definition); + if (eRecipe != null) { + machineType = crafter; + } } } } + if (eRecipe == null) { + quantumStuff(false); + objectResearched = null; + computationRequired = computationRemaining = 0; + mMaxProgresstime = 0; + mEfficiencyIncrease = 0; + } else quantumStuff(true); } - if (eRecipe == null) { - quantumStuff(false); - objectResearched=null; - computationRequired=computationRemaining=0; - mMaxProgresstime = 0; - mEfficiencyIncrease = 0; - } else quantumStuff(true); } } @@ -177,7 +182,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa eRecipe = TT_recipe.TT_Recipe_Map_EM.sMachineRecipesEM.findRecipe(stackEM.definition); if(eRecipe!=null) { scannerRecipe=eRecipe.scannerRecipe; - machineType=GT_MetaTileEntity_EM_machine.machine; + machineType= machine; objectResearched=new cElementalDefinitionStack(stackEM.definition,1); //cleanMassEM_EM(objectResearched.getMass()); researchEM.remove(objectResearched.definition); @@ -186,7 +191,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa eRecipe = TT_recipe.TT_Recipe_Map_EM.sCrafterRecipesEM.findRecipe(stackEM.definition); if(eRecipe!=null) { scannerRecipe=eRecipe.scannerRecipe; - machineType=GT_MetaTileEntity_EM_crafter.crafter; + machineType= crafter; objectResearched=new cElementalDefinitionStack(stackEM.definition,1); //cleanMassEM_EM(objectResearched.getMass()); researchEM.remove(objectResearched.definition); @@ -318,6 +323,5 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa base.getWorld().setBlock(xDir, yDir, zDir, Blocks.air,0,2); } } - eDismatleBoom=shouldExist; } } 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 8d8b758103..0ec32e52fb 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 @@ -2,12 +2,15 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; +import com.github.technus.tectech.thing.metaTileEntity.multi.gui.GT_Container_MultiMachineEM; +import com.github.technus.tectech.thing.metaTileEntity.multi.gui.GT_GUIContainer_MultiMachineEM; 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.objects.GT_RenderedTexture; import net.minecraft.block.Block; +import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; @@ -47,6 +50,7 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo mHardHammer = true; mSolderingTool = true; mCrowbar = true; + eDismantleBoom=true; } public GT_MetaTileEntity_EM_transformer(String aName) { @@ -57,6 +61,7 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo mHardHammer = true; mSolderingTool = true; mCrowbar = true; + eDismantleBoom=true; } public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { @@ -74,6 +79,16 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo } @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity,true,false,false); + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "EMDisplay.png",true,false,false); + } + + @Override public String[] getStructureDescription(int stackSize) { return description; } @@ -106,7 +121,6 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo } eAmpereFlow = 0; mEUt = 0; - eDismatleBoom = ePowerPass; return ePowerPass; } @@ -119,7 +133,6 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if ((aTick & 31) == 31) { ePowerPass = aBaseMetaTileEntity.isAllowedToWork(); - eSafeVoid = false; } } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java index 920b2ba33b..f6b64f3361 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java @@ -75,10 +75,15 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt public final float[] eParamsOut = new float[20];//float number O to parametrizers public final byte[] eParamsInStatus = new byte[20];//LED status for I public final byte[] eParamsOutStatus = new byte[20];//LED status for O - public final static byte PARAM_UNUSED = 0, PARAM_OK = 1, PARAM_TOO_LOW = 2, PARAM_LOW = 3, PARAM_TOO_HIGH = 4, PARAM_HIGH = 5, PARAM_WRONG = 6; + public final static byte PARAM_UNUSED = 0, + PARAM_TOO_LOW = 1, PARAM_LOW = 2, + PARAM_WRONG = 3, PARAM_OK = 4, + PARAM_TOO_HIGH = 5, PARAM_HIGH = 6; + // 0,2,4,6 - ok + // 1,3,5 - nok //TO ENABLE this change value in <init> to false and/or other than 0, can also be added in recipe check or whatever - public boolean eParameters = true, ePowerPass = false, eSafeVoid = false, eDismatleBoom = false; + public boolean eParameters = true, ePowerPass = false, eSafeVoid = false, eDismantleBoom = false; public byte eCertainMode = 0, eCertainStatus = 0, minRepairStatus = 3; protected long eMaxAmpereFlow = 0;//don't modify! unless YOU REALLY HAVE TO @@ -87,7 +92,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt public long eRequiredData = 0; protected long eAvailableData = 0; - private boolean previousTickValueForWorkEnabled=false; + private boolean explodedThisTick=false; //init param states in constructor, or implement it in checkrecipe/outputfunction @@ -121,10 +126,6 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt protected void extraExplosions_EM() { }//For that extra hatches explosions, and maybe some MOORE EXPLOSIONS - protected void workGotDisabled_EM(){}//called at end of onPostTick - //callback on enable/disable work, they don't care if the multiblock is complete or not - //(you can check that with looking at mMachine and other variables) - //machine structure check protected boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { return false; @@ -146,8 +147,6 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt //default is once per 50s; mUpdate is decremented every tick } - protected void onFirstTick_EM(){} // callback on first tick - @Override public int getPollutionPerTick(ItemStack itemStack) { return 0; @@ -157,11 +156,33 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt return 0; } + //triggered if machine is not allowed to work after completing a recipe + protected void notAllowedToWork_stopMachine_EM(){ + stopMachine(); + } + //Override if needed but usually call super method at start! //On machine stop - NOT called when softhammered to offline state! - it SHOULD cause a full stop like power failure does - //Can be overriden to alter stopping behaviour, to do things on soft hammer scenario -> workGotDisabled_EM @Override public void stopMachine() { + if (outputEM != null) { + float mass = 0; + for (cElementalInstanceStackMap tree : outputEM) + mass += tree.getMass(); + if (mass > 0) { + if (eMufflerHatches.size() < 1) explodeMultiblock(); + else { + mass /= eMufflerHatches.size(); + for (GT_MetaTileEntity_Hatch_MufflerElemental dump : eMufflerHatches) + if (dump.addOverflowMatter(mass)) explodeMultiblock(); + } + } + outputEM = null; + } + + for (GT_MetaTileEntity_Hatch_OutputData data : eOutputData) + data.q = null; + mOutputItems = null; mOutputFluids = null; mEfficiency = 0; @@ -169,27 +190,17 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt mMaxProgresstime = 0; mEfficiencyIncrease = 0; getBaseMetaTileEntity().disableWorking(); - - for (GT_MetaTileEntity_Hatch_OutputData data : eOutputData) { - data.q = null; - } - - float mass = 0; - if (outputEM == null) return; - for (cElementalInstanceStackMap tree : outputEM) - mass += tree.getMass(); - if (mass > 0) { - if (eMufflerHatches.size() < 1) explodeMultiblock(); - mass /= eMufflerHatches.size(); - for (GT_MetaTileEntity_Hatch_MufflerElemental dump : eMufflerHatches) { - if (dump.addOverflowMatter(mass)) explodeMultiblock(); - } - } - outputEM = null; - hatchesStatusUpdate_EM(); } + @Override + public String[] getDescription() { + return new String[]{ + CommonValues.tecMark, + "Nothing special just override me." + }; + } + //RATHER LEAVE ALONE Section public GT_MetaTileEntity_MultiblockBase_EM(int aID, String aName, String aNameRegional) { @@ -245,7 +256,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt aNBT.setBoolean("eParam", eParameters); aNBT.setBoolean("ePass", ePowerPass); aNBT.setBoolean("eVoid", eSafeVoid); - aNBT.setBoolean("eBoom", eDismatleBoom); + aNBT.setBoolean("eBoom", eDismantleBoom); aNBT.setBoolean("eOK", mMachine); //Ensures compatibility @@ -318,7 +329,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt eParameters = aNBT.getBoolean("eParam"); ePowerPass = aNBT.getBoolean("ePass"); eSafeVoid = aNBT.getBoolean("eVoid"); - eDismatleBoom = aNBT.getBoolean("eBoom"); + eDismantleBoom = aNBT.getBoolean("eBoom"); mMachine = aNBT.getBoolean("eOK"); //Ensures compatibility @@ -367,26 +378,6 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt eParamsOutStatus[i] = paramOs.getByte(Integer.toString(i)); } - @Override - public final long maxEUStore() { - return (maxEUinputMin * eMaxAmpereFlow) << 3; - } - - @Override - public final long getMinimumStoredEU() { - return maxEUStore() >> 1; - } - - @Override - public final long maxAmperesIn() { - return 0L; - } - - @Override - public final long maxAmperesOut() { - return 0L; - } - private boolean cyclicUpdate() { if (cyclicUpdate_EM()) { mUpdate = 0; @@ -400,17 +391,37 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt return checkMachine_EM(iGregTechTileEntity, itemStack); } - @Override - public final void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { - super.onFirstTick(aBaseMetaTileEntity); - previousTickValueForWorkEnabled=getBaseMetaTileEntity().isAllowedToWork();//Assign new value - onFirstTick_EM(); + //can be used to check structures of multi-blocks larger than one chunk, but... + //ALL THE HATCHES AND THE CONTROLLER SHOULD BE IN ONE CHUNK OR IN LOADED CHUNKS + @Deprecated + public final boolean structureCheck_EM( + 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 + int horizontalOffset, int verticalOffset, int depthOffset) { + return StructureChecker(structure, blockType, blockMeta, + horizontalOffset, verticalOffset, depthOffset, getBaseMetaTileEntity(), !mMachine); + } + + public final boolean structureCheck_EM( + 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 + String[] addingMethods, + short[] casingTextures, + Block[] blockTypeFallback,//use numbers 0-9 for casing types + byte[] blockMetaFallback,//use numbers 0-9 for casing types + int horizontalOffset, int verticalOffset, int depthOffset) { + return StructureCheckerAdvanced(structure, blockType, blockMeta, + adderMethod, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, + horizontalOffset, verticalOffset, depthOffset, getBaseMetaTileEntity(), !mMachine); } //CAREFUL!!! it calls most of the callbacks @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isServerSide()) { + explodedThisTick=false; if (mEfficiency < 0) mEfficiency = 0; if (--mUpdate == 0 || --mStartUpCheck == 0 || cyclicUpdate() || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) { @@ -452,14 +463,13 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt ((BaseTileEntity) getBaseMetaTileEntity()).ignoreUnloadedChunks = mMachine; mMachine = checkMachine(aBaseMetaTileEntity, mInventory[1]); - if (!mMachine) - if (eDismatleBoom && mMaxProgresstime > 0) explodeMultiblock(); - else if (outputEM != null) + if (!mMachine) { + if ((ePowerPass && getEUVar() > V[3]) || (eDismantleBoom && mMaxProgresstime > 0)) + explodeMultiblock(); + if (outputEM != null) for (cElementalInstanceStackMap tree : outputEM) - if (tree.hasStacks()) { - explodeMultiblock(); - break; - } + if (tree.hasStacks()) explodeMultiblock(); + } if (eUncertainHatches.size() > 1) mMachine = false; @@ -586,6 +596,46 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt if (multiCheckAt == Tick) hatchesStatusUpdate_EM(); + //region power pass and controller charging + {//DO + long euVar; + for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) { + if (this.getEUVar() > this.getMinimumStoredEU()) break; + if (isValidMetaTileEntity(tHatch)) { + euVar = tHatch.maxEUInput(); + if (tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(euVar, false)) + this.setEUVar(this.getEUVar() + euVar); + } + } + for (GT_MetaTileEntity_Hatch_EnergyMulti tHatch : eEnergyMulti) { + if (this.getEUVar() > this.getMinimumStoredEU()) break; + if (isValidMetaTileEntity(tHatch)) { + euVar = tHatch.maxEUInput() * tHatch.Amperes; + if (tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(euVar, false)) + this.setEUVar(this.getEUVar() + euVar); + } + } + if (ePowerPass) { + for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { + if (isValidMetaTileEntity(tHatch)) { + euVar = tHatch.maxEUOutput(); + if (tHatch.getBaseMetaTileEntity().getStoredEU() <= (tHatch.maxEUStore() - euVar) && + aBaseMetaTileEntity.decreaseStoredEnergyUnits(euVar + Math.min(euVar >> 7,1), false)) + tHatch.setEUVar(tHatch.getBaseMetaTileEntity().getStoredEU() + euVar); + } + } + for (GT_MetaTileEntity_Hatch_DynamoMulti tHatch : eDynamoMulti) { + if (isValidMetaTileEntity(tHatch)) { + euVar = tHatch.maxEUOutput() * tHatch.Amperes; + if (tHatch.getBaseMetaTileEntity().getStoredEU() <= tHatch.maxEUStore() - euVar && + aBaseMetaTileEntity.decreaseStoredEnergyUnits(euVar + Math.min(euVar >> 7,tHatch.Amperes), false)) + tHatch.setEUVar(tHatch.getBaseMetaTileEntity().getStoredEU() + euVar); + } + } + } + } + //endregion + if (mMaxProgresstime > 0 && doRandomMaintenanceDamage()) {//Start if (onRunningTick(mInventory[1])) {//Compute EU if (!polluteEnvironment(getPollutionPerTick(mInventory[1]))) stopMachine(); @@ -618,9 +668,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt mEfficiency = Math.max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]) - ((getIdealStatus() - getRepairStatus()) * 1000))); } updateSlots(); - }// else {//not allowed to work - // stopMachine(); - //} + } else notAllowedToWork_stopMachine_EM(); } }// else {//failed to consume power/resources - inside on running tick // stopMachine(); @@ -631,59 +679,16 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt mEfficiency = Math.max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]) - ((getIdealStatus() - getRepairStatus()) * 1000))); } updateSlots(); - }// else {//not allowed to work - // stopMachine(); - //} - } - - {//DO ONCE - long euVar; - for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) { - if (this.getEUVar() > this.getMinimumStoredEU()) break; - if (isValidMetaTileEntity(tHatch)) { - euVar = tHatch.maxEUInput(); - if (tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(euVar, false)) - this.setEUVar(this.getEUVar() + euVar); - } - } - for (GT_MetaTileEntity_Hatch_EnergyMulti tHatch : eEnergyMulti) { - if (this.getEUVar() > this.getMinimumStoredEU()) break; - if (isValidMetaTileEntity(tHatch)) { - euVar = tHatch.maxEUInput() * tHatch.Amperes; - if (tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(euVar, false)) - this.setEUVar(this.getEUVar() + euVar); - } - } - if (ePowerPass) { - for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { - if (isValidMetaTileEntity(tHatch)) { - euVar = tHatch.maxEUOutput(); - if (tHatch.getBaseMetaTileEntity().getStoredEU() <= (tHatch.maxEUStore() - euVar) && - aBaseMetaTileEntity.decreaseStoredEnergyUnits(euVar + Math.min(euVar >> 7,1), false)) - tHatch.setEUVar(tHatch.getBaseMetaTileEntity().getStoredEU() + euVar); - } - } - for (GT_MetaTileEntity_Hatch_DynamoMulti tHatch : eDynamoMulti) { - if (isValidMetaTileEntity(tHatch)) { - euVar = tHatch.maxEUOutput() * tHatch.Amperes; - if (tHatch.getBaseMetaTileEntity().getStoredEU() <= tHatch.maxEUStore() - euVar && - aBaseMetaTileEntity.decreaseStoredEnergyUnits(euVar + Math.min(euVar >> 7,tHatch.Amperes), false)) - tHatch.setEUVar(tHatch.getBaseMetaTileEntity().getStoredEU() + euVar); - } - } - } + } //else notAllowedToWork_stopMachine_EM(); //it is already stopped here } } else {//not repaired stopMachine(); } - } else {//not machine + } else {//not complete stopMachine(); } } - if (previousTickValueForWorkEnabled && !getBaseMetaTileEntity().isAllowedToWork()) workGotDisabled_EM(); - previousTickValueForWorkEnabled = getBaseMetaTileEntity().isAllowedToWork();//Assign new value - aBaseMetaTileEntity.setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID() & -512) | (mWrench ? 0 : 1) | (mScrewdriver ? 0 : 2) | (mSoftHammer ? 0 : 4) | (mHardHammer ? 0 : 8) | (mSolderingTool ? 0 : 16) | (mCrowbar ? 0 : 32) | (mMachine ? 0 : 64) | ((eCertainStatus == 0) ? 0 : 128) | (eParameters ? 0 : 256)); aBaseMetaTileEntity.setActive(mMaxProgresstime > 0); boolean active = aBaseMetaTileEntity.isActive() && mPollution > 0; @@ -728,17 +733,36 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt @Override public boolean onRunningTick(ItemStack aStack) { - if (eRequiredData > 0 && eRequiredData > eAvailableData) { + if (eRequiredData > eAvailableData || + (this.mEUt < 0 && !this.drainEnergyInput_EM((long) (-this.mEUt) * getMaxEfficiency(aStack) / (long) Math.max(1000, this.mEfficiency), eAmpereFlow))) { stopMachine(); return false; } - if (this.mEUt > 0) { + if (this.mEUt > 0) this.addEnergyOutput_EM((long) mEUt * (long) mEfficiency / getMaxEfficiency(aStack), eAmpereFlow); - return true; - } else if (this.mEUt < 0 && !this.drainEnergyInput_EM((long) (-this.mEUt) * getMaxEfficiency(aStack) / (long) Math.max(1000, this.mEfficiency), eAmpereFlow)) { - stopMachine(); - return false; - } else return true; + return true; + } + + //region energy + + @Override + public final long maxEUStore() { + return (maxEUinputMin * eMaxAmpereFlow) << 3; + } + + @Override + public final long getMinimumStoredEU() { + return maxEUStore() >> 1; + } + + @Override + public final long maxAmperesIn() { + return 0L; + } + + @Override + public final long maxAmperesOut() { + return 0L; } @Deprecated @@ -868,6 +892,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt public final int getMinEnergyInputTier_EM() { return Util.getTier(maxEUinputMin); } + //endregion //new Method public final cElementalInstanceStackMap getInputsClone_EM(){ @@ -898,6 +923,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt purgeAllOverflowEM_EM(); } + //region em cleaning private void purgeAllOverflowEM_EM() { float mass = 0; for (GT_MetaTileEntity_Hatch_InputElemental tHatch : eInputHatches) { @@ -911,14 +937,10 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt tHatch.overflowMatter = 0; } if (mass > 0) { - if (eMufflerHatches.size() < 1) { - explodeMultiblock(); - return; - } + if (eMufflerHatches.size() < 1) explodeMultiblock(); mass /= eMufflerHatches.size(); - for (GT_MetaTileEntity_Hatch_MufflerElemental dump : eMufflerHatches) { + for (GT_MetaTileEntity_Hatch_MufflerElemental dump : eMufflerHatches) if (dump.addOverflowMatter(mass)) explodeMultiblock(); - } } } @@ -928,9 +950,8 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt if (mass > 0) { if (eMufflerHatches.size() < 1) explodeMultiblock(); mass /= eMufflerHatches.size(); - for (GT_MetaTileEntity_Hatch_MufflerElemental dump : eMufflerHatches) { + for (GT_MetaTileEntity_Hatch_MufflerElemental dump : eMufflerHatches) if (dump.addOverflowMatter(mass)) explodeMultiblock(); - } } } @@ -943,9 +964,8 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt if (mass > 0) { if (eMufflerHatches.size() < 1) explodeMultiblock(); mass /= eMufflerHatches.size(); - for (GT_MetaTileEntity_Hatch_MufflerElemental dump : eMufflerHatches) { + for (GT_MetaTileEntity_Hatch_MufflerElemental dump : eMufflerHatches) if (dump.addOverflowMatter(mass)) explodeMultiblock(); - } } } @@ -956,17 +976,14 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt mass = map.removeOverflow(0, 0); if (mass > 0) { - if (eMufflerHatches.size() < 1) { - explodeMultiblock(); - return; - } + if (eMufflerHatches.size() < 1) explodeMultiblock(); mass /= eMufflerHatches.size(); - for (GT_MetaTileEntity_Hatch_MufflerElemental dump : eMufflerHatches) { + for (GT_MetaTileEntity_Hatch_MufflerElemental dump : eMufflerHatches) if (dump.addOverflowMatter(mass)) explodeMultiblock(); - } } outputEM = null; } + //endregion @Override public final boolean checkRecipe(ItemStack itemStack) {//do recipe checks, based on "machine content and state" @@ -1007,7 +1024,14 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt } @Override - public void explodeMultiblock() {//BEST METHOD EVER!!! + public final void explodeMultiblock() { + if(explodedThisTick)return; + extraExplosions_EM(); + explodeMultiblock_EM(); + explodedThisTick=true; + } + + private void explodeMultiblock_EM(){ if (!TecTech.ModConfig.BOOM_ENABLE) { TecTech.proxy.broadcast("Multi Explode BOOM! " + getBaseMetaTileEntity().getXCoord() + " " + getBaseMetaTileEntity().getYCoord() + " " + getBaseMetaTileEntity().getZCoord()); StackTraceElement[] ste = Thread.currentThread().getStackTrace(); @@ -1033,11 +1057,44 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt for (MetaTileEntity tTileEntity : eDynamoMulti) tTileEntity.getBaseMetaTileEntity().doExplosion(V[14]); for (MetaTileEntity tTileEntity : eInputData) tTileEntity.getBaseMetaTileEntity().doExplosion(V[9]); for (MetaTileEntity tTileEntity : eOutputData) tTileEntity.getBaseMetaTileEntity().doExplosion(V[9]); - extraExplosions_EM(); getBaseMetaTileEntity().doExplosion(V[15]); } @Override + public void doExplosion(long aExplosionPower) { + explodeMultiblock(); + }//Redirecting to explodemultiblock + + @Override + public void onRemoval() { + try { + if (eOutputHatches != null) { + for (GT_MetaTileEntity_Hatch_ElementalContainer hatch_elemental : eOutputHatches) + hatch_elemental.id = -1; + for (GT_MetaTileEntity_Hatch_ElementalContainer hatch_elemental : eInputHatches) + hatch_elemental.id = -1; + for (GT_MetaTileEntity_Hatch_OutputData hatch_data : eOutputData) { + hatch_data.id = -1; + hatch_data.q = null; + } + for (GT_MetaTileEntity_Hatch_DataConnector hatch_data : eInputData) + hatch_data.id = -1; + for (GT_MetaTileEntity_Hatch_Uncertainty hatch : eUncertainHatches) + hatch.getBaseMetaTileEntity().setActive(false); + for (GT_MetaTileEntity_Hatch_Param hatch : eParamHatches) + hatch.getBaseMetaTileEntity().setActive(false); + } + if ((ePowerPass && getEUVar()>V[3]) || (eDismantleBoom && mMaxProgresstime > 0)) explodeMultiblock(); + if (outputEM != null) + for (cElementalInstanceStackMap output : outputEM) + if (output.hasStacks()) explodeMultiblock(); + } catch (Exception e) { + if (DEBUG_MODE) e.printStackTrace(); + } + } + + //region adder methods + @Override public final boolean addToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { if (aTileEntity == null) return false; IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); @@ -1409,6 +1466,45 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt } return false; } + //endregion + + public static void run() { + try { + adderMethodMap.put("addToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addToMachineList", IGregTechTileEntity.class, int.class)); + adderMethodMap.put("addClassicToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addClassicToMachineList", IGregTechTileEntity.class, int.class)); + adderMethodMap.put("addElementalToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addElementalToMachineList", IGregTechTileEntity.class, int.class)); + adderMethodMap.put("addMufflerToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addMufflerToMachineList", IGregTechTileEntity.class, int.class)); + adderMethodMap.put("addClassicMufflerToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addClassicMufflerToMachineList", IGregTechTileEntity.class, int.class)); + adderMethodMap.put("addElementalMufflerToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addElementalMufflerToMachineList", IGregTechTileEntity.class, int.class)); + adderMethodMap.put("addInputToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addInputToMachineList", IGregTechTileEntity.class, int.class)); + adderMethodMap.put("addOutputToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addOutputToMachineList", IGregTechTileEntity.class, int.class)); + adderMethodMap.put("addEnergyInputToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addEnergyInputToMachineList", IGregTechTileEntity.class, int.class)); + adderMethodMap.put("addDynamoToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addDynamoToMachineList", IGregTechTileEntity.class, int.class)); + adderMethodMap.put("addEnergyIOToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addEnergyIOToMachineList", IGregTechTileEntity.class, int.class)); + adderMethodMap.put("addElementalInputToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addElementalInputToMachineList", IGregTechTileEntity.class, int.class)); + adderMethodMap.put("addElementalOutputToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addElementalOutputToMachineList", IGregTechTileEntity.class, int.class)); + adderMethodMap.put("addClassicInputToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addClassicInputToMachineList", IGregTechTileEntity.class, int.class)); + adderMethodMap.put("addClassicOutputToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addClassicOutputToMachineList", IGregTechTileEntity.class, int.class)); + adderMethodMap.put("addParametrizerToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addParametrizerToMachineList", IGregTechTileEntity.class, int.class)); + adderMethodMap.put("addUncertainToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addUncertainToMachineList", IGregTechTileEntity.class, int.class)); + adderMethodMap.put("addMaintenanceToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addMaintenanceToMachineList", IGregTechTileEntity.class, int.class)); + adderMethodMap.put("addClassicMaintenanceToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addClassicMaintenanceToMachineList", IGregTechTileEntity.class, int.class)); + adderMethodMap.put("addDataConnectorToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addDataConnectorToMachineList", IGregTechTileEntity.class, int.class)); + adderMethod = GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addThing", String.class, IGregTechTileEntity.class, int.class); + } catch (NoSuchMethodException e) { + if (DEBUG_MODE) e.printStackTrace(); + } + } + + //CALLBACK + public boolean addThing(String methodName, IGregTechTileEntity igt, int casing) { + try { + return (boolean) adderMethodMap.get(methodName).invoke(this, igt, casing); + } catch (InvocationTargetException | IllegalAccessException e) { + if (DEBUG_MODE) e.printStackTrace(); + } + return false; + } @Override public String[] getInfoData() {//TODO Do it @@ -1451,107 +1547,4 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt public boolean isGivingInformation() { return true; } - - //can be used to check structures of multi-blocks larger than one chunk, but... - //ALL THE HATCHES AND THE CONTROLLER SHOULD BE IN ONE CHUNK OR IN LOADED CHUNKS - @Deprecated - public final boolean structureCheck_EM( - 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 - int horizontalOffset, int verticalOffset, int depthOffset) { - return StructureChecker(structure, blockType, blockMeta, - horizontalOffset, verticalOffset, depthOffset, getBaseMetaTileEntity(), !mMachine); - } - - public final boolean structureCheck_EM( - 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 - String[] addingMethods, - short[] casingTextures, - Block[] blockTypeFallback,//use numbers 0-9 for casing types - byte[] blockMetaFallback,//use numbers 0-9 for casing types - int horizontalOffset, int verticalOffset, int depthOffset) { - return StructureCheckerAdvanced(structure, blockType, blockMeta, - adderMethod, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, - horizontalOffset, verticalOffset, depthOffset, getBaseMetaTileEntity(), !mMachine); - } - - @Override - public String[] getDescription() { - return new String[]{ - CommonValues.tecMark, - "Nothing special just override me." - }; - } - - @Override - public void onRemoval() { - try { - if (eOutputHatches != null) { - for (GT_MetaTileEntity_Hatch_ElementalContainer hatch_elemental : eOutputHatches) - hatch_elemental.id = -1; - for (GT_MetaTileEntity_Hatch_ElementalContainer hatch_elemental : eInputHatches) - hatch_elemental.id = -1; - for (GT_MetaTileEntity_Hatch_OutputData hatch_data : eOutputData) { - hatch_data.id = -1; - hatch_data.q = null; - } - for (GT_MetaTileEntity_Hatch_DataConnector hatch_data : eInputData) - hatch_data.id = -1; - for (GT_MetaTileEntity_Hatch_Uncertainty hatch : eUncertainHatches) - hatch.getBaseMetaTileEntity().setActive(false); - for (GT_MetaTileEntity_Hatch_Param hatch : eParamHatches) - hatch.getBaseMetaTileEntity().setActive(false); - } - if (eDismatleBoom && mMaxProgresstime > 0) explodeMultiblock(); - else if (outputEM != null) - for (cElementalInstanceStackMap output : outputEM) - if (output.hasStacks()) { - explodeMultiblock(); - return; - } - } catch (Exception e) { - if (DEBUG_MODE) e.printStackTrace(); - } - } - - public static void run() { - try { - adderMethodMap.put("addToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addToMachineList", IGregTechTileEntity.class, int.class)); - adderMethodMap.put("addClassicToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addClassicToMachineList", IGregTechTileEntity.class, int.class)); - adderMethodMap.put("addElementalToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addElementalToMachineList", IGregTechTileEntity.class, int.class)); - adderMethodMap.put("addMufflerToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addMufflerToMachineList", IGregTechTileEntity.class, int.class)); - adderMethodMap.put("addClassicMufflerToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addClassicMufflerToMachineList", IGregTechTileEntity.class, int.class)); - adderMethodMap.put("addElementalMufflerToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addElementalMufflerToMachineList", IGregTechTileEntity.class, int.class)); - adderMethodMap.put("addInputToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addInputToMachineList", IGregTechTileEntity.class, int.class)); - adderMethodMap.put("addOutputToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addOutputToMachineList", IGregTechTileEntity.class, int.class)); - adderMethodMap.put("addEnergyInputToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addEnergyInputToMachineList", IGregTechTileEntity.class, int.class)); - adderMethodMap.put("addDynamoToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addDynamoToMachineList", IGregTechTileEntity.class, int.class)); - adderMethodMap.put("addEnergyIOToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addEnergyIOToMachineList", IGregTechTileEntity.class, int.class)); - adderMethodMap.put("addElementalInputToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addElementalInputToMachineList", IGregTechTileEntity.class, int.class)); - adderMethodMap.put("addElementalOutputToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addElementalOutputToMachineList", IGregTechTileEntity.class, int.class)); - adderMethodMap.put("addClassicInputToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addClassicInputToMachineList", IGregTechTileEntity.class, int.class)); - adderMethodMap.put("addClassicOutputToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addClassicOutputToMachineList", IGregTechTileEntity.class, int.class)); - adderMethodMap.put("addParametrizerToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addParametrizerToMachineList", IGregTechTileEntity.class, int.class)); - adderMethodMap.put("addUncertainToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addUncertainToMachineList", IGregTechTileEntity.class, int.class)); - adderMethodMap.put("addMaintenanceToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addMaintenanceToMachineList", IGregTechTileEntity.class, int.class)); - adderMethodMap.put("addClassicMaintenanceToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addClassicMaintenanceToMachineList", IGregTechTileEntity.class, int.class)); - adderMethodMap.put("addDataConnectorToMachineList", GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addDataConnectorToMachineList", IGregTechTileEntity.class, int.class)); - adderMethod = GT_MetaTileEntity_MultiblockBase_EM.class.getMethod("addThing", String.class, IGregTechTileEntity.class, int.class); - } catch (NoSuchMethodException e) { - if (DEBUG_MODE) e.printStackTrace(); - } - } - - //CALLBACK - public boolean addThing(String methodName, IGregTechTileEntity igt, int casing) { - try { - return (boolean) adderMethodMap.get(methodName).invoke(this, igt, casing); - } catch (InvocationTargetException | IllegalAccessException e) { - if (DEBUG_MODE) e.printStackTrace(); - } - return false; - } } 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 a63f948bf1..29ad312a79 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 @@ -3,6 +3,8 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.auxiliary.Reference; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; +import com.github.technus.tectech.thing.metaTileEntity.multi.gui.GT_Container_MultiMachineEM; +import com.github.technus.tectech.thing.metaTileEntity.multi.gui.GT_GUIContainer_MultiMachineEM; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -15,6 +17,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; @@ -91,6 +94,16 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock } @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, false, false, true); + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "EMDisplay.png", false, false, true); + } + + @Override public boolean isFacingValid(byte aFacing) { return aFacing >= 2; } @@ -255,11 +268,6 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock } @Override - protected void workGotDisabled_EM() { - timerValue=0; - } - - @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); aNBT.setInteger("eTimerVal", timerValue); @@ -272,17 +280,7 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock } @Override - public void doExplosion(long aExplosionPower) { - explodeMultiblock(); - }//Redirecting to explodemultiblock - - @Override public byte getTileEntityBaseType() { return 1; } - - @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - ePowerPass=false; - } } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/gui/GT_Container_MultiMachineEM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/gui/GT_Container_MultiMachineEM.java index e104829340..769953d0ef 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/gui/GT_Container_MultiMachineEM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/gui/GT_Container_MultiMachineEM.java @@ -15,13 +15,23 @@ public class GT_Container_MultiMachineEM extends GT_ContainerMetaTile_Machine { public byte[] eParamsOutStatus = new byte[20]; public byte eCertainMode = 5, eCertainStatus = 127; public boolean ePowerPass = false, eSafeVoid = false, allowedToWork = false; + public final boolean ePowerPassButton, eSafeVoidButton, allowedToWorkButton; + + public GT_Container_MultiMachineEM(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, boolean enablePowerPass, boolean enableSafeVoid, boolean enablePowerButton) { + super(aInventoryPlayer, aTileEntity); + ePowerPassButton=enablePowerPass; + eSafeVoidButton=enableSafeVoid; + allowedToWorkButton=enablePowerButton; + } public GT_Container_MultiMachineEM(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); + ePowerPassButton=eSafeVoidButton=allowedToWorkButton=true; } public GT_Container_MultiMachineEM(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, boolean bindInventory) { super(aInventoryPlayer, aTileEntity, bindInventory); + ePowerPassButton=eSafeVoidButton=allowedToWorkButton=true; } @Override @@ -41,16 +51,24 @@ public class GT_Container_MultiMachineEM extends GT_ContainerMetaTile_Machine { GT_MetaTileEntity_MultiblockBase_EM base = (GT_MetaTileEntity_MultiblockBase_EM) this.mTileEntity.getMetaTileEntity(); switch (aSlotIndex) { case 1: - base.ePowerPass ^= true; + if(ePowerPassButton) { + base.ePowerPass ^= true; + if (!allowedToWorkButton) {//TRANSFORMER HACK + if (base.ePowerPass) base.getBaseMetaTileEntity().enableWorking(); + else base.getBaseMetaTileEntity().disableWorking(); + } + } break; case 2: - base.eSafeVoid ^= true; + if(eSafeVoidButton) base.eSafeVoid ^= true; break; case 3: - if (base.getBaseMetaTileEntity().isAllowedToWork()) { - base.getBaseMetaTileEntity().disableWorking(); - } else { - base.getBaseMetaTileEntity().enableWorking(); + if(allowedToWorkButton) { + if (base.getBaseMetaTileEntity().isAllowedToWork()) { + base.getBaseMetaTileEntity().disableWorking(); + } else { + base.getBaseMetaTileEntity().enableWorking(); + } } break; } @@ -62,7 +80,7 @@ public class GT_Container_MultiMachineEM extends GT_ContainerMetaTile_Machine { public void detectAndSendChanges() { super.detectAndSendChanges(); if ((this.mTileEntity.isClientSide()) || (this.mTileEntity.getMetaTileEntity() == null) || (this.eParamsInStatus == null)) - return;//INTELLIJ IS TALKING BULLSHIT HERE IT CAN BE NULL!!! + return; this.eParamsInStatus = ((GT_MetaTileEntity_MultiblockBase_EM) this.mTileEntity.getMetaTileEntity()).eParamsInStatus; this.eParamsOutStatus = ((GT_MetaTileEntity_MultiblockBase_EM) this.mTileEntity.getMetaTileEntity()).eParamsOutStatus; this.eCertainMode = ((GT_MetaTileEntity_MultiblockBase_EM) this.mTileEntity.getMetaTileEntity()).eCertainMode; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/gui/GT_GUIContainer_MultiMachineEM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/gui/GT_GUIContainer_MultiMachineEM.java index 08f97832dd..98e60e4498 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/gui/GT_GUIContainer_MultiMachineEM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/gui/GT_GUIContainer_MultiMachineEM.java @@ -5,6 +5,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; import org.lwjgl.opengl.GL11; +import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_MultiblockBase_EM.*; import static gregtech.api.enums.GT_Values.RES_PATH_GUI; /** @@ -13,11 +14,21 @@ import static gregtech.api.enums.GT_Values.RES_PATH_GUI; public class GT_GUIContainer_MultiMachineEM extends GT_GUIContainerMetaTile_Machine { String mName = ""; - private static byte cntr = 0; + private static byte counter = 0; + public final boolean ePowerPassButton, eSafeVoidButton, allowedToWorkButton; + + public GT_GUIContainer_MultiMachineEM(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile, boolean enablePowerPass, boolean enableSafeVoid, boolean enablePowerButton) { + super(new GT_Container_MultiMachineEM(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "multimachines/" + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); + mName = aName; + ePowerPassButton=enablePowerPass; + eSafeVoidButton=enableSafeVoid; + allowedToWorkButton=enablePowerButton; + } public GT_GUIContainer_MultiMachineEM(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile) { super(new GT_Container_MultiMachineEM(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "multimachines/" + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile)); mName = aName; + ePowerPassButton=eSafeVoidButton=allowedToWorkButton=true; } @Override @@ -64,16 +75,22 @@ public class GT_GUIContainer_MultiMachineEM extends GT_GUIContainerMetaTile_Mach y -= 26; drawTexturedModalRect(x, y, 0, 0, xSize, ySize + 26); if (this.mContainer != null && ((GT_Container_MultiMachineEM) this.mContainer).eParamsInStatus != null) { - cntr = (byte) ((1 + cntr) % 6); + counter = (byte) ((1 + counter) % 6); GL11.glColor4f(1f, 1f, 1f, 1f); - if (((GT_Container_MultiMachineEM) mContainer).ePowerPass) + if(!ePowerPassButton) + drawTexturedModalRect(x + 151, y + 23, 215, 23, 18, 18); + else if (((GT_Container_MultiMachineEM) mContainer).ePowerPass) drawTexturedModalRect(x + 151, y + 23, 183, 23, 18, 18); - if (((GT_Container_MultiMachineEM) mContainer).eSafeVoid) + if(!eSafeVoidButton) + drawTexturedModalRect(x + 151, y + 41, 215, 41, 18, 18); + else if (((GT_Container_MultiMachineEM) mContainer).eSafeVoid) drawTexturedModalRect(x + 151, y + 41, 183, 41, 18, 18); - if (((GT_Container_MultiMachineEM) mContainer).allowedToWork) + if(!allowedToWorkButton) + drawTexturedModalRect(x + 151, y + 57, 215, 57, 18, 18); + else if (((GT_Container_MultiMachineEM) mContainer).allowedToWork) drawTexturedModalRect(x + 151, y + 57, 183, 57, 18, 18); x += 11; @@ -132,7 +149,7 @@ public class GT_GUIContainer_MultiMachineEM extends GT_GUIContainerMetaTile_Mach rU + ((state & 8) == 0 ? 44 : 12), Vs + 12, 6, 6); break; - case 5://xox ooo xox + case 5://xox oxo xox drawTexturedModalRect(x, y, rU + ((state & 1) == 0 ? 32 : 0), Vs, 6, 6); @@ -156,31 +173,31 @@ public class GT_GUIContainer_MultiMachineEM extends GT_GUIContainerMetaTile_Mach private void LEDdrawP(int x, int y, int i, int j, byte status) { final int v = 192, su = 8, sv = 6, u = 11; switch (status) { - case 6: - if (cntr < 2) { + case PARAM_WRONG: + if (counter < 2) { drawTexturedModalRect(x + su * i, y + sv * j, u + su * i, v + sv * j, su, sv); break; - } else if (cntr < 4) { + } else if (counter < 4) { drawTexturedModalRect(x + su * i, y + sv * j, u + su * i, v + sv * (8 + j), su, sv); break; } - case 1://ok + case PARAM_OK://ok drawTexturedModalRect(x + su * i, y + sv * j, u + su * i, v + sv * (4 + j), su, sv); break; - case 2://too low blink - if (cntr < 3) { + case PARAM_TOO_LOW://too low blink + if (counter < 3) { drawTexturedModalRect(x + su * i, y + sv * j, u + su * i, v + sv * j, su, sv); break; } - case 3:// too low + case PARAM_LOW:// too low drawTexturedModalRect(x + su * i, y + sv * j, u + su * i, v + sv * (2 + j), su, sv); break; - case 4://too high blink - if (cntr < 3) { + case PARAM_TOO_HIGH://too high blink + if (counter < 3) { drawTexturedModalRect(x + su * i, y + sv * j, u + su * i, v + sv * (8 + j), su, sv); break; } - case 5:// too high + case PARAM_HIGH:// too high drawTexturedModalRect(x + su * i, y + sv * j, u + su * i, v + sv * (6 + j), su, sv); break; } diff --git a/src/main/java/openmodularturrets/entity/projectiles/projectileEM.java b/src/main/java/openmodularturrets/entity/projectiles/projectileEM.java index 8400915ad2..ba9eb00dd9 100644 --- a/src/main/java/openmodularturrets/entity/projectiles/projectileEM.java +++ b/src/main/java/openmodularturrets/entity/projectiles/projectileEM.java @@ -27,8 +27,16 @@ public class projectileEM extends TurretProjectile { private float massFactor; - public projectileEM(World par1World, TurretBase turretBase, cElementalInstanceStackMap avalableEM) { + public projectileEM(World par1World) { super(par1World); + } + + public projectileEM(World par1World, TurretBase turretBase) { + super(par1World, turretBase); + } + + public projectileEM(World par1World, TurretBase turretBase, cElementalInstanceStackMap avalableEM) { + super(par1World, turretBase); this.turretBase = turretBase; boolean onlyQuarks=true; if(avalableEM!=null && avalableEM.hasStacks()) { diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_ANNIHILATION.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_ANNIHILATION.png Binary files differnew file mode 100644 index 0000000000..9448ea12bd --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_ANNIHILATION.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_ANNIHILATION.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_ANNIHILATION.png.mcmeta new file mode 100644 index 0000000000..5d86d73ad2 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_ANNIHILATION.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":5 + } +}
\ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_ANNIHILATION_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_ANNIHILATION_ACTIVE.png Binary files differnew file mode 100644 index 0000000000..63d8fda631 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_ANNIHILATION_ACTIVE.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_ANNIHILATION_ACTIVE.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_ANNIHILATION_ACTIVE.png.mcmeta new file mode 100644 index 0000000000..5d86d73ad2 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_ANNIHILATION_ACTIVE.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":5 + } +}
\ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_BHG.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_BHG.png Binary files differindex 524dab8595..ccbc7a0f11 100644 --- a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_BHG.png +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_BHG.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_BHG_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_BHG_ACTIVE.png Binary files differindex cfe7ac9cf5..fb4943a5c3 100644 --- a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_BHG_ACTIVE.png +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_BHG_ACTIVE.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_COLLIDER.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_COLLIDER.png Binary files differindex 5276027477..910d8cf7cd 100644 --- a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_COLLIDER.png +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_COLLIDER.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_COLLIDER_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_COLLIDER_ACTIVE.png Binary files differindex d5a0655928..b9efef601a 100644 --- a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_COLLIDER_ACTIVE.png +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_COLLIDER_ACTIVE.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_COMPUTER.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_COMPUTER.png Binary files differnew file mode 100644 index 0000000000..bd9186a62f --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_COMPUTER.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_COMPUTER.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_COMPUTER.png.mcmeta new file mode 100644 index 0000000000..5e86a7cd5f --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_COMPUTER.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":8 + } +}
\ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_COMPUTER_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_COMPUTER_ACTIVE.png Binary files differnew file mode 100644 index 0000000000..911ef96afa --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_COMPUTER_ACTIVE.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_COMPUTER_ACTIVE.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_COMPUTER_ACTIVE.png.mcmeta new file mode 100644 index 0000000000..5e86a7cd5f --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_COMPUTER_ACTIVE.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":8 + } +}
\ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_CRAFTING.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_CRAFTING.png Binary files differnew file mode 100644 index 0000000000..bd87d400e7 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_CRAFTING.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_CRAFTING.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_CRAFTING.png.mcmeta new file mode 100644 index 0000000000..82555396fa --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_CRAFTING.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":7 + } +}
\ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_CRAFTING_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_CRAFTING_ACTIVE.png Binary files differnew file mode 100644 index 0000000000..b3d9c37a9a --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_CRAFTING_ACTIVE.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_CRAFTING_ACTIVE.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_CRAFTING_ACTIVE.png.mcmeta new file mode 100644 index 0000000000..82555396fa --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_CRAFTING_ACTIVE.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":7 + } +}
\ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_DECAY.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_DECAY.png Binary files differnew file mode 100644 index 0000000000..0166c9c7ad --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_DECAY.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_DECAY.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_DECAY.png.mcmeta new file mode 100644 index 0000000000..5d86d73ad2 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_DECAY.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":5 + } +}
\ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_DECAY_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_DECAY_ACTIVE.png Binary files differnew file mode 100644 index 0000000000..29bfd12031 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_DECAY_ACTIVE.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_DECAY_ACTIVE.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_DECAY_ACTIVE.png.mcmeta new file mode 100644 index 0000000000..5d86d73ad2 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_DECAY_ACTIVE.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":5 + } +}
\ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_WH.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_WH.png Binary files differindex ac53d4adf9..464121c8fe 100644 --- a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_WH.png +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_WH.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_WH_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_WH_ACTIVE.png Binary files differindex c93a69ec0f..cb4828ad05 100644 --- a/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_WH_ACTIVE.png +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/EM_WH_ACTIVE.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/UC.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/UC.png Binary files differindex 222e0b82b7..c437e992e2 100644 --- a/src/main/resources/assets/gregtech/textures/blocks/iconsets/UC.png +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/UC.png diff --git a/src/main/resources/assets/gregtech/textures/gui/multimachines/EMDisplay.png b/src/main/resources/assets/gregtech/textures/gui/multimachines/EMDisplay.png Binary files differindex d613b0eee9..441ec3b713 100644 --- a/src/main/resources/assets/gregtech/textures/gui/multimachines/EMDisplay.png +++ b/src/main/resources/assets/gregtech/textures/gui/multimachines/EMDisplay.png |