diff options
author | Dream-Master <dream-master@gmx.net> | 2017-07-08 10:46:11 +0200 |
---|---|---|
committer | Dream-Master <dream-master@gmx.net> | 2017-07-08 10:46:11 +0200 |
commit | c8475d850f306a6b0870dbb59ce68ae2afd9c425 (patch) | |
tree | 53d3bdbfbb7bcf37b43e1dadf7a0c232d555a8f7 | |
parent | e99ac7a5dfd01b360b4cb7caa21ceabc837365cc (diff) | |
parent | 98a508a0ae355da6a4a3037ce0d1521b158a89c4 (diff) | |
download | GT5-Unofficial-c8475d850f306a6b0870dbb59ce68ae2afd9c425.tar.gz GT5-Unofficial-c8475d850f306a6b0870dbb59ce68ae2afd9c425.tar.bz2 GT5-Unofficial-c8475d850f306a6b0870dbb59ce68ae2afd9c425.zip |
Merge branch 'LV-MV-Miner' into experimental
18 files changed, 287 insertions, 11 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index d6295cb82c..b7b0611645 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -65,7 +65,8 @@ import java.util.regex.Pattern; @Mod(modid = "gregtech", name = "GregTech", version = "MC1710", useMetadata = false, dependencies = "required-after:dreamcraft; required-after:IC2; after:Forestry; after:PFAAGeologica; after:Thaumcraft; after:Railcraft; after:appliedenergistics2; after:ThermalExpansion; after:TwilightForest; after:harvestcraft; after:magicalcrops; after:BuildCraft|Transport; after:BuildCraft|Silicon; after:BuildCraft|Factory; after:BuildCraft|Energy; after:BuildCraft|Core; after:BuildCraft|Builders; after:GalacticraftCore; after:GalacticraftMars; after:GalacticraftPlanets; after:ThermalExpansion|Transport; after:ThermalExpansion|Energy; after:ThermalExpansion|Factory; after:RedPowerCore; after:RedPowerBase; after:RedPowerMachine; after:RedPowerCompat; after:RedPowerWiring; after:RedPowerLogic; after:RedPowerLighting; after:RedPowerWorld; after:RedPowerControl; after:UndergroundBiomes;") public class GT_Mod implements IGT_Mod { - public static final int VERSION = 509; + public static final int VERSION = 509, SUBVERSION = 31; + public static final int TOTAL_VERSION = calculateTotalGTVersion(VERSION, SUBVERSION); public static final int REQUIRED_IC2 = 624; @Mod.Instance("gregtech") public static GT_Mod instance; @@ -1218,5 +1219,13 @@ public class GT_Mod implements IGT_Mod { GT_Recipe.GT_Recipe_Map.sLargeBoilerFakeFuels.addSolidRecipe(GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1)); } } - + + public static int calculateTotalGTVersion(int minorVersion){ + return calculateTotalGTVersion(VERSION, minorVersion); + } + + public static int calculateTotalGTVersion(int majorVersion, int minorVersion){ + return majorVersion * 1000 + minorVersion; + + } } diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index ed3aea00c4..518663e8ec 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -631,6 +631,7 @@ public enum ItemList implements IItemContainer { Machine_LV_Hammer, Machine_MV_Hammer, Machine_HV_Hammer, Machine_EV_Hammer, Machine_IV_Hammer, Machine_LV_FluidHeater, Machine_MV_FluidHeater, Machine_HV_FluidHeater, Machine_EV_FluidHeater, Machine_IV_FluidHeater, Machine_Multi_LargeChemicalReactor, + Machine_LV_Miner, Machine_MV_Miner, Neutron_Reflector, Reactor_Coolant_He_1, Reactor_Coolant_He_3, Reactor_Coolant_He_6, Reactor_Coolant_NaK_1, Reactor_Coolant_NaK_3, Reactor_Coolant_NaK_6,neutroniumHeatCapacitor, diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index f4038e2d90..4c75abddcd 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -120,6 +120,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE aNBT.setBoolean("mInputDisabled", mInputDisabled); aNBT.setBoolean("mOutputDisabled", mOutputDisabled); aNBT.setTag("GT.CraftingComponents", mRecipeStuff); + aNBT.setInteger("nbtVersion", GT_Mod.TOTAL_VERSION); } catch (Throwable e) { GT_Log.err.println("Encountered CRITICAL ERROR while saving MetaTileEntity, the Chunk whould've been corrupted by now, but I prevented that. Please report immediately to GregTech Intergalactical!!!"); e.printStackTrace(GT_Log.err); @@ -188,6 +189,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE mCoverData = aNBT.getIntArray("mCoverData"); mSidedRedstone = aNBT.getByteArray("mRedstoneSided"); mRecipeStuff = aNBT.getCompoundTag("GT.CraftingComponents"); + int nbtVersion = aNBT.getInteger("nbtVersion"); if (mCoverData.length != 6) mCoverData = new int[]{0, 0, 0, 0, 0, 0}; if (mCoverSides.length != 6) mCoverSides = new int[]{0, 0, 0, 0, 0, 0}; @@ -203,6 +205,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE for (int i = 0; i < tItemList.tagCount(); i++) { NBTTagCompound tTag = tItemList.getCompoundTagAt(i); int tSlot = tTag.getInteger("IntSlot"); + tSlot = shiftInventoryIndex(tSlot, nbtVersion); if (tSlot >= 0 && tSlot < mMetaTileEntity.getRealInventory().length) { mMetaTileEntity.getRealInventory()[tSlot] = GT_Utility.loadItem(tTag); } @@ -1907,4 +1910,55 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider) { mMetaTileEntity.onEntityCollidedWithBlock(aWorld, aX, aY, aZ, collider); } + + /** + * Shifts the machine Inventory index according to the change in Input/Output Slots. + * This is NOT done automatically. If you want to change slot count for a machine this method needs to be adapted. + * Currently this method only works for GT_MetaTileEntity_BasicMachine + * @param slotIndex The original Inventory index + * @param nbtVersion The GregTech version in which the original Inventory Index was saved. + * @return The corrected Inventory index + */ + private int shiftInventoryIndex(int slotIndex, int nbtVersion){ + int oldInputSize, newInputSize, oldOutputSize, newOutputSize; + int chemistryUpdateVersion = GT_Mod.calculateTotalGTVersion(509, 31); + if (mID >= 211 && mID <= 218) {//Assembler + if (nbtVersion < chemistryUpdateVersion) { + oldInputSize = 2; + oldOutputSize = 1; + } else { + return slotIndex; + } + newInputSize = 6; + newOutputSize = 1; + } else if (mID >= 421 && mID <= 428){//Chemical Reactor + if (nbtVersion < chemistryUpdateVersion) { + oldInputSize = 2; + oldOutputSize = 1; + } else { + return slotIndex; + } + newInputSize = 2; + newOutputSize = 2; + } else if (mID >= 531 && mID <= 538) {//Distillery + if (nbtVersion < chemistryUpdateVersion) { + oldInputSize = 1; + oldOutputSize = 0; + } else { + return slotIndex; + } + newInputSize = 1; + newOutputSize = 1; + } else { + return slotIndex; + } + int indexShift = 0; + if (slotIndex >= GT_MetaTileEntity_BasicMachine.OTHER_SLOT_COUNT + oldInputSize) {indexShift += newInputSize - oldInputSize; + } + if (slotIndex >= GT_MetaTileEntity_BasicMachine.OTHER_SLOT_COUNT + oldInputSize + oldOutputSize) { + indexShift += newOutputSize - oldOutputSize; + } + return slotIndex + indexShift; + } } + diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java index 9670a765ee..45e96a5318 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java @@ -43,7 +43,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B DID_NOT_FIND_RECIPE = 0, FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS = 1, FOUND_AND_SUCCESSFULLY_USED_RECIPE = 2; - private static final int OTHER_SLOT_COUNT = 4; + public static final int OTHER_SLOT_COUNT = 4; public final ItemStack[] mOutputItems; public final int mInputSlotCount, mAmperage; public boolean mAllowInputFromOutputSide = false, mFluidTransfer = false, mItemTransfer = false, mHasBeenUpdated = false, mStuttering = false, mCharge = false, mDecharge = false; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java new file mode 100644 index 0000000000..eae624ae49 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java @@ -0,0 +1,199 @@ +package gregtech.common.tileentities.machines.basic; + +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_BasicMachine; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.objects.ItemData; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import gregtech.common.blocks.GT_Block_Ores_Abstract; +import gregtech.common.blocks.GT_TileEntity_Ores; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + +import java.util.ArrayList; + +public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine { + private static final ItemStack MINING_PIPE = GT_ModHandler.getIC2Item("miningPipe", 0); + private static final Block MINING_PIPE_BLOCK = GT_Utility.getBlockFromStack(MINING_PIPE); + private static final Block MINING_PIPE_TIP_BLOCK = GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 0)); + + int drillX, drillY, drillZ; + boolean isPickingPipes; + boolean waitMiningPipe; + final static int[] RADIUS = new int[]{8, 8, 16, 24}; //Miner radius per tier + final static int[] SPEED = new int[]{160, 160, 80, 40}; //Miner cycle time per tier + final static int[] ENERGY = new int[]{8, 8, 32, 128}; //Miner energy consumption per tier + + public GT_MetaTileEntity_Miner(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 1, "Digging ore instead of you", 2, 2, "Miner.png", "", new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM"))); + } + + public GT_MetaTileEntity_Miner(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + } + + public GT_MetaTileEntity_Miner(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 2, 2, aGUIName, aNEIName); + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Miner(mName, mTier, mDescriptionArray, mTextures, mGUIName, mNEIName); + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (aStack.getItem() == MINING_PIPE.getItem()); + } + + public boolean hasFreeSpace() { + for (int i = getOutputSlot(); i < getOutputSlot() + 2; i++) { + if (mInventory[i] != null) { + return false; + } + } + return true; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (aBaseMetaTileEntity.isServerSide()) { + if (aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.isUniversalEnergyStored(ENERGY[mTier] * (SPEED[mTier] - mProgresstime)) && hasFreeSpace()) { + miningPipe: + if (waitMiningPipe) { + mMaxProgresstime = 0; + for (int i = 0; i < mInputSlotCount; i++) { + ItemStack s = getInputAt(i); + if (s != null && s.getItem() == MINING_PIPE.getItem() && s.stackSize > 0) { + waitMiningPipe = false; + break miningPipe; + } + } + return; + } + aBaseMetaTileEntity.decreaseStoredEnergyUnits(ENERGY[mTier], true); + mMaxProgresstime = SPEED[mTier]; + } else { + mMaxProgresstime = 0; + return; + } + if (mProgresstime == SPEED[mTier] - 1) { + if (isPickingPipes) { + if (drillY == 0) { + aBaseMetaTileEntity.disableWorking(); + isPickingPipes = false; + } else if (aBaseMetaTileEntity.getBlockOffset(0, drillY, 0) == MINING_PIPE_TIP_BLOCK || aBaseMetaTileEntity.getBlockOffset(0, drillY, 0) == MINING_PIPE_BLOCK) { + mOutputItems[0] = MINING_PIPE.copy(); + mOutputItems[0].stackSize = 1; + aBaseMetaTileEntity.getWorld().setBlockToAir(aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord() + drillY, aBaseMetaTileEntity.getZCoord()); + drillY++; + } + return; + } + if (drillY == 0) { + moveOneDown(aBaseMetaTileEntity); + return; + } + if (drillZ > RADIUS[mTier]) { + moveOneDown(aBaseMetaTileEntity); + return; + } + while (drillZ <= RADIUS[mTier]) { + while (drillX <= RADIUS[mTier]) { + Block block = aBaseMetaTileEntity.getBlockOffset(drillX, drillY, drillZ); + int blockMeta = aBaseMetaTileEntity.getMetaIDOffset(drillX, drillY, drillZ); + if (block instanceof GT_Block_Ores_Abstract) { + TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityOffset(drillX, drillY, drillZ); + if (tTileEntity != null && tTileEntity instanceof GT_TileEntity_Ores && ((GT_TileEntity_Ores) tTileEntity).mNatural) { + mineBlock(aBaseMetaTileEntity, drillX, drillY, drillZ); + return; + } + } else { + ItemData association = GT_OreDictUnificator.getAssociation(new ItemStack(block, 1, blockMeta)); + if (association != null && association.mPrefix.toString().startsWith("ore")) { + mineBlock(aBaseMetaTileEntity, drillX, drillY, drillZ); + return; + } + } + drillX++; + } + drillX = -RADIUS[mTier]; + drillZ++; + } + } + } + } + + public boolean moveOneDown(IGregTechTileEntity aBaseMetaTileEntity) { + if (aBaseMetaTileEntity.getYCoord() + drillY - 1 < 0 || aBaseMetaTileEntity.getBlockOffset(0, drillY - 1, 0) == Blocks.bedrock) { + isPickingPipes = true; + return false; + } + if (aBaseMetaTileEntity.getBlockOffset(0, drillY, 0) == MINING_PIPE_TIP_BLOCK) { + aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord() + drillY, aBaseMetaTileEntity.getZCoord(), MINING_PIPE_BLOCK); + } + miningPipes: + { + for (int i = 0; i < mInputSlotCount; i++) { + ItemStack s = getInputAt(i); + if (s != null && s.getItem() == MINING_PIPE.getItem() && s.stackSize > 0) { + s.stackSize--; + if (s.stackSize == 0) { + mInventory[getInputSlot() + i] = null; + } + break miningPipes; + } + } + waitMiningPipe = true; + return false; + } + if (aBaseMetaTileEntity.getBlockOffset(0, drillY - 1, 0) != Blocks.air) { + mineBlock(aBaseMetaTileEntity, 0, drillY - 1, 0); + } + aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord() + drillY - 1, aBaseMetaTileEntity.getZCoord(), MINING_PIPE_TIP_BLOCK); + drillY--; + drillZ = -RADIUS[mTier]; + drillX = -RADIUS[mTier]; + return true; + } + + public void mineBlock(IGregTechTileEntity aBaseMetaTileEntity, int x, int y, int z) { + ArrayList<ItemStack> drops = getBlockDrops(aBaseMetaTileEntity.getBlockOffset(x, y, z), aBaseMetaTileEntity.getXCoord() + x, aBaseMetaTileEntity.getYCoord() + y, aBaseMetaTileEntity.getZCoord() + z); + if (drops.size() > 0) + mOutputItems[0] = drops.get(0); + if (drops.size() > 1) + mOutputItems[1] = drops.get(1); + aBaseMetaTileEntity.getWorld().setBlockToAir(aBaseMetaTileEntity.getXCoord() + x, aBaseMetaTileEntity.getYCoord() + y, aBaseMetaTileEntity.getZCoord() + z); + } + + private ArrayList<ItemStack> getBlockDrops(final Block oreBlock, int posX, int posY, int posZ) { + final int blockMeta = getBaseMetaTileEntity().getMetaID(posX, posY, posZ); + return oreBlock.getDrops(getBaseMetaTileEntity().getWorld(), posX, posY, posZ, blockMeta, 1); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setBoolean("isPickingPipe", isPickingPipes); + aNBT.setInteger("drillX", drillX); + aNBT.setInteger("drillY", drillY); + aNBT.setInteger("drillZ", drillZ); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + isPickingPipes = aNBT.getBoolean("isPickingPipe"); + drillX = aNBT.getInteger("drillX"); + drillY = aNBT.getInteger("drillY"); + drillZ = aNBT.getInteger("drillZ"); + } +}
\ No newline at end of file diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java index f25d2d304c..3d8dbb02bd 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java @@ -82,7 +82,7 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); - aNBT.setBoolean("isPickingPipe", isPickingPipes); + aNBT.setBoolean("isPickingPipes", isPickingPipes); } @Override diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 4cdcae9dca..edcdde85d3 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -640,7 +640,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Silicon, 16), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Naquadah, 1), Materials.Argon.getGas(8000), null, ItemList.Circuit_Silicon_Ingot3.get(1, new Object[0]), null, 15000, 1920, 4484); GT_Values.RA.addCutterRecipe(ItemList.Circuit_Silicon_Ingot3.get(1, new Object[0]), ItemList.Circuit_Silicon_Wafer3.get(64, new Object[0]), null, 1600, 480, true); - GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.redstone_torch, 2, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), Materials.Concrete.getMolten(144L), new ItemStack(Items.repeater, 1, 0), 800, 1); + GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.redstone_torch, 2, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), Materials.Concrete.getMolten(144L), new ItemStack(Items.repeater, 1, 0), 80, 10); GT_Values.RA.addAssemblerRecipe(new ItemStack(Items.leather, 1, 32767), new ItemStack(Items.lead, 1, 32767), Materials.Glue.getFluid(50L), new ItemStack(Items.name_tag, 1, 0), 100, 8); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 8L), new ItemStack(Items.compass, 1, 32767), GT_Values.NF, new ItemStack(Items.map, 1, 0), 100, 8); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tantalum, 1L), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Manganese, 1L), Materials.Plastic.getMolten(144L), ItemList.Battery_RE_ULV_Tantalum.get(8L, new Object[0]), 100, 4); diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java index e7f062ba7d..af8f622929 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -1063,6 +1063,13 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI //ItemList.Machine_LuV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(676, "basicmachine.e_oven.tier.06", "Advanced Electric Oven V", 6, "Just a Furnace with a different Design", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Oven.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "ELECTRIC_OVEN", new Object[]{"CEC", aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); //ItemList.Machine_ZPM_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(677, "basicmachine.e_oven.tier.07", "Advanced Electric Oven VI", 7, "Just a Furnace with a different Design", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Oven.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "ELECTRIC_OVEN", new Object[]{"CEC", aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); //ItemList.Machine_UV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(678, "basicmachine.e_oven.tier.08", "Advanced Electric Oven VII", 8, "Just a Furnace with a different Design", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Oven.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "ELECTRIC_OVEN", new Object[]{"CEC", aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L)); + + ItemList.Machine_LV_Miner.set(new GT_MetaTileEntity_Miner(679, "basicmachine.miner.tier.01", "Basic miner", 1).getStackForm(1L)); + ItemList.Machine_MV_Miner.set(new GT_MetaTileEntity_Miner(680, "basicmachine.miner.tier.02", "Advanced miner", 2).getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Machine_LV_Miner.get(1L), bitsd, new Object[]{"EEE", aTextWireHull, "CSC", 'M', ItemList.Hull_LV, 'E', ItemList.Electric_Motor_LV, 'C', OrePrefixes.circuit.get(Materials.Basic), 'W', OrePrefixes.cableGt01.get(Materials.Tin), 'S', ItemList.Sensor_LV}); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_MV_Miner.get(1L), bitsd, new Object[]{"EEE", aTextWireHull, "CSC", 'M', ItemList.Hull_MV, 'E', ItemList.Electric_Motor_MV, 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.cableGt01.get(Materials.Copper), 'S', ItemList.Sensor_MV}); + } private static void run3() { @@ -1577,12 +1584,12 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_LV.get(1L, new Object[0]), bitsd, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_LV, 'V', ItemList.Conveyor_Module_LV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Good)}); GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_MV.get(1L, new Object[0]), bitsd, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_MV, 'V', ItemList.Conveyor_Module_MV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Good)}); GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_HV.get(1L, new Object[0]), bitsd, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_HV, 'V', ItemList.Conveyor_Module_HV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Good)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_EV.get(1L, new Object[0]), bitsd, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_EV, 'V', ItemList.Conveyor_Module_EV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Advanced)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_IV.get(1L, new Object[0]), bitsd, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_IV, 'V', ItemList.Conveyor_Module_IV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Advanced)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_LuV.get(1L, new Object[0]), bitsd, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_LuV, 'V', ItemList.Conveyor_Module_LuV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Advanced)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_ZPM.get(1L, new Object[0]), bitsd, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_ZPM, 'V', ItemList.Conveyor_Module_ZPM, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Advanced)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_UV.get(1L, new Object[0]), bitsd, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_UV, 'V', ItemList.Conveyor_Module_UV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Infinite)}); - GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_MAX.get(1L, new Object[0]), bitsd, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_MAX, 'V', ItemList.Conveyor_Module_UV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Infinite)}); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_EV.get(1L, new Object[0]), bitsd, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_EV, 'V', ItemList.Conveyor_Module_EV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Good)}); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_IV.get(1L, new Object[0]), bitsd, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_IV, 'V', ItemList.Conveyor_Module_IV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Good)}); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_LuV.get(1L, new Object[0]), bitsd, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_LuV, 'V', ItemList.Conveyor_Module_LuV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Good)}); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_ZPM.get(1L, new Object[0]), bitsd, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_ZPM, 'V', ItemList.Conveyor_Module_ZPM, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Good)}); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_UV.get(1L, new Object[0]), bitsd, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_UV, 'V', ItemList.Conveyor_Module_UV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Good)}); + GT_ModHandler.addCraftingRecipe(ItemList.Automation_ItemDistributor_MAX.get(1L, new Object[0]), bitsd, new Object[]{"XCX", "VMV", " V ", 'M', ItemList.Hull_MAX, 'V', ItemList.Conveyor_Module_UV, 'C', OreDictNames.craftingChest, 'X', OrePrefixes.circuit.get(Materials.Good)}); } diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_BOTTOM.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_BOTTOM.png Binary files differnew file mode 100644 index 0000000000..6c7e63b924 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_BOTTOM.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_BOTTOM_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_BOTTOM_ACTIVE.png Binary files differnew file mode 100644 index 0000000000..6c7e63b924 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_BOTTOM_ACTIVE.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_FRONT.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_FRONT.png Binary files differnew file mode 100644 index 0000000000..71b4efec65 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_FRONT.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_FRONT_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_FRONT_ACTIVE.png Binary files differnew file mode 100644 index 0000000000..9e46f30b5b --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_FRONT_ACTIVE.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_SIDE.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_SIDE.png Binary files differnew file mode 100644 index 0000000000..6c7e63b924 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_SIDE.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_SIDE_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_SIDE_ACTIVE.png Binary files differnew file mode 100644 index 0000000000..6c7e63b924 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_SIDE_ACTIVE.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_TOP.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_TOP.png Binary files differnew file mode 100644 index 0000000000..fe23843580 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_TOP.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_TOP_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_TOP_ACTIVE.png Binary files differnew file mode 100644 index 0000000000..ee39a79a98 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_TOP_ACTIVE.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_TOP_ACTIVE.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_TOP_ACTIVE.png.mcmeta new file mode 100644 index 0000000000..fba3e2efc9 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/miner/OVERLAY_TOP_ACTIVE.png.mcmeta @@ -0,0 +1,6 @@ + +{ + "animation":{ + "frametime":4 + } +}
\ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/gui/basicmachines/Miner.png b/src/main/resources/assets/gregtech/textures/gui/basicmachines/Miner.png Binary files differnew file mode 100644 index 0000000000..a9d7978b69 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/gui/basicmachines/Miner.png |