diff options
Diffstat (limited to 'src')
25 files changed, 313 insertions, 209 deletions
diff --git a/src/Java/gregtech/api/enums/TAE.java b/src/Java/gregtech/api/enums/TAE.java index 2827704f62..d7e16feb09 100644 --- a/src/Java/gregtech/api/enums/TAE.java +++ b/src/Java/gregtech/api/enums/TAE.java @@ -1,10 +1,14 @@ package gregtech.api.enums; import java.lang.reflect.Field; +import java.util.HashMap; +import java.util.HashSet; import gregtech.api.interfaces.ITexture; import gregtech.api.objects.GT_CopiedBlockTexture; import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.reflect.ReflectionUtils; @@ -13,40 +17,65 @@ public class TAE { //TAE stands for Texture Array Expansion. - public static int gtTexturesArrayStartOrigin; public static int gtPPLastUsedIndex = 64; public static int secondaryIndex = 0; - public static boolean hasArrayBeenExpanded = false; + + public static HashMap<Integer, GT_CopiedBlockTexture> mTAE = new HashMap<Integer, GT_CopiedBlockTexture>(); + private static final HashSet<Integer> mFreeSlots = new HashSet<Integer>(64); + + static { + for (int i=64;i<128;i++) { + mFreeSlots.add(i); + } + Logger.INFO("Initialising TAE."); + } - public static boolean hookGtTextures() { - /*ITexture[] textureArrayDump = Textures.BlockIcons.CASING_BLOCKS; - ITexture[] newTextureArray = new ITexture[1024]; - Utils.LOG_INFO("|======| Texture Array Start Length: "+textureArrayDump.length+" |======|"); - for (int r=0;r<textureArrayDump.length;r++){ - if (textureArrayDump[r] == null){ - Utils.LOG_WARNING("Texture slot "+r+" is empty."); + /** + * + * @param aPage - The Texture page (0-3) + * @param aID - The ID on the specified page (0-15) + * @param gt_CopiedBlockTexture - The Texture to register + * @return - Did it register correctly? + */ + public static boolean registerTexture(int aPage, int aID, GT_CopiedBlockTexture gt_CopiedBlockTexture) { + int aRealID = aID + (aPage * 16); + return registerTexture(64 + aRealID, gt_CopiedBlockTexture); + } + + private static boolean registerTexture(int aID, GT_CopiedBlockTexture gt_CopiedBlockTexture) { + if (mFreeSlots.contains(aID)) { + mFreeSlots.remove(aID); + mTAE.put(aID, gt_CopiedBlockTexture); + return true; + } + else { + CORE.crash("Tried to register texture with ID "+aID+" to TAE, but it is already in use."); + return false; // Dead Code + } + } + + public static void finalizeTAE() { + String aFreeSpaces = ""; + AutoMap<Integer> aTemp = new AutoMap<Integer>(mFreeSlots); + for (int i = 0; i < mFreeSlots.size() ; i++) { + aFreeSpaces += aTemp.get(i); + if (i != (mFreeSlots.size() - 1)) { + aFreeSpaces += ", "; } } - gtTexturesArrayStartOrigin = textureArrayDump.length; - System.arraycopy(textureArrayDump, 0, newTextureArray, 0, textureArrayDump.length); - Textures.BlockIcons.CASING_BLOCKS = newTextureArray; - if (Textures.BlockIcons.CASING_BLOCKS.length == 1024){ - hasArrayBeenExpanded = true; + Logger.INFO("Free Indexes within TAE: "+aFreeSpaces); + Logger.INFO("Filling them with ERROR textures."); + for (int aFreeSlot : aTemp.values()) { + registerTexture(aFreeSlot, new GT_CopiedBlockTexture(ModBlocks.blockCasingsTieredGTPP, 1, 15)); } - else { - hasArrayBeenExpanded = false; + Logger.INFO("Finalising TAE."); + for (int aKeyTae : mTAE.keySet()) { + Textures.BlockIcons.CASING_BLOCKS[aKeyTae] = mTAE.get(aKeyTae); } - return hasArrayBeenExpanded;*/ - return true; + Logger.INFO("Finalised TAE."); } - /*public static boolean registerTextures(GT_RenderedTexture textureToRegister) { - Textures.BlockIcons.CASING_BLOCKS[gtPPLastUsedIndex] = textureToRegister; - //Just so I know registration is done. - return true; - }*/ - - public static boolean registerTextures(GT_CopiedBlockTexture gt_CopiedBlockTexture) { + private static boolean registerTextures(GT_CopiedBlockTexture gt_CopiedBlockTexture) { try { //Handle page 2. Logger.INFO("[TAE} Registering Texture, Last used casing ID is "+gtPPLastUsedIndex+"."); diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java index 71adfcb1c2..0e70baf524 100644 --- a/src/Java/gtPlusPlus/GTplusplus.java +++ b/src/Java/gtPlusPlus/GTplusplus.java @@ -78,11 +78,11 @@ public class GTplusplus implements ActionListener { STARTED(SERVER_START); protected boolean mIsPhaseActive = false; private final INIT_PHASE mPrev; - + private INIT_PHASE(INIT_PHASE aPreviousPhase) { mPrev = aPreviousPhase; } - + public synchronized final boolean isPhaseActive() { return mIsPhaseActive; } @@ -96,9 +96,9 @@ public class GTplusplus implements ActionListener { } } } - + public static INIT_PHASE CURRENT_LOAD_PHASE = INIT_PHASE.SUPER; - + //Mod Instance @Mod.Instance(CORE.MODID) public static GTplusplus instance; @@ -127,7 +127,7 @@ public class GTplusplus implements ActionListener { // Blocks Logger.WARNING("Processing texture: " + TexturesGtBlock.Casing_Machine_Dimensional.getTextureFile().getResourcePath()); } - + public GTplusplus() { super(); INIT_PHASE.SUPER.setPhaseActive(true); @@ -151,8 +151,10 @@ public class GTplusplus implements ActionListener { //setupMaterialWhitelist(); //HTTP Requests - CORE.MASTER_VERSION = NetworkUtils.getContentFromURL("https://raw.githubusercontent.com/draknyte1/GTplusplus/master/Recommended.txt").toLowerCase(); - CORE.USER_COUNTRY = GeoUtils.determineUsersCountry(); + if (CORE.ConfigSwitches.enableUpdateChecker) { + CORE.MASTER_VERSION = NetworkUtils.getContentFromURL("https://raw.githubusercontent.com/draknyte1/GTplusplus/master/Recommended.txt").toLowerCase(); + CORE.USER_COUNTRY = GeoUtils.determineUsersCountry(); + } // Handle GT++ Config ConfigHandler.handleConfigFile(event); @@ -201,7 +203,7 @@ public class GTplusplus implements ActionListener { Meta_GT_Proxy.postInit(); Core_Manager.postInit(); //SprinklerHandler.registerModFerts(); - + BlockEventHandler.init(); Logger.INFO("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); @@ -214,8 +216,8 @@ public class GTplusplus implements ActionListener { @EventHandler public synchronized void serverStarting(final FMLServerStartingEvent event) { INIT_PHASE.SERVER_START.setPhaseActive(true); - event.registerServerCommand(new CommandMath()); - event.registerServerCommand(new CommandEnableDebugWhileRunning()); + event.registerServerCommand(new CommandMath()); + event.registerServerCommand(new CommandEnableDebugWhileRunning()); event.registerServerCommand(new CommandDebugChunks()); if (LoadedMods.Thaumcraft) { event.registerServerCommand(new CommandDumpAspects()); @@ -236,7 +238,7 @@ public class GTplusplus implements ActionListener { } SystemUtils.invokeGC(); } - + } @Override @@ -275,7 +277,7 @@ public class GTplusplus implements ActionListener { } } } - + protected void generateGregtechRecipeMaps() { int[] mValidCount = new int[] {0, 0, 0}; @@ -318,7 +320,7 @@ public class GTplusplus implements ActionListener { Recipe_GT.Gregtech_Recipe_Map.sMultiblockCentrifugeRecipes_GT.add(a); } } - + //Large Electrolyzer generation mOriginalCount[1] = GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.mRecipeList.size(); for (GT_Recipe x : GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.mRecipeList) { @@ -343,7 +345,7 @@ public class GTplusplus implements ActionListener { mInvalidCount[1]++; } } - + if (Recipe_GT.Gregtech_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.mRecipeList.size() < 1) { for (GT_Recipe a : Recipe_GT.Gregtech_Recipe_Map.sMultiblockElectrolyzerRecipes.mRecipeList) { Recipe_GT.Gregtech_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.add(a); @@ -367,11 +369,11 @@ public class GTplusplus implements ActionListener { mInvalidCount[2]++; } } - + //Redo plasma recipes in Adv. Vac. //Meta_GT_Proxy.generatePlasmaRecipesForAdvVacFreezer(); - - + + String[] machineName = new String[] {"Centrifuge", "Electrolyzer", "Vacuum Freezer"}; for (int i=0;i<3;i++) { Logger.INFO("[Recipe] Generated "+mValidCount[i]+" recipes for the Industrial "+machineName[i]+". The original machine can process "+mOriginalCount[i]+" recipes, meaning "+mInvalidCount[i]+" are invalid for this Multiblock's processing in some way."); diff --git a/src/Java/gtPlusPlus/core/block/ModBlocks.java b/src/Java/gtPlusPlus/core/block/ModBlocks.java index db9ad2264c..1c8b33430d 100644 --- a/src/Java/gtPlusPlus/core/block/ModBlocks.java +++ b/src/Java/gtPlusPlus/core/block/ModBlocks.java @@ -29,7 +29,6 @@ import gtPlusPlus.core.block.machine.Machine_WorkbenchAdvanced; import gtPlusPlus.core.block.machine.bedrock.Mining_Head_Fake; import gtPlusPlus.core.block.machine.bedrock.Mining_Pipe_Fake; import gtPlusPlus.core.fluids.FluidRegistryHandler; -import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaTieredCasingBlocks1; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraftforge.fluids.Fluid; @@ -57,6 +56,7 @@ public final class ModBlocks { public static Block blockCasings3Misc; public static Block blockCasings4Misc; public static Block blockCasingsTieredGTPP; + public static Block blockSpecialMultiCasings; public static Block blockMetaTileEntity; public static Block blockHeliumGenerator; diff --git a/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java b/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java index adcaa1db70..5e0a5594d5 100644 --- a/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java +++ b/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java @@ -104,8 +104,9 @@ public class CommandEnableDebugWhileRunning implements ICommand ItemStack aHeldItem = PlayerUtils.getItemStackInPlayersHand(P); if (aHeldItem != null) { String aItemDisplayName = ItemUtils.getItemName(aHeldItem); + String aItemUnlocalName = ItemUtils.getUnlocalizedItemName(aHeldItem); String aNbtString = tryIterateNBTData(aHeldItem); - PlayerUtils.messagePlayer(P, "["+aItemDisplayName+"] "+aNbtString); + PlayerUtils.messagePlayer(P, "["+aItemUnlocalName+"]"+"["+aItemDisplayName+"] "+aNbtString); } else { PlayerUtils.messagePlayer(P, "No item held."); diff --git a/src/Java/gtPlusPlus/core/lib/CORE.java b/src/Java/gtPlusPlus/core/lib/CORE.java index 41a21bb642..06d8331606 100644 --- a/src/Java/gtPlusPlus/core/lib/CORE.java +++ b/src/Java/gtPlusPlus/core/lib/CORE.java @@ -290,12 +290,18 @@ public class CORE { public static final String VERSION = "0.1"; } + public static final void crash() { + crash("Generic Crash"); + } + + public static final void crash(String aReason) { Logger.INFO("=========================================================="); Logger.INFO("[GT++ CRASH]"); Logger.INFO("=========================================================="); Logger.INFO("Oooops..."); Logger.INFO("This should only happy in a development environment or when something really bad happens."); + Logger.INFO("Reason: "+aReason); Logger.INFO("=========================================================="); Logger.INFO("Called from: "+ReflectionUtils.getMethodName(0)); Logger.INFO(ReflectionUtils.getMethodName(1)); diff --git a/src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java b/src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java index d2e24b04a1..73751ac49d 100644 --- a/src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java +++ b/src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java @@ -70,8 +70,60 @@ public final class NUCLIDE { new MaterialStack(ELEMENT.getInstance().URANIUM235, 14) }); + // Secondary material is molten metal + public static final Material NAQ_FUEL_T1 = new Material( + "Naquadah Fuel", + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().NAQUADAH, 2), + new MaterialStack(ELEMENT.getInstance().TANTALUM, 3) + }); + + // Secondary material is a plasma + public static final Material NAQ_FUEL_T2 = new Material( + "Enriched Naquadah Fuel", + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().NAQUADAH_ENRICHED, 2), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 3) + }); + + // Secondary material is a plasma + public static final Material NAQ_FUEL_T3 = new Material( + "Naquadria Fuel", + MaterialState.PURE_LIQUID, //State + null, //Material Colour + -1, //Melting Point in C + -1, //Boiling Point in C + -1, //Protons + -1, + false, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().NAQUADRIA, 2), + new MaterialStack(ELEMENT.getInstance().AMERICIUM, 3) + }); + + private static final NUCLIDE INSTANCE = new NUCLIDE(); - public static NUCLIDE getInstance(){return INSTANCE;} + + public static NUCLIDE getInstance(){ + return INSTANCE; + } } diff --git a/src/Java/gtPlusPlus/core/util/sys/NetworkUtils.java b/src/Java/gtPlusPlus/core/util/sys/NetworkUtils.java index f1417e8a2d..b883391a86 100644 --- a/src/Java/gtPlusPlus/core/util/sys/NetworkUtils.java +++ b/src/Java/gtPlusPlus/core/util/sys/NetworkUtils.java @@ -121,7 +121,7 @@ public class NetworkUtils { private static boolean checkAddressWithTimeout(String URL, int timeout) { try { - InetAddress.getByName(URL).isReachable(3000); //Replace with your name + InetAddress.getByName(URL).isReachable(timeout); //Replace with your name return true; } catch (Exception e) { return false; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index c7fe473c44..9e084d5069 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -354,7 +354,9 @@ public enum GregtechItemList implements GregtechItemContainer { //Larger Turbines Large_Steam_Turbine, Large_HPSteam_Turbine, - Casing_Turbine_Shaft, Casing_Turbine_LP, Casing_Turbine_HP, + Casing_Turbine_Shaft, + Casing_Turbine_LP, Casing_Turbine_HP, + Casing_Turbine_Gas, Casing_Turbine_Plasma, //Large Vacuum Furnace Casing_Vacuum_Furnace, diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java index ef013fa3a2..76100df0de 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java @@ -15,6 +15,7 @@ import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; +import gregtech.api.enums.TAE; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.BaseMetaTileEntity; import gregtech.api.util.GT_LanguageManager; @@ -118,7 +119,10 @@ public class Meta_GT_Proxy { public static void postInit() { mAssemblyAchievements = new AchievementHandler(); - fixIC2FluidNames(); + fixIC2FluidNames(); + + // Finalise TAE + TAE.finalizeTAE(); } @SuppressWarnings("deprecation") diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java index cd4c3fe7d2..c4b2e4f738 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java @@ -23,7 +23,10 @@ extends GregtechMetaCasingBlocksAbstract { public GregtechMetaCasingBlocks() { super(GregtechMetaCasingItems.class, "miscutils.blockcasings", GT_Material_Casings.INSTANCE); for (byte i = 0; i < 16; i = (byte) (i + 1)) { - TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i)); + if (i == 2 || i == 3 || i == 4) { + continue; + } + TAE.registerTexture(0, i, new GT_CopiedBlockTexture(this, 6, i)); } GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Centrifuge Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Structural Coke Oven Casing"); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java index 528aed2029..596643e06c 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java @@ -32,7 +32,7 @@ extends GregtechMetaCasingBlocksAbstract { public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { int meta = aStack.getItemDamage(); int tier = GregtechMetaTileEntity_PowerSubStationController.getCellTier(field_150939_a, meta); - if (tier > 0) { + if (meta == 7 && tier > 0) { long capacity = GregtechMetaTileEntity_PowerSubStationController.getCapacityFromCellTier(tier); aList.add("Energy Storage: " + GT_Utility.formatNumbers(capacity)); } @@ -43,7 +43,10 @@ extends GregtechMetaCasingBlocksAbstract { public GregtechMetaCasingBlocks2() { super(GregtechMetaCasingItemBlocks2.class, "gtplusplus.blockcasings.2", GT_Material_Casings.INSTANCE); for (byte i = 0; i < 16; i = (byte) (i + 1)) { - TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i)); + if (i == 4 || i == 10 || i == 11 || i == 12 || i == 14) { + continue; + } + TAE.registerTexture(1, i, new GT_CopiedBlockTexture(this, 6, i)); } GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Thermal Processing Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Hastelloy-N Sealant Block"); @@ -59,7 +62,7 @@ extends GregtechMetaCasingBlocksAbstract { GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Thermal Containment Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Autocrafter Frame"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Cutting Factory Frame"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "Tesla Containment Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Sterile Farm Casing"); //Tree Farmer Textures GregtechItemList.Casing_ThermalCentrifuge.set(new ItemStack(this, 1, 0)); GregtechItemList.Casing_Refinery_External.set(new ItemStack(this, 1, 1)); @@ -75,7 +78,7 @@ extends GregtechMetaCasingBlocksAbstract { GregtechItemList.Casing_ThermalContainment.set(new ItemStack(this, 1, 11)); GregtechItemList.Casing_Autocrafter.set(new ItemStack(this, 1, 12)); GregtechItemList.Casing_CuttingFactoryFrame.set(new ItemStack(this, 1, 13)); - GregtechItemList.Casing_TeslaTower.set(new ItemStack(this, 1, 14)); + //GregtechItemList.Casing_TeslaTower.set(new ItemStack(this, 1, 14)); GregtechItemList.Casing_PLACEHOLDER_TreeFarmer.set(new ItemStack(this, 1, 15)); //Tree Farmer Textures } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java index 8e6a55c9c5..8cd6dd0ca8 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java @@ -1,27 +1,23 @@ package gtPlusPlus.xmod.gregtech.common.blocks; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; +import java.util.List; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; import gregtech.api.objects.GT_CopiedBlockTexture; import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; import gregtech.common.blocks.GT_Material_Casings; - import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler3; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; - -import java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; public class GregtechMetaCasingBlocks3 extends GregtechMetaCasingBlocksAbstract { @@ -50,7 +46,7 @@ extends GregtechMetaCasingBlocksAbstract { public GregtechMetaCasingBlocks3() { super(GregtechMetaCasingItemBlocks3.class, "gtplusplus.blockcasings.3", GT_Material_Casings.INSTANCE); for (byte i = 0; i < 16; i = (byte) (i + 1)) { - TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i)); + TAE.registerTexture(2, i, new GT_CopiedBlockTexture(this, 6, i)); } GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Aquatic Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Inconel Reinforced Casing"); @@ -66,7 +62,7 @@ extends GregtechMetaCasingBlocksAbstract { GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Volcanus Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Fusion Machine Casing MK III"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Advanced Fusion Coil"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "Unnamed"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "Unnamed"); // Can Use, don't change texture (Used for Fusion MK4) GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Containment Casing"); GregtechItemList.Casing_FishPond.set(new ItemStack(this, 1, 0)); GregtechItemList.Casing_Extruder.set(new ItemStack(this, 1, 1)); @@ -365,28 +361,6 @@ extends GregtechMetaCasingBlocksAbstract { } return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); } - switch (tMeta) { - case 9 : { - return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); - } - case 10 : { - return Textures.BlockIcons.MACHINE_CASING_CLEAN_STAINLESSSTEEL.getIcon(); - } - case 11 : { - return Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); - } - case 12 : { - return Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); - } - case 14 : { - return TexturesGtBlock.TEXTURE_CASING_FUSION_CASING_ULTRA.getIcon(); - } - case 15 : { - return TexturesGtBlock.TEXTURE_MAGIC_PANEL_A.getIcon(); - } - default : { - return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); - } - } + return CasingTextureHandler3.getIcon(aSide, tMeta); } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java index b624649789..f5cd73a35a 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java @@ -22,40 +22,33 @@ extends GregtechMetaCasingBlocksAbstract { public GregtechMetaCasingBlocks4() { super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.4", GT_Material_Casings.INSTANCE); for (byte i = 0; i < 16; i = (byte) (i + 1)) { - TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i)); + if (i == 2 || i == 4 || i == 5 || i == 6 || i == 7 || i == 8 || i == 9 || i == 12 || i == 13 || i == 14 || i == 15) { + continue; + } + TAE.registerTexture(3, i, new GT_CopiedBlockTexture(this, 6, i)); } GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Naquadah Reactor Base"); //48 GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Reactor Piping"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Naquadah Containment Chamber"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Tempered Arc Furnace Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Structural Solar Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Salt Containment Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Thermal Containment Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Turbine Shaft"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Low Pressure Turbine Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "High Pressure Turbine Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", ""); // Unused GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Vacuum Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Turbodyne Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", " "); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused GregtechItemList.Casing_Naq_Reactor_A.set(new ItemStack(this, 1, 0)); GregtechItemList.Casing_Naq_Reactor_B.set(new ItemStack(this, 1, 1)); GregtechItemList.Casing_Naq_Reactor_C.set(new ItemStack(this, 1, 2)); GregtechItemList.Casing_Industrial_Arc_Furnace.set(new ItemStack(this, 1, 3)); - GregtechItemList.Casing_SolarTower_Structural.set(new ItemStack(this, 1, 4)); - GregtechItemList.Casing_SolarTower_SaltContainment.set(new ItemStack(this, 1, 5)); - GregtechItemList.Casing_SolarTower_HeatContainment.set(new ItemStack(this, 1, 6)); - GregtechItemList.Casing_Turbine_Shaft.set(new ItemStack(this, 1, 7)); - GregtechItemList.Casing_Turbine_LP.set(new ItemStack(this, 1, 8)); - GregtechItemList.Casing_Turbine_HP.set(new ItemStack(this, 1, 9)); GregtechItemList.Casing_Vacuum_Furnace.set(new ItemStack(this, 1, 10)); GregtechItemList.Casing_RocketEngine.set(new ItemStack(this, 1, 11)); - /*GregtechItemList.Casing_Autocrafter.set(new ItemStack(this, 1, 12)); - GregtechItemList.Casing_CuttingFactoryFrame.set(new ItemStack(this, 1, 13)); - GregtechItemList.Casing_TeslaTower.set(new ItemStack(this, 1, 14)); - GregtechItemList.Casing_PLACEHOLDER_TreeFarmer.set(new ItemStack(this, 1, 15));*/ } private static final LargeTurbineTextureHandler mTurbineTextures = new LargeTurbineTextureHandler(); @@ -76,67 +69,43 @@ extends GregtechMetaCasingBlocksAbstract { //Texture ID's. case 0 == ID[57] if ((aMeta >= 0) && (aMeta < 16)) { switch (aMeta) { - //Centrifuge case 0: return TexturesGtBlock.Casing_Trinium_Titanium.getIcon(); - //Coke Oven Frame case 1: return TexturesGtBlock.TEXTURE_TECH_C.getIcon(); - //Coke Oven Casing Tier 1 case 2: return TexturesGtBlock.TEXTURE_ORGANIC_PANEL_A_GLOWING.getIcon(); - //Coke Oven Casing Tier 2 case 3: return TexturesGtBlock.TEXTURE_METAL_PANEL_A.getIcon(); - //Material Press Casings case 4: - return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon(); - //Sifter Structural + return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon(); case 5: return TexturesGtBlock.Casing_Material_Stellite.getIcon(); - //Sifter Sieve case 6: return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon(); - - - //Vanadium Radox Battery case 7: - return TexturesGtBlock.Casing_Redox_1.getIcon(); - //Power Sub-Station Casing + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); case 8: - return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon(); - //Cyclotron Coil + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); case 9: - return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon(); - - - //Cyclotron External Casing - case 10: - + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 10: if (aSide <2) { return TexturesGtBlock.TEXTURE_STONE_RED_B.getIcon(); } else { return TexturesGtBlock.TEXTURE_STONE_RED_A.getIcon(); } - - //Multitank Exterior Casing case 11: return TexturesGtBlock.TEXTURE_CASING_ROCKETDYNE.getIcon(); - //Reactor Casing I case 12: - return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon(); - //Reactor Casing II + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); case 13: - if (aSide <2) { - return TexturesGtBlock.TEXTURE_TECH_A.getIcon(); - } - else { - return TexturesGtBlock.TEXTURE_TECH_B.getIcon(); - } + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); case 14: - return TexturesGtBlock.Casing_Material_RedSteel.getIcon(); + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); case 15: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); default: return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon(); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java new file mode 100644 index 0000000000..232ae712df --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java @@ -0,0 +1,86 @@ +package gtPlusPlus.xmod.gregtech.common.blocks; + +import java.util.List; + +import gregtech.api.enums.Textures; +import gregtech.api.util.GT_LanguageManager; +import gregtech.common.blocks.GT_Material_Casings; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + + +public class GregtechMetaSpecialMultiCasings extends GregtechMetaCasingBlocksAbstract { + + + public static class SpecialCasingItemBlock extends GregtechMetaCasingItems { + + public SpecialCasingItemBlock(Block par1) { + super(par1); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + int aMeta = aStack.getItemDamage(); + if (aMeta < 10) { + //aList.add("Tier: "+GT_Values.VN[aMeta]); + } + super.addInformation(aStack, aPlayer, aList, aF3_H); + } + } + + public GregtechMetaSpecialMultiCasings() { + super(SpecialCasingItemBlock.class, "gtplusplus.blockspecialcasings.1", GT_Material_Casings.INSTANCE); + for (byte i = 0; i < 16; i = (byte) (i + 1)) { + //TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i)); + // Don't register these Textures, They already exist within vanilla GT. (May not exist in 5.08) + } + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Turbine Shaft"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Reinforced Steam Turbine Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Reinforced HP Steam Turbine Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Reinforced Gas Turbine Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Reinforced Plasma Turbine Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Tesla Containment Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Structural Solar Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Salt Containment Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Thermally Insulated Casing"); + //GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); + //GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", " "); + + GregtechItemList.Casing_Turbine_Shaft.set(new ItemStack(this, 1, 0)); + GregtechItemList.Casing_Turbine_LP.set(new ItemStack(this, 1, 1)); + GregtechItemList.Casing_Turbine_HP.set(new ItemStack(this, 1, 2)); + GregtechItemList.Casing_Turbine_Gas.set(new ItemStack(this, 1, 3)); + GregtechItemList.Casing_Turbine_Plasma.set(new ItemStack(this, 1, 4)); + GregtechItemList.Casing_TeslaTower.set(new ItemStack(this, 1, 5)); + GregtechItemList.Casing_SolarTower_Structural.set(new ItemStack(this, 1, 6)); + GregtechItemList.Casing_SolarTower_SaltContainment.set(new ItemStack(this, 1, 7)); + GregtechItemList.Casing_SolarTower_HeatContainment.set(new ItemStack(this, 1, 8)); + } + + public IIcon getIcon(int aSide, int aMeta) { + + switch (aMeta) { + + case 0: + return TexturesGtBlock.Casing_Redox_1.getIcon(); + case 1: + return Textures.BlockIcons.MACHINE_CASING_TURBINE.getIcon(); + case 2: + return Textures.BlockIcons.MACHINE_CASING_CLEAN_STAINLESSSTEEL.getIcon(); + case 3: + return Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); + case 4: + return Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); + case 5: + return TexturesGtBlock.Casing_Material_RedSteel.getIcon(); + + } + + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + } + +} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java index f09285d514..240af72a3b 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java @@ -66,7 +66,7 @@ public class GregtechMetaTieredCasingBlocks1 extends GregtechMetaCasingBlocksAbs //GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); //GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); //GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); - //GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", " "); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Placeholder Block"); GregtechItemList.GTPP_Casing_ULV.set(new ItemStack(this, 1, 0)); GregtechItemList.GTPP_Casing_LV.set(new ItemStack(this, 1, 1)); @@ -93,9 +93,9 @@ public class GregtechMetaTieredCasingBlocks1 extends GregtechMetaCasingBlocksAbs } switch (aMeta) { case 10: - return Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS.getIcon(); + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); case 11: - return Textures.BlockIcons.MACHINE_HEATPROOFCASING.getIcon(); + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); case 12: return Textures.BlockIcons.RENDERING_ERROR.getIcon(); case 13: @@ -103,9 +103,9 @@ public class GregtechMetaTieredCasingBlocks1 extends GregtechMetaCasingBlocksAbs case 14: return Textures.BlockIcons.RENDERING_ERROR.getIcon(); case 15: - return Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR.getIcon(); + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); } - return TexturesGtBlock.TEXTURE_CASING_TIERED_ULV.getIcon(); + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java index 1c7109fad2..c980997c64 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java @@ -9,47 +9,32 @@ public class CasingTextureHandler2 { public static IIcon getIcon(final int aSide, final int aMeta) { //Texture ID's. case 0 == ID[57] if ((aMeta >= 0) && (aMeta < 16)) { switch (aMeta) { - //Centrifuge case 0: return TexturesGtBlock.Casing_Material_RedSteel.getIcon(); - //Coke Oven Frame case 1: return TexturesGtBlock.Casing_Material_HastelloyX.getIcon(); - //Coke Oven Casing Tier 1 case 2: return TexturesGtBlock.Casing_Material_HastelloyN.getIcon(); - //Coke Oven Casing Tier 2 case 3: return TexturesGtBlock.Casing_Material_Fluid_IncoloyDS.getIcon(); - //Material Press Casings case 4: - return TexturesGtBlock.Casing_Material_Grisium.getIcon(); - //Sifter Structural + return TexturesGtBlock.Casing_Material_Grisium.getIcon(); case 5: return TexturesGtBlock.Casing_Machine_Metal_Panel_A.getIcon(); - //Sifter Sieve case 6: return TexturesGtBlock.Casing_Machine_Metal_Grate_A.getIcon(); - - //Vanadium Radox Battery case 7: return TexturesGtBlock.Casing_Redox_1.getIcon(); - //Power Sub-Station Casing case 8: return TexturesGtBlock.Casing_Machine_Metal_Sheet_A.getIcon(); - //Cyclotron Coil case 9: return TexturesGtBlock.Overlay_Machine_Cyber_A.getIcon(); - //Cyclotron External Casing case 10: return Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF.getIcon(); - //Multitank Exterior Casing case 11: return TexturesGtBlock.Casing_Material_Tantalloy61.getIcon(); - //Reactor Casing I case 12: return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon(); - //Reactor Casing II case 13: if (aSide <2) { return TexturesGtBlock.TEXTURE_TECH_A.getIcon(); @@ -58,18 +43,9 @@ public class CasingTextureHandler2 { return TexturesGtBlock.TEXTURE_TECH_B.getIcon(); } case 14: - return TexturesGtBlock.Casing_Material_RedSteel.getIcon(); + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); case 15: - return TexturesGtBlock.Casing_Machine_Acacia_Log.getIcon(); - /*if (aSide <2) { - if (aSide == 1) { - return TexturesGtBlock.Casing_Machine_Podzol.getIcon(); - } - return TexturesGtBlock.Casing_Machine_Acacia_Log.getIcon(); - } - else { - return TexturesGtBlock.Casing_Machine_Farm_Manager.getIcon(); - }*/ + return TexturesGtBlock.Casing_Machine_Acacia_Log.getIcon(); default: return TexturesGtBlock.Overlay_UU_Matter.getIcon(); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java index 738c8c7cf9..360939eb41 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java @@ -72,9 +72,9 @@ public class GregtechMetaTileEntity_IndustrialPlatePress extends GregtechMeta_Mu @Override public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(4)], new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[50], new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; } - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(4)]}; + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[50]}; } @Override @@ -148,7 +148,7 @@ public class GregtechMetaTileEntity_IndustrialPlatePress extends GregtechMeta_Mu Block aBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); int aMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); - if (!isValidBlockForStructure(tTileEntity, TAE.getIndexFromPage(0, 4), true, aBlock, aMeta, + if (!isValidBlockForStructure(tTileEntity, 50, true, aBlock, aMeta, ModBlocks.blockCasingsMisc, 4)) { Logger.INFO("Bad material press casing"); return false; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java index ca6eeda207..40d12356d8 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java @@ -238,7 +238,7 @@ extends GregtechMeta_MultiBlockBase { public byte getCasingTextureIndex() { - return (byte) TAE.GTPP_INDEX(20); + return (byte) TAE.GTPP_INDEX(11); } private boolean addToMachineList(final IGregTechTileEntity tTileEntity) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java index b8e6d0c252..01243343b4 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java @@ -154,11 +154,11 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase { public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { if (aSide == aFacing) { - return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(28)], + return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[TAE.getIndexFromPage(0, 10)], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER) }; } - return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(28)] }; + return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[TAE.getIndexFromPage(0, 10)] }; } @Override @@ -179,7 +179,7 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase { Block aBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); int aMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); - if (!isValidBlockForStructure(tTileEntity, TAE.GTPP_INDEX(28), true, aBlock, aMeta, + if (!isValidBlockForStructure(tTileEntity, TAE.getIndexFromPage(0, 10), true, aBlock, aMeta, ModBlocks.blockCasings2Misc, 12)) { Logger.INFO("Bad Autcrafter casing"); return false; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java index 620bb9f4b3..45077f4cf7 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java @@ -251,7 +251,7 @@ extends GregtechMeta_MultiBlockBase Block aBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); int aMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); - if (!isValidBlockForStructure(tTileEntity, TAE.getIndexFromPage(1, 11), true, aBlock, aMeta, + if (!isValidBlockForStructure(tTileEntity, TAE.getIndexFromPage(0, 1), true, aBlock, aMeta, ModBlocks.blockCasings2Misc, 11)) { log("Bad Thermal Boiler casing"); return false; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java index cb8b7590ee..579a26dc16 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java @@ -87,18 +87,18 @@ public class GregtechMTE_MiniFusionPlant extends GregtechMeta_MultiBlockBase { public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { if (aSide == this.getBaseMetaTileEntity().getBackFacing()) { - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(28)], + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(10)], Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[(int) this.getInputTier()]}; } if (aSide == 1) { - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(28)], + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(10)], Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[(int) this.getOutputTier()]}; } if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(28)], + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(10)], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER)}; } - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(28)]}; + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(10)]}; } @@ -166,7 +166,7 @@ public class GregtechMTE_MiniFusionPlant extends GregtechMeta_MultiBlockBase { if (h != 0 || (xDir + i != 0 || zDir + j != 0) && (i != 0 || j != 0)) { IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j); - if (this.addToMachineList(tTileEntity, TAE.GTPP_INDEX(28))) { + if (this.addToMachineList(tTileEntity, TAE.GTPP_INDEX(10))) { tAmount++; } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java index 6070e3604a..f7cf3839fb 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java @@ -210,7 +210,7 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas final int aMeta = getBaseMetaTileEntity().getMetaID(aX, aY, aZ); final IGregTechTileEntity tTileEntity2 = getBaseMetaTileEntity().getIGregTechTileEntity(aX, aY, aZ); - boolean debug = isValidBlockForStructure(tTileEntity2, TAE.GTPP_INDEX(26), true, aBlock, aMeta, getCasing(), getCasingMeta()); + boolean debug = isValidBlockForStructure(tTileEntity2, 44, true, aBlock, aMeta, getCasing(), getCasingMeta()); /*if (!debug) { this.getBaseMetaTileEntity().getWorld().setBlock(aX, aY, aZ, ModBlocks.blockCompressedObsidian); @@ -275,12 +275,12 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { ITexture[] sTexture; if (aSide == aFacing) { - sTexture = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF, Dyes.getModulation(-1, Dyes._NULL.mRGBa)), new GT_RenderedTexture(getIconOverlay())}; + sTexture = new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[44], new GT_RenderedTexture(getIconOverlay())}; } else { if (!aActive) { - sTexture = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF, Dyes.getModulation(-1, Dyes._NULL.mRGBa))}; + sTexture = new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[44]}; } else { - sTexture = new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF, Dyes.getModulation(-1, Dyes._NULL.mRGBa))}; + sTexture = new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[44]}; } } return sTexture; @@ -467,22 +467,22 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas public boolean turnCasingActive(final boolean status) { if (this.mEnergyHatches != null) { for (final GT_MetaTileEntity_Hatch_Muffler hatch : this.mMufflerHatches) { - hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(26) : (byte) TAE.GTPP_INDEX(26); + hatch.mMachineBlock = status ? (byte) 44 : (byte) 44; } } if (this.mOutputHatches != null) { for (final GT_MetaTileEntity_Hatch_Output hatch : this.mOutputHatches) { - hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(26) : (byte) TAE.GTPP_INDEX(26); + hatch.mMachineBlock = status ? (byte) 44 : (byte) 44; } } if (this.mInputHatches != null) { for (final GT_MetaTileEntity_Hatch_Input hatch : this.mInputHatches) { - hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(26) : (byte) TAE.GTPP_INDEX(26); + hatch.mMachineBlock = status ? (byte) 44 : (byte) 44; } } if (this.mMaintenanceHatches != null) { for (final GT_MetaTileEntity_Hatch_Maintenance hatch : this.mMaintenanceHatches) { - hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(26) : (byte) TAE.GTPP_INDEX(26); + hatch.mMachineBlock = status ? (byte) 44 : (byte) 44; } } return true; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java index 535dfb3faa..6292417e0b 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java @@ -1,32 +1,25 @@ package gtPlusPlus.xmod.gregtech.loaders; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; - -import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks; import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks2; import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks3; import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks4; +import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaSpecialMultiCasings; import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaTieredCasingBlocks1; public class Gregtech_Blocks { public static void run(){ - - //Logger.INFO("Expanding Gregtech Texture Array from 128 -> 1024."); - boolean didExpand = TAE.hookGtTextures(); - //Logger.INFO("Did Texture Array expand correctly? "+didExpand); - Logger.INFO("|======| Texture Array Length: "+Textures.BlockIcons.CASING_BLOCKS.length+" |======|"); //Casing Blocks ModBlocks.blockCasingsMisc = new GregtechMetaCasingBlocks(); ModBlocks.blockCasings2Misc = new GregtechMetaCasingBlocks2(); ModBlocks.blockCasings3Misc = new GregtechMetaCasingBlocks3(); ModBlocks.blockCasings4Misc = new GregtechMetaCasingBlocks4(); - + ModBlocks.blockCasingsTieredGTPP = new GregtechMetaTieredCasingBlocks1(); + ModBlocks.blockSpecialMultiCasings = new GregtechMetaSpecialMultiCasings(); } } diff --git a/src/resources/assets/miscutils/lang/en_US.lang b/src/resources/assets/miscutils/lang/en_US.lang index 7713e74566..274fb8f36e 100644 --- a/src/resources/assets/miscutils/lang/en_US.lang +++ b/src/resources/assets/miscutils/lang/en_US.lang @@ -3124,3 +3124,7 @@ item.BasicMetaFood.5.name=Cooked Wolf Meat item.BasicMetaFood.6.name=Raw Ocelot Meat item.BasicMetaFood.7.name=Cooked Ocelot Meat item.BasicMetaFood.8.name=Blaze Flesh + +item.itemCellNaquadahFuel.name=Naquadah Fuel Cell +item.itemCellEnrichedNaquadahFuel.name=Enriched Naquadah Fuel Cell +item.itemCellNaquadriaFuel.name=Naquadria Fuel Cell
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/items/food/MetaItem1/4.png b/src/resources/assets/miscutils/textures/items/food/MetaItem1/4.png Binary files differindex f32a00069e..db5ddf0063 100644 --- a/src/resources/assets/miscutils/textures/items/food/MetaItem1/4.png +++ b/src/resources/assets/miscutils/textures/items/food/MetaItem1/4.png |