From 75d417bfadc00fe14cfa3322a89dfc4b929919d4 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Tue, 9 Apr 2019 14:28:22 +1000 Subject: + Added some new OSRS materials. % Logging tweaks to HazmatUtils.java. --- src/Java/gtPlusPlus/core/material/ELEMENT.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/Java/gtPlusPlus/core/material') diff --git a/src/Java/gtPlusPlus/core/material/ELEMENT.java b/src/Java/gtPlusPlus/core/material/ELEMENT.java index 62e1163a39..9a4947027d 100644 --- a/src/Java/gtPlusPlus/core/material/ELEMENT.java +++ b/src/Java/gtPlusPlus/core/material/ELEMENT.java @@ -214,6 +214,14 @@ public final class ELEMENT { public static final Material ADVANCED_NITINOL = new Material("Advanced Nitinol", MaterialState.SOLID, TextureSets.ENRICHED.get(), ALLOY.NITINOL_60.getRGB(), 8400, 14377, 40, 51, true, "⚷⚙⚷ Ni4Ti6", 0);//Not a GT Inherited Material public static final Material HYPOGEN = new Material("Hypogen", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{220, 120, 75}, 12255, 19377, 240, 251, true, "Hy⚶", 0);//Not a GT Inherited Material + + //Runescape materials + public static final Material BLACK_METAL = new Material("Black", MaterialState.SOLID, TextureSet.SET_FINE, new short[] {5, 5, 5}, 2350, 4650, 24, 17, false, "҈", 0);//Not a GT Inherited Material + public static final Material WHITE_METAL = new Material("White", MaterialState.SOLID, TextureSet.SET_FINE, new short[] {250, 250, 250}, 4560, 7580, 35, 41, false, "҉", 0);//Not a GT Inherited Material + public static final Material GRANITE = new Material("Ancient Granite", MaterialState.SOLID, TextureSet.SET_SAND, new short[] {127, 127, 127}, 500, 2000, 16, 12, false, "«»", 0);//Not a GT Inherited Material + public static final Material RUNITE = new Material("Runite", MaterialState.SOLID, TextureSet.SET_METALLIC, new short[] {20, 40, 220}, 6750, 11550, 73, 87, true, "§", 0);//Not a GT Inherited Material + public static final Material DRAGON_METAL = new Material("Dragon", MaterialState.SOLID, TextureSet.SET_SHINY, new short[] {220, 40, 20}, 12560, 19850, 96, 105, true, "۞", 0);//Not a GT Inherited Material + } -- cgit From 4e1fe73afd9d8c8097a1b89f6f47b07c0ebbb729 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Tue, 9 Apr 2019 17:11:48 +1000 Subject: + Added Babbit Alloy and Black Titanium Alloys. % Adjusted colouring of new OSRS materials. --- src/Java/gtPlusPlus/core/item/ModItems.java | 17 +++++- src/Java/gtPlusPlus/core/material/ALLOY.java | 85 +++++++++++++++++++++----- src/Java/gtPlusPlus/core/material/ELEMENT.java | 12 ++-- 3 files changed, 90 insertions(+), 24 deletions(-) (limited to 'src/Java/gtPlusPlus/core/material') diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java index aa450ccd4b..e3c01b7ea5 100644 --- a/src/Java/gtPlusPlus/core/item/ModItems.java +++ b/src/Java/gtPlusPlus/core/item/ModItems.java @@ -526,9 +526,9 @@ public final class ModItems { //Custom Materials that are from Runescape MaterialGenerator.generate(ELEMENT.STANDALONE.BLACK_METAL); MaterialGenerator.generate(ELEMENT.STANDALONE.WHITE_METAL); - MaterialGenerator.generate(ELEMENT.STANDALONE.GRANITE); - MaterialGenerator.generate(ELEMENT.STANDALONE.RUNITE); - MaterialGenerator.generate(ELEMENT.STANDALONE.DRAGON_METAL); + MaterialGenerator.generate(ELEMENT.STANDALONE.GRANITE, false, false); + MaterialGenerator.generate(ELEMENT.STANDALONE.RUNITE, false); + MaterialGenerator.generate(ELEMENT.STANDALONE.DRAGON_METAL, false); //Carbides - Tungsten Carbide exists in .09 so don't generate it. - Should still come before alloys though if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ @@ -640,6 +640,17 @@ public final class ModItems { MaterialGenerator.generate(ALLOY.TITANSTEEL); MaterialGenerator.generate(ALLOY.ARCANITE); MaterialGenerator.generate(ALLOY.OCTIRON); + + MaterialGenerator.generate(ALLOY.BABBIT_ALLOY, false); + MaterialGenerator.generate(ALLOY.BLACK_TITANIUM, false); + + + + + + + + //Must be the final Alloy to Generate MaterialGenerator.generate(ALLOY.QUANTUM); diff --git a/src/Java/gtPlusPlus/core/material/ALLOY.java b/src/Java/gtPlusPlus/core/material/ALLOY.java index 4edd36c51f..f18cd4ec73 100644 --- a/src/Java/gtPlusPlus/core/material/ALLOY.java +++ b/src/Java/gtPlusPlus/core/material/ALLOY.java @@ -190,7 +190,7 @@ public final class ALLOY { new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 20), new MaterialStack(NICHROME, 10) }); - + public static final Material NITINOL_60 = new Material( "Nitinol 60", //Material Name MaterialState.SOLID, //State @@ -474,7 +474,7 @@ public final class ALLOY { new MaterialStack(ELEMENT.getInstance().CARBON, 50), new MaterialStack(ELEMENT.getInstance().TUNGSTEN, 50) }); - + public static final Material TUNGSTEN_TITANIUM_CARBIDE = new Material( "Tungsten Titanium Carbide", //Material Name MaterialState.SOLID, //State @@ -549,7 +549,7 @@ public final class ALLOY { new MaterialStack(ELEMENT.getInstance().NIOBIUM, 50), new MaterialStack(ELEMENT.getInstance().CARBON, 50) }); - + public static final Material ARCANITE = new Material( "Arcanite", //Material Name MaterialState.SOLID, //State @@ -680,7 +680,7 @@ public final class ALLOY { new MaterialStack(TRINIUM_NAQUADAH, 9), new MaterialStack(ELEMENT.getInstance().CARBON, 1) }); - + public static final Material TRINIUM_REINFORCED_STEEL = new Material( "Arceus Alloy 2B", //Material Name MaterialState.SOLID, //State @@ -697,8 +697,8 @@ public final class ALLOY { new MaterialStack(ALLOY.TUNGSTENSTEEL, 20), new MaterialStack(ALLOY.OSMIRIDIUM, 10) }); - - + + /* * Witchery Material @@ -719,12 +719,12 @@ public final class ALLOY { new MaterialStack(ELEMENT.getInstance().THAUMIUM, 30), new MaterialStack(ELEMENT.getInstance().IRON, 35) }); - - + + /* * Top Tier Alloys */ - + //0lafe Compound public static final Material LAFIUM = new Material( "Lafium Compound", //Material Name @@ -768,12 +768,12 @@ public final class ALLOY { new MaterialStack(ELEMENT.getInstance().TITANIUM, 12), new MaterialStack(ALLOY.OSMIRIDIUM, 6) }); - + //Piky Alloy public static final Material PIKYONIUM = new Material( "Pikyonium 64B", //Material Name MaterialState.SOLID, //State - new short[]{52, 103, 186, 0}, //Material Colour + new short[]{52, 103, 186, 0}, //Material Colour 7850, //Melting Point in C 11765, //Boiling Point in C -1, @@ -790,7 +790,7 @@ public final class ALLOY { new MaterialStack(ELEMENT.getInstance().YTTRIUM, 2), new MaterialStack(ALLOY.TUNGSTENSTEEL, 8) }); - + //Piky Alloy public static final Material ABYSSAL = new Material( "Abyssal Alloy", //Material Name @@ -812,7 +812,7 @@ public final class ALLOY { new MaterialStack(ELEMENT.getInstance().RADON, 2), new MaterialStack(ELEMENT.getInstance().GERMANIUM, 2), }); - + //Titansteel public static final Material TITANSTEEL = new Material( "Titansteel", //Material Name @@ -830,8 +830,8 @@ public final class ALLOY { new MaterialStack(ELEMENT.getInstance().TERRA, 1), new MaterialStack(ELEMENT.getInstance().PERDITIO, 1), }); - - + + public static final Material OCTIRON = new Material( "Octiron", //Material Name MaterialState.SOLID, //State @@ -849,7 +849,62 @@ public final class ALLOY { new MaterialStack(STEEL_BLACK, 10), new MaterialStack(ELEMENT.getInstance().THAUMIUM, 25) }); + + + + public static final Material BLACK_TITANIUM = new Material( + "Black Titanium", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + Materials.Titanium.mMeltingPoint*4, //Melting Point in C + Materials.Titanium.mMeltingPoint*16, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().TITANIUM, 55), + new MaterialStack(ELEMENT.getInstance().PRASEODYMIUM, 12), + new MaterialStack(ELEMENT.getInstance().TUNGSTEN, 8), + new MaterialStack(ELEMENT.getInstance().COBALT, 6), + new MaterialStack(ELEMENT.getInstance().MANGANESE, 4), + new MaterialStack(ELEMENT.getInstance().PHOSPHORUS, 4), + new MaterialStack(ELEMENT.getInstance().PALLADIUM, 4), + new MaterialStack(ELEMENT.getInstance().NIOBIUM, 2), + new MaterialStack(ELEMENT.getInstance().ARGON, 5) + }); + public static final Material BABBIT_ALLOY = new Material( + "Babbit Alloy", //Material Name + MaterialState.SOLID, //State + null, //Material Colour + 268, //Melting Point in C + 589, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().TIN, 10), + new MaterialStack(ELEMENT.getInstance().LEAD, 72), + new MaterialStack(ELEMENT.getInstance().ANTIMONY, 16), + new MaterialStack(ELEMENT.getInstance().ARSENIC, 2) + }); + + + + + + + + + + + + + + + //Quantum public static final Material QUANTUM = new Material( "Quantum", //Material Name diff --git a/src/Java/gtPlusPlus/core/material/ELEMENT.java b/src/Java/gtPlusPlus/core/material/ELEMENT.java index 9a4947027d..9727ccbed5 100644 --- a/src/Java/gtPlusPlus/core/material/ELEMENT.java +++ b/src/Java/gtPlusPlus/core/material/ELEMENT.java @@ -212,15 +212,15 @@ public final class ELEMENT { public static final Material ASTRAL_TITANIUM = new Material("Astral Titanium", MaterialState.SOLID, TextureSets.REFINED.get(), new short[] {220, 160, 240, 2}, INSTANCE.TITANIUM.getMeltingPointC()+7500, INSTANCE.TITANIUM.getBoilingPointC()+7500, 145, 133, true, "✧◇✧", 0);//Not a GT Inherited Material public static final Material CHRONOMATIC_GLASS = new Material("Chromatic Glass", MaterialState.SOLID, new short[]{255, 255, 255, 3}, 9200, 17550, 40, 51, false, "⌘☯𓍰 𓍱 𓍲 𓍳 𓍴 𓍵 𓍶 𓍷 𓍸 ☯⌘ ", 0);//Not a GT Inherited Material public static final Material ADVANCED_NITINOL = new Material("Advanced Nitinol", MaterialState.SOLID, TextureSets.ENRICHED.get(), ALLOY.NITINOL_60.getRGB(), 8400, 14377, 40, 51, true, "⚷⚙⚷ Ni4Ti6", 0);//Not a GT Inherited Material - public static final Material HYPOGEN = new Material("Hypogen", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{220, 120, 75}, 12255, 19377, 240, 251, true, "Hy⚶", 0);//Not a GT Inherited Material + public static final Material HYPOGEN = new Material("Hypogen", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{220, 120, 75, 2}, 12255, 19377, 240, 251, true, "Hy⚶", 0);//Not a GT Inherited Material //Runescape materials - public static final Material BLACK_METAL = new Material("Black", MaterialState.SOLID, TextureSet.SET_FINE, new short[] {5, 5, 5}, 2350, 4650, 24, 17, false, "҈", 0);//Not a GT Inherited Material - public static final Material WHITE_METAL = new Material("White", MaterialState.SOLID, TextureSet.SET_FINE, new short[] {250, 250, 250}, 4560, 7580, 35, 41, false, "҉", 0);//Not a GT Inherited Material - public static final Material GRANITE = new Material("Ancient Granite", MaterialState.SOLID, TextureSet.SET_SAND, new short[] {127, 127, 127}, 500, 2000, 16, 12, false, "«»", 0);//Not a GT Inherited Material - public static final Material RUNITE = new Material("Runite", MaterialState.SOLID, TextureSet.SET_METALLIC, new short[] {20, 40, 220}, 6750, 11550, 73, 87, true, "§", 0);//Not a GT Inherited Material - public static final Material DRAGON_METAL = new Material("Dragon", MaterialState.SOLID, TextureSet.SET_SHINY, new short[] {220, 40, 20}, 12560, 19850, 96, 105, true, "۞", 0);//Not a GT Inherited Material + public static final Material BLACK_METAL = new Material("Black", MaterialState.SOLID, TextureSet.SET_METALLIC, new short[] {5, 5, 5}, 2350, 4650, 24, 17, false, "҈", 0, new MaterialStack[]{new MaterialStack(getInstance().LEAD, 15), new MaterialStack(getInstance().TUNGSTEN, 25), new MaterialStack(getInstance().CARBON, 60)});//Not a GT Inherited Material + public static final Material WHITE_METAL = new Material("White", MaterialState.SOLID, TextureSet.SET_METALLIC, new short[] {255, 255, 255}, 4560, 7580, 35, 41, false, "҉", 0, new MaterialStack[]{new MaterialStack(getInstance().COPPER, 5), new MaterialStack(getInstance().ANTIMONY, 10), new MaterialStack(getInstance().PLATINUM, 10), new MaterialStack(getInstance().TIN, 75)});//Not a GT Inherited Material + public static final Material GRANITE = new Material("Ancient Granite", MaterialState.SOLID, TextureSet.SET_SAND, new short[] {107, 107, 107}, 500, 2000, 16, 12, false, "«»", 0);//Not a GT Inherited Material + public static final Material RUNITE = new Material("Runite", MaterialState.SOLID, TextureSet.SET_FINE, new short[] {60, 200, 190}, 6750, 11550, 73, 87, true, "§", 0);//Not a GT Inherited Material + public static final Material DRAGON_METAL = new Material("Dragon", MaterialState.SOLID, TextureSet.SET_SHINY, new short[] {220, 40, 20, 2}, 10160, 17850, 96, 105, true, "۞", 0);//Not a GT Inherited Material } -- cgit From d087513a06066296455b1cdc00164398c0260da3 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Thu, 11 Apr 2019 00:31:16 +1000 Subject: + Added some base classes for future content. + Made Teflon a refined version of PTFE. $ Fixed bad usage of PRASEODYMIUM. $ Fixed bug regrading null chemical symbols on Materials. $ Finally fixed Nano/Quantum handling for Hazmat. $ Fixed Worldgen in Everglades being too dense. --- .../core/item/bauble/MonsterKillerBaseBauble.java | 5 + .../core/item/chemistry/GenericChem.java | 28 +- .../item/wearable/armour/hazmat/ArmourHazmat.java | 117 ++++++++ src/Java/gtPlusPlus/core/material/ALLOY.java | 2 +- src/Java/gtPlusPlus/core/material/Material.java | 7 +- src/Java/gtPlusPlus/core/material/NONMATERIAL.java | 6 +- .../core/util/minecraft/HazmatUtils.java | 268 +++++++++++------- .../everglades/gen/gt/WorldGen_Ores.java | 309 ++++----------------- src/resources/assets/gregtech/lang/en_US.lang | 6 +- 9 files changed, 375 insertions(+), 373 deletions(-) create mode 100644 src/Java/gtPlusPlus/core/item/bauble/MonsterKillerBaseBauble.java create mode 100644 src/Java/gtPlusPlus/core/item/wearable/armour/hazmat/ArmourHazmat.java (limited to 'src/Java/gtPlusPlus/core/material') diff --git a/src/Java/gtPlusPlus/core/item/bauble/MonsterKillerBaseBauble.java b/src/Java/gtPlusPlus/core/item/bauble/MonsterKillerBaseBauble.java new file mode 100644 index 0000000000..213a3f5b7c --- /dev/null +++ b/src/Java/gtPlusPlus/core/item/bauble/MonsterKillerBaseBauble.java @@ -0,0 +1,5 @@ +package gtPlusPlus.core.item.bauble; + +public class MonsterKillerBaseBauble { + +} diff --git a/src/Java/gtPlusPlus/core/item/chemistry/GenericChem.java b/src/Java/gtPlusPlus/core/item/chemistry/GenericChem.java index 02afada849..6360429415 100644 --- a/src/Java/gtPlusPlus/core/item/chemistry/GenericChem.java +++ b/src/Java/gtPlusPlus/core/item/chemistry/GenericChem.java @@ -2,8 +2,11 @@ package gtPlusPlus.core.item.chemistry; import gregtech.api.enums.TextureSet; import gtPlusPlus.api.objects.minecraft.ItemPackage; +import gtPlusPlus.core.material.ELEMENT; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.material.MaterialStack; +import gtPlusPlus.core.material.NONMATERIAL; import gtPlusPlus.core.material.state.MaterialState; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.minecraft.FluidUtils; @@ -18,9 +21,28 @@ public class GenericChem extends ItemPackage { * Materials */ - public static final Material BAKELITE = new Material("Bakelite", MaterialState.SOLID, TextureSet.SET_DULL, new short[]{90, 140, 140}, 120, 240, 23, 24, true, "", 0);//Not a GT Inherited Material - public static final Material NYLON = new Material("Nylon", MaterialState.SOLID, TextureSet.SET_SHINY, new short[]{45, 45, 45}, 300, 600, 44, 48, true, "", 0);//Not a GT Inherited Material - public static final Material TEFLON = new Material("Teflon", MaterialState.SOLID, TextureSet.SET_SHINY, new short[]{75, 45, 75}, 300, 600, 44, 48, true, "", 0);//Not a GT Inherited Material + public static final Material BAKELITE = new Material("Bakelite", MaterialState.SOLID, TextureSet.SET_DULL, new short[]{90, 140, 140}, 120, 240, 23, 24, true, null, 0);//Not a GT Inherited Material + public static final Material NYLON = new Material("Nylon", MaterialState.SOLID, TextureSet.SET_SHINY, new short[]{45, 45, 45}, 300, 600, 44, 48, true, null, 0);//Not a GT Inherited Material + + //Refined PTFE + public static final Material TEFLON = new Material( + "Teflon", + MaterialState.SOLID, + TextureSet.SET_SHINY, + new short[] { 75, 45, 75 }, + 330, 640, + -1, -1, + false, + null, + 0, + new MaterialStack[] { + new MaterialStack(NONMATERIAL.PTFE, 88), + new MaterialStack(NONMATERIAL.PLASTIC, 6), + new MaterialStack(ELEMENT.getInstance().CHLORINE, 3), + new MaterialStack(ELEMENT.getInstance().SODIUM, 3) + });// Not a GT + // Inherited + // Material //public static final Material HYPOGEN = new Material("Hypogen", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{220, 120, 75}, 12255, 19377, 240, 251, true, "Hy⚶", 0);//Not a GT Inherited Material //public static final Material HYPOGEN = new Material("Hypogen", MaterialState.SOLID, TextureSets.NUCLEAR.get(), new short[]{220, 120, 75}, 12255, 19377, 240, 251, true, "Hy⚶", 0);//Not a GT Inherited Material diff --git a/src/Java/gtPlusPlus/core/item/wearable/armour/hazmat/ArmourHazmat.java b/src/Java/gtPlusPlus/core/item/wearable/armour/hazmat/ArmourHazmat.java new file mode 100644 index 0000000000..9fd7bf7020 --- /dev/null +++ b/src/Java/gtPlusPlus/core/item/wearable/armour/hazmat/ArmourHazmat.java @@ -0,0 +1,117 @@ +package gtPlusPlus.core.item.wearable.armour.hazmat; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.core.item.wearable.armour.ArmourLoader; +import gtPlusPlus.core.item.wearable.armour.base.BaseArmourHelm; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class ArmourHazmat extends BaseArmourHelm { + + public IIcon iconHelm; + + public ArmourHazmat() { + super(ArmourLoader.TinFoilArmour, 0); + } + + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister ir) { + this.iconHelm = ir.registerIcon(CORE.MODID + ":itemHatTinFoil"); + } + + @Override + public int getRenderIndex() { + return 0; + } + + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int par1) { + return this.iconHelm; + } + + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { + return CORE.MODID + ":textures/models/TinFoil.png"; + } + + public EnumRarity getRarity(ItemStack itemstack) { + return EnumRarity.rare; + } + + public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) { + return false; + } + + @Override + public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { + return super.getArmorDisplay(player, armor, slot); + } + + @Override + public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { + + } + + @SuppressWarnings({ "unchecked" }) + @Override + public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List aList, boolean p_77624_4_) { + aList.add("DoomSquirter's protection against cosmic radiation!"); + aList.add("General paranoia makes the wearer unable to collect xp"); + aList.add("Movement speed is also reduced, to keep you safe"); + aList.add("This hat may also have other strange powers"); + } + + @Override + public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, + int slot) { + return new ArmorProperties(0, 0, 0); + } + + @Override + public boolean isDamageable() { + return false; + } + + @Override + public boolean itemInteractionForEntity(ItemStack p_111207_1_, EntityPlayer p_111207_2_, + EntityLivingBase p_111207_3_) { + return super.itemInteractionForEntity(p_111207_1_, p_111207_2_, p_111207_3_); + } + + @Override + public void onUpdate(ItemStack aStack, World aWorld, Entity aEntity, int p_77663_4_, boolean p_77663_5_) { + super.onUpdate(aStack, aWorld, aEntity, p_77663_4_, p_77663_5_); + } + + @Override + public boolean onEntityItemUpdate(EntityItem entityItem) { + return super.onEntityItemUpdate(entityItem); + } + + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { + if (itemStack != null && player != null && world != null && !world.isRemote) { + if (player instanceof EntityPlayer) { + + } + } + super.onArmorTick(world, player, itemStack); + } + + @Override + public boolean showDurabilityBar(ItemStack stack) { + return false; + } + +} diff --git a/src/Java/gtPlusPlus/core/material/ALLOY.java b/src/Java/gtPlusPlus/core/material/ALLOY.java index f18cd4ec73..8bcbb2a051 100644 --- a/src/Java/gtPlusPlus/core/material/ALLOY.java +++ b/src/Java/gtPlusPlus/core/material/ALLOY.java @@ -864,7 +864,7 @@ public final class ALLOY { //Material Stacks with Percentage of required elements. new MaterialStack[]{ new MaterialStack(ELEMENT.getInstance().TITANIUM, 55), - new MaterialStack(ELEMENT.getInstance().PRASEODYMIUM, 12), + new MaterialStack(ELEMENT.getInstance().LANTHANUM, 12), new MaterialStack(ELEMENT.getInstance().TUNGSTEN, 8), new MaterialStack(ELEMENT.getInstance().COBALT, 6), new MaterialStack(ELEMENT.getInstance().MANGANESE, 4), diff --git a/src/Java/gtPlusPlus/core/material/Material.java b/src/Java/gtPlusPlus/core/material/Material.java index 58a7f68afe..8fb3c5fc3b 100644 --- a/src/Java/gtPlusPlus/core/material/Material.java +++ b/src/Java/gtPlusPlus/core/material/Material.java @@ -141,7 +141,7 @@ public class Material { this (materialName, defaultState, set, durability, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, chemicalSymbol, radiationLevel, true, true, inputs); } - public Material(final String materialName, final MaterialState defaultState, final TextureSet set, final long durability, short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final String chemicalSymbol, final int radiationLevel, boolean generateCells, boolean generateFluid, final MaterialStack... inputs){ + public Material(final String materialName, final MaterialState defaultState, final TextureSet set, final long durability, short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, String chemicalSymbol, final int radiationLevel, boolean generateCells, boolean generateFluid, final MaterialStack... inputs){ if (mMaterialMap.add(this)) { @@ -442,6 +442,11 @@ public class Material { //Makes a Fancy Chemical Tooltip + + if (chemicalSymbol == null) { + chemicalSymbol = ""; + } + this.vChemicalSymbol = chemicalSymbol; if (this.vMaterialInput != null){ this.vChemicalFormula = this.getToolTip(chemicalSymbol, OrePrefixes.dust.mMaterialAmount / M, true); diff --git a/src/Java/gtPlusPlus/core/material/NONMATERIAL.java b/src/Java/gtPlusPlus/core/material/NONMATERIAL.java index 4da34ae16c..7ab72d50bc 100644 --- a/src/Java/gtPlusPlus/core/material/NONMATERIAL.java +++ b/src/Java/gtPlusPlus/core/material/NONMATERIAL.java @@ -27,7 +27,11 @@ public class NONMATERIAL { //Wrought Iron public static final Material WROUGHT_IRON = MaterialUtils.generateMaterialFromGtENUM(Materials.WroughtIron); - + //PTFE + public static final Material PTFE = MaterialUtils.generateMaterialFromGtENUM(MaterialUtils.getMaterial("Polytetrafluoroethylene", "Plastic")); + + //Plastic + public static final Material PLASTIC = MaterialUtils.generateMaterialFromGtENUM(MaterialUtils.getMaterial("Plastic", "Rubber")); static { diff --git a/src/Java/gtPlusPlus/core/util/minecraft/HazmatUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/HazmatUtils.java index e6ffe1e89d..c37b1271d7 100644 --- a/src/Java/gtPlusPlus/core/util/minecraft/HazmatUtils.java +++ b/src/Java/gtPlusPlus/core/util/minecraft/HazmatUtils.java @@ -21,159 +21,184 @@ import gtPlusPlus.api.objects.data.AutoMap; import gtPlusPlus.core.util.Utils; import ic2.core.Ic2Items; import ic2.core.item.armor.ItemArmorHazmat; +import ic2.core.item.armor.ItemArmorNanoSuit; +import ic2.core.item.armor.ItemArmorQuantumSuit; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.event.entity.player.ItemTooltipEvent; public class HazmatUtils { - - public static final GT_HashSet sHazmatList = new GT_HashSet(); - - private static final HashMap> mToolTips = new HashMap>(); - - + public static final GT_HashSet sHazmatList = new GT_HashSet(); + + private static final HashMap> mToolTips = new HashMap>(); + private static boolean mInit = false; private static HazmatUtils mInstance; - + public static void init() { - if (mInit){ + if (mInit) { return; } - + mInstance = new HazmatUtils(); - + sHazmatList.add(GT_ModHandler.getIC2Item("hazmatHelmet", 1L, 32767)); sHazmatList.add(GT_ModHandler.getIC2Item("hazmatChestplate", 1L, 32767)); sHazmatList.add(GT_ModHandler.getIC2Item("hazmatLeggings", 1L, 32767)); sHazmatList.add(GT_ModHandler.getIC2Item("hazmatBoots", 1L, 32767)); - //Make Nano a hazmat suit - addProtection(Ic2Items.nanoHelmet); - addProtection(Ic2Items.nanoBodyarmor); - addProtection(Ic2Items.nanoLeggings); - addProtection(Ic2Items.nanoBoots); - + // Make Nano a hazmat suit + addProtection(ItemUtils.getItemStackFromFQRN("IC2:itemArmorNanoHelmet:27", 1)); + addProtection(ItemUtils.getItemStackFromFQRN("IC2:itemArmorNanoChestplate:27", 1)); + addProtection(ItemUtils.getItemStackFromFQRN("IC2:itemArmorNanoLegs:27", 1)); + addProtection(ItemUtils.getItemStackFromFQRN("IC2:itemArmorNanoBoots:27", 1)); + Logger.INFO("[Hazmat] Registered Nano as hazmat gear."); - - //Make Quantum a hazmat suit - addProtection(Ic2Items.quantumHelmet); - addProtection(Ic2Items.quantumBodyarmor); - addProtection(Ic2Items.quantumLeggings); - addProtection(Ic2Items.quantumBoots); - Logger.INFO("[Hazmat] Registered Quantum as hazmat gear."); - - Utils.registerEvent(mInstance); + + // Make Quantum a hazmat suit + addProtection(ItemUtils.getItemStackFromFQRN("IC2:itemArmorQuantumHelmet:27", 1)); + addProtection(ItemUtils.getItemStackFromFQRN("IC2:itemArmorQuantumChestplate:27", 1)); + addProtection(ItemUtils.getItemStackFromFQRN("IC2:itemArmorQuantumLegs:27", 1)); + addProtection(ItemUtils.getItemStackFromFQRN("IC2:itemArmorQuantumBoots:27", 1)); + Logger.INFO("[Hazmat] Registered Quantum as hazmat gear."); + + Utils.registerEvent(mInstance); Logger.INFO("[Hazmat] Registered Tooltip handler for hazmat gear."); mInit = true; - + } - + private final static String mToolTipText = "Provides protection from:"; - + @SubscribeEvent - public void onItemTooltip(ItemTooltipEvent event){ - Logger.INFO("Ticking Hazmat handler"); - if (GTplusplus.CURRENT_LOAD_PHASE != INIT_PHASE.STARTED && GTplusplus.CURRENT_LOAD_PHASE != INIT_PHASE.SERVER_START) { - Logger.INFO("[Hazmat] Bad Phase : "+GTplusplus.CURRENT_LOAD_PHASE); + public void onItemTooltip(ItemTooltipEvent event) { + //Logger.INFO("Ticking Hazmat handler"); + if (GTplusplus.CURRENT_LOAD_PHASE != INIT_PHASE.STARTED + && GTplusplus.CURRENT_LOAD_PHASE != INIT_PHASE.SERVER_START) { + //Logger.INFO("[Hazmat] Bad Phase : " + GTplusplus.CURRENT_LOAD_PHASE); return; } if (event.itemStack == null || isVanillaHazmatPiece(event.itemStack)) { Logger.INFO("[Hazmat] Invalid Itemstack or vanilla hazmat"); return; - } - else { - Logger.INFO("[Hazmat] Finding Tooltip Data"); + } else { ItemStack aStackTemp = event.itemStack; GT_ItemStack aStack = new GT_ItemStack(aStackTemp); - String[] aTooltips = getTooltips(aStack); - if (aTooltips == null || aTooltips.length == 0) { - Logger.INFO("[Hazmat] No Info!"); - return; + if (isNanoArmourPiece(aStackTemp) || isQuantumArmourPiece(aStackTemp)) { + event.toolTip.add("Provides full hazmat protection."); } - else { - Logger.INFO("[Hazmat] Found Tooltips!"); - if (providesProtection(aStackTemp)) { - event.toolTip.add("Provides full hazmat protection."); - } - else { - event.toolTip.add(mToolTipText); - for (String r : aTooltips) { - event.toolTip.add(" - "+r); - } - } - } - } + else { + Logger.INFO("[Hazmat] Finding Tooltip Data"); + String[] aTooltips = getTooltips(aStack); + if (aTooltips == null || aTooltips.length == 0) { + Logger.INFO("[Hazmat] No Info!"); + return; + } else { + Logger.INFO("[Hazmat] Found Tooltips!"); + if (providesProtection(aStackTemp)) { + event.toolTip.add("Provides full hazmat protection."); + } else { + event.toolTip.add(mToolTipText); + for (String r : aTooltips) { + event.toolTip.add(" - " + r); + } + } + } + } + } } - - + /** - * Static function to replace {@link #ic2.core.item.armor.ItemArmorHazmat.hasCompleteHazmat(EntityLivingBase)}. - * Because IC2 doesn't let us register things ourself, anything registered via GT/GT++ will return true. + * Static function to replace + * {@link #ic2.core.item.armor.ItemArmorHazmat.hasCompleteHazmat(EntityLivingBase)}. + * Because IC2 doesn't let us register things ourself, anything registered via + * GT/GT++ will return true. + * * @param living - Entity Wearing Armour * @return - Does {@link EntityLivingBase} have a full hazmat suit on? */ - public static boolean hasCompleteHazmat(EntityLivingBase living) { - //Entity is Null, cannot have Hazmat. + public static boolean hasCompleteHazmat(EntityLivingBase living) { + // Entity is Null, cannot have Hazmat. if (living == null || living.isDead) { return false; - } - else { - - //Map All Player Armour slots + } else { + + // Map All Player Armour slots AutoMap aEquipment = new AutoMap(); for (int i = 1; i < 5; ++i) { ItemStack stack = living.getEquipmentInSlot(i); - - //Item is Null, cannot have full suit + + // Item is Null, cannot have full suit if (stack == null) { return false; - } - else { + } else { aEquipment.put(stack); } } - - //Compare Equipment to all items mapped for full hazmat. + + // Compare Equipment to all items mapped for full hazmat. for (ItemStack aSlotStack : aEquipment) { if (!isHazmatPiece(aSlotStack)) { return false; } } - - //We are in some kind of full hazmat, huzzah! - return true; - } + + // We are in some kind of full hazmat, huzzah! + return true; + } } - - + /** * Is this item vanilla IC2 hazmat? + * * @param aArmour - The Armour to provide protection. * @return */ public static boolean isVanillaHazmatPiece(ItemStack aArmour) { - return aArmour != null ? aArmour.getItem() instanceof ItemArmorHazmat : false; - } + return aArmour != null ? aArmour.getItem() instanceof ItemArmorHazmat : false; + } + + /** + * Is this item vanilla IC2 Nanosuit? + * + * @param aArmour - The Armour to provide protection. + * @return + */ + public static boolean isNanoArmourPiece(ItemStack aArmour) { + return aArmour != null ? aArmour.getItem() instanceof ItemArmorNanoSuit : false; + } + /** + * Is this item vanilla IC2 Quantum? + * + * @param aArmour - The Armour to provide protection. + * @return + */ + public static boolean isQuantumArmourPiece(ItemStack aArmour) { + return aArmour != null ? aArmour.getItem() instanceof ItemArmorQuantumSuit : false; + } + /** * Is this item a registered piece of full hazmat? (Provides all 6 protections) + * * @param aStack - The Armour to provide protection. * @return */ public static boolean isHazmatPiece(ItemStack aStack) { return isVanillaHazmatPiece(aStack) || providesProtection(aStack); } - + /** - * Registers the {@link ItemStack} to all types of protection. - * Provides full hazmat protection. Frost, Fire, Bio, Gas, Radioaton & Electricity. + * Registers the {@link ItemStack} to all types of protection. Provides full + * hazmat protection. Frost, Fire, Bio, Gas, Radioaton & Electricity. + * * @param aStack - The Armour to provide protection. * @return - Did we register this ItemStack properly? */ - public static boolean addProtection(ItemStack aVanStack) { - Logger.INFO("[Hazmat] Registering "+aVanStack.getDisplayName() +" for full Hazmat protection."); + public static boolean addProtection(ItemStack aVanStack) { + Logger.INFO("[Hazmat] Registering " + aVanStack.getDisplayName() + " for full Hazmat protection."); GT_ItemStack aStack = getGtStackFromVanilla(aVanStack); AutoMap aAdded = new AutoMap(); aAdded.put(addProtection_Frost(aStack)); @@ -181,7 +206,7 @@ public class HazmatUtils { aAdded.put(addProtection_Biohazard(aStack)); aAdded.put(addProtection_Gas(aStack)); aAdded.put(addProtection_Radiation(aStack)); - aAdded.put(addProtection_Electricty(aStack)); + aAdded.put(addProtection_Electricty(aStack)); for (boolean b : aAdded) { if (!b) { return false; @@ -189,63 +214,78 @@ public class HazmatUtils { } Logger.INFO("[Hazmat] Protection added for all 6 damage types, registering to master Hazmat list."); sHazmatList.add(aStack); - return true; + return true; } + public static boolean addProtection_Frost(GT_ItemStack aStack) { - registerTooltip(aStack, EnumChatFormatting.AQUA+"Frost"); + registerTooltip(aStack, EnumChatFormatting.AQUA + "Frost"); return addProtection_Generic(sFrostHazmatList, aStack); } + public static boolean addProtection_Fire(GT_ItemStack aStack) { - registerTooltip(aStack, EnumChatFormatting.DARK_RED+"Heat"); + registerTooltip(aStack, EnumChatFormatting.DARK_RED + "Heat"); return addProtection_Generic(sHeatHazmatList, aStack); } + public static boolean addProtection_Biohazard(GT_ItemStack aStack) { - registerTooltip(aStack, EnumChatFormatting.GREEN+"Biohazards"); + registerTooltip(aStack, EnumChatFormatting.GREEN + "Biohazards"); return addProtection_Generic(sBioHazmatList, aStack); } + public static boolean addProtection_Gas(GT_ItemStack aStack) { - registerTooltip(aStack, EnumChatFormatting.WHITE+"Gas"); + registerTooltip(aStack, EnumChatFormatting.WHITE + "Gas"); return addProtection_Generic(sGasHazmatList, aStack); } + public static boolean addProtection_Radiation(GT_ItemStack aStack) { - registerTooltip(aStack, EnumChatFormatting.DARK_GREEN+"Radiation"); + registerTooltip(aStack, EnumChatFormatting.DARK_GREEN + "Radiation"); return addProtection_Generic(sRadioHazmatList, aStack); } + public static boolean addProtection_Electricty(GT_ItemStack aStack) { - registerTooltip(aStack, EnumChatFormatting.YELLOW+"Electricity"); + registerTooltip(aStack, EnumChatFormatting.YELLOW + "Electricity"); return addProtection_Generic(sElectroHazmatList, aStack); } - + private static boolean addProtection_Generic(GT_HashSet aSet, GT_ItemStack aStack) { int aMapSize = aSet.size(); aSet.add(aStack); return aMapSize < aSet.size(); } - + /** - * Does this item provide hazmat protection? (Protection against Frost, Heat, Bio, Gas, Rads, Elec) - * An item may return false even if it protects against all six damage types. This is because it's not actually registered as hazmat correct. + * Does this item provide hazmat protection? (Protection against Frost, Heat, + * Bio, Gas, Rads, Elec) An item may return false even if it protects against + * all six damage types. This is because it's not actually registered as hazmat + * correct. + * * @param aStack - The item to check for protection * @return */ public static boolean providesProtection(ItemStack aStack) { return providesProtetion_Generic(sHazmatList, aStack); } + public static boolean providesProtetion_Frost(ItemStack aStack) { return providesProtetion_Generic(sFrostHazmatList, aStack); } + public static boolean providesProtetion_Fire(ItemStack aStack) { return providesProtetion_Generic(sHeatHazmatList, aStack); } + public static boolean providesProtetion_Biohazard(ItemStack aStack) { return providesProtetion_Generic(sBioHazmatList, aStack); } + public static boolean providesProtetion_Gas(ItemStack aStack) { return providesProtetion_Generic(sGasHazmatList, aStack); } + public static boolean providesProtetion_Radiation(ItemStack aStack) { return providesProtetion_Generic(sRadioHazmatList, aStack); } + public static boolean providesProtetion_Electricity(ItemStack aStack) { return providesProtetion_Generic(sElectroHazmatList, aStack); } @@ -256,39 +296,55 @@ public class HazmatUtils { } return aSet.getMap().containsKey(aStack); } - - - private static String[] getTooltips(GT_ItemStack aStack) { - AutoMap aTempTooltipData = mToolTips.get(aStack); + + private static String[] getTooltips(GT_ItemStack aStack) { + String aKey = convertGtItemstackToStringData(aStack); + AutoMap aTempTooltipData = mToolTips.get(aKey); if (aTempTooltipData == null) { - Logger.INFO("[Hazmat] Item was not mapped for TTs"); + Logger.INFO("[Hazmat] Item was not mapped for TTs - "+aKey); return new String[] {}; - } - else { + } else { Logger.INFO("[Hazmat] Item was mapped for TTs"); Collections.sort(aTempTooltipData); Logger.INFO("[Hazmat] Sorted TTs"); return aTempTooltipData.toArray(); } } - + private static void registerTooltip(GT_ItemStack aStack, String aTooltip) { - Logger.INFO("[Hazmat] Mapping "+aTooltip+" for "+getStackFromGtStack(aStack).getDisplayName()); - AutoMap aTempTooltipData = mToolTips.get(aStack); + String aKey = convertGtItemstackToStringData(aStack); + Logger.INFO("[Hazmat] Mapping " + aTooltip + " for " + aKey); + AutoMap aTempTooltipData = mToolTips.get(aKey); if (aTempTooltipData == null) { Logger.INFO("No data mapped yet, creating."); aTempTooltipData = new AutoMap(); } aTempTooltipData.add(aTooltip); - mToolTips.put(aStack, aTempTooltipData); + mToolTips.put(convertGtItemstackToStringData(aStack), aTempTooltipData); } - + public static ItemStack getStackFromGtStack(GT_ItemStack aGtStack) { return ItemUtils.simpleMetaStack(aGtStack.mItem, aGtStack.mMetaData, aGtStack.mStackSize); } - + public static GT_ItemStack getGtStackFromVanilla(ItemStack aStack) { return new GT_ItemStack(aStack); } + + private static String convertGtItemstackToStringData(GT_ItemStack aStack) { + if (aStack == null) { + return "NULL"; + } else { + return aStack.mItem.getUnlocalizedName() + "." + aStack.mMetaData + "." + aStack.mStackSize; + } + } + private static String convertGtItemstackToStringDataIgnoreDamage(GT_ItemStack aStack) { + if (aStack == null) { + return "NULL"; + } else { + return aStack.mItem.getUnlocalizedName() + "." + aStack.mStackSize; + } + } + } diff --git a/src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_Ores.java b/src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_Ores.java index 978deb1d25..0715f86e01 100644 --- a/src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_Ores.java +++ b/src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_Ores.java @@ -2,288 +2,77 @@ package gtPlusPlus.everglades.gen.gt; import java.util.Hashtable; -import net.minecraft.block.Block; - -import gregtech.api.enums.Materials; - -import gtPlusPlus.api.objects.data.Pair; import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.ORES; import gtPlusPlus.core.material.nuclear.FLUORIDES; -import gtPlusPlus.core.util.minecraft.MaterialUtils; -import gtPlusPlus.everglades.object.BoxedQuad; public class WorldGen_Ores { - - /** - * Set Ore Types on by one. - */ - public static volatile Pair Geikielite; // MgTiO3 - public static volatile Pair Zimbabweite; // (Na,K)2PbAs4(Nb,Ta,Ti)4O18 - public static volatile Pair Titanite; // CaTiSiO5 - public static volatile Pair Zirconolite; // CaZrTi2O7 - public static volatile Pair Crocoite; // PbCrO4 - public static volatile Pair Nichromite; // (Ni,Co,Fe)(Cr,Fe,Al)2O4 - public static volatile Pair Yttriaite; // Y2O3 - public static volatile Pair Samarskite_Y; // (YFe3+Fe2+U,Th,Ca)2(Nb,Ta)2O8 - public static volatile Pair Samarskite_Yb; // (YbFe3+)2(Nb,Ta)2O8 - public static volatile Pair Zircon; // ZrSiO4 - public static volatile Pair Gadolinite_Ce; // (Ce2,La,Nd,Y)2FeBe2Si1O14 - public static volatile Pair Gadolinite_Y; // (Ce,La,Nd,Y2)2FeBe2Si4O9 - public static volatile Pair Lepersonnite; // Ca(Gd,Dy)2(UO2)24(SiO4)4(CO3)8(OH)24·48H2O - public static volatile Pair Xenotime; // YPO4 - public static volatile Pair Yttrialite; // Y2Th2Si2O7 - public static volatile Pair Yttrocerite; // CaF5YCe - public static volatile Pair Polycrase; // YCaCeUThTi2Nb2Ta2O6 - public static volatile Pair Zircophyllite; // (K,Na)3(Mn,Fe)7(Zr,Ti,Nb)2Si8O24(OH,F)7 - public static volatile Pair Zirkelite; // (Ca,Th,Ce)Zr(Ti,Nb)2O7 - public static volatile Pair Lanthanite_La; // (La)2(CO3)3·8(H2O). - public static volatile Pair Lanthanite_Ce; // (Ce)2(CO3)3·8(H2O). - public static volatile Pair Lanthanite_Nd; // (Nd)2(CO3)3·8(H2O). - public static volatile Pair Hibonite; // ((Ca,Ce)(Al,Ti,Mg)12O19) - public static volatile Pair Cerite; // (Ce,La,Ca)9(Mg,Fe+3)(SiO4)6(SiO3OH)(OH)3 - public static volatile Pair Agardite_Y; // (YCa)Cu5(As2O4)3(OH)6·3H2O - public static volatile Pair Agardite_Cd; // (CdCa)Cu7(AsO2)4(O2H)5·3H2O - public static volatile Pair Agardite_La; // (LaCa)Cu5(AsO6)2(OH)4·3H2O - public static volatile Pair Agardite_Nd; // (NdCa)Cu6(As3O3)2(O2H)6·3H2O - public static volatile Pair Fluorcaphite; // (Ca,Sr,Ce,Na)5(PO4)3F - public static volatile Pair Florencite; // SmAl3(PO4)2(OH)6 - public static volatile Pair Cryolite; // Na3AlF6 - //public static volatile Pair Pyroxene; // - - - - - public static WorldGen_GT_Ore_Layer BaseVein = new WorldGen_GT_Ore_Layer( - "veinA", - 20, 40, - 1, - 8, - 128, - ELEMENT.getInstance().IRON, - ELEMENT.getInstance().IRON, - ELEMENT.getInstance().IRON, + public static WorldGen_GT_Ore_Layer BaseVein = new WorldGen_GT_Ore_Layer("veinA", 20, 40, 1, 1, 128, + ELEMENT.getInstance().IRON, ELEMENT.getInstance().IRON, ELEMENT.getInstance().IRON, ELEMENT.getInstance().IRON); - - - + /** * Custom ore Veins */ - - public static WorldGen_GT_Ore_Layer Vein1 = new WorldGen_GT_Ore_Layer( - "vein1", - 0, 60, - 30, - 16, - 16, - ORES.AGARDITE_CD, - ORES.AGARDITE_LA, - ORES.DEMICHELEITE_BR, - ORES.IRARSITE); - - public static WorldGen_GT_Ore_Layer Vein2 = new WorldGen_GT_Ore_Layer( - "vein2", - 0, 60, - 30, - 16, - 16, - ORES.AGARDITE_ND, - ORES.AGARDITE_Y, - ORES.KASHINITE, - ORES.CERITE); - public static WorldGen_GT_Ore_Layer Vein3 = new WorldGen_GT_Ore_Layer( - "vein3", - 0, 60, - 30, - 16, - 32, - ORES.CERITE, - ORES.NICHROMITE, - ORES.XENOTIME, - ORES.HIBONITE); + public static WorldGen_GT_Ore_Layer Vein1 = new WorldGen_GT_Ore_Layer("vein1", 0, 60, 30, 2, 16, ORES.AGARDITE_CD, + ORES.AGARDITE_LA, ORES.DEMICHELEITE_BR, ORES.IRARSITE); + + public static WorldGen_GT_Ore_Layer Vein2 = new WorldGen_GT_Ore_Layer("vein2", 0, 60, 30, 2, 16, ORES.AGARDITE_ND, + ORES.AGARDITE_Y, ORES.KASHINITE, ORES.CERITE); - public static WorldGen_GT_Ore_Layer Vein4 = new WorldGen_GT_Ore_Layer( - "vein4", - 0, 60, - 40, - 16, - 32, - ORES.GEIKIELITE, - ORES.CRYOLITE, - ORES.GADOLINITE_CE, - ORES.AGARDITE_ND); - - - - public static WorldGen_GT_Ore_Layer Vein5 = new WorldGen_GT_Ore_Layer( - "vein5", - 30, 128, - 20, - 8, - 48, - ORES.HIBONITE, - ORES.YTTRIALITE, - ORES.ZIRCONILITE, - ORES.CERITE); - public static WorldGen_GT_Ore_Layer Vein6 = new WorldGen_GT_Ore_Layer( - "vein6", - 0, 40, - 20, - 8, - 48, - ORES.XENOTIME, - ORES.ZIRKELITE, - ORES.CROCROITE, - ORES.IRARSITE); - public static WorldGen_GT_Ore_Layer Vein7 = new WorldGen_GT_Ore_Layer( - "vein7", - 40, 128, - 20, - 8, - 48, - ORES.HONEAITE, - ORES.MIESSIITE, - ORES.SAMARSKITE_Y, - ORES.SAMARSKITE_YB); - public static WorldGen_GT_Ore_Layer Vein8 = new WorldGen_GT_Ore_Layer( - "vein8", - 0, 40, - 20, - 8, - 48, - ORES.TITANITE, - ORES.ZIMBABWEITE, - ORES.ZIRCON, - ORES.FLORENCITE); - - - + public static WorldGen_GT_Ore_Layer Vein3 = new WorldGen_GT_Ore_Layer("vein3", 0, 60, 30, 3, 32, ORES.CERITE, + ORES.NICHROMITE, ORES.XENOTIME, ORES.HIBONITE); + + public static WorldGen_GT_Ore_Layer Vein4 = new WorldGen_GT_Ore_Layer("vein4", 0, 60, 40, 3, 32, ORES.GEIKIELITE, + ORES.CRYOLITE, ORES.GADOLINITE_CE, ORES.AGARDITE_ND); + + public static WorldGen_GT_Ore_Layer Vein5 = new WorldGen_GT_Ore_Layer("vein5", 30, 128, 20, 2, 48, ORES.HIBONITE, + ORES.YTTRIALITE, ORES.ZIRCONILITE, ORES.CERITE); + public static WorldGen_GT_Ore_Layer Vein6 = new WorldGen_GT_Ore_Layer("vein6", 0, 40, 20, 2, 48, ORES.XENOTIME, + ORES.ZIRKELITE, ORES.CROCROITE, ORES.IRARSITE); + public static WorldGen_GT_Ore_Layer Vein7 = new WorldGen_GT_Ore_Layer("vein7", 40, 128, 20, 2, 48, ORES.HONEAITE, + ORES.MIESSIITE, ORES.SAMARSKITE_Y, ORES.SAMARSKITE_YB); + public static WorldGen_GT_Ore_Layer Vein8 = new WorldGen_GT_Ore_Layer("vein8", 0, 40, 20, 2, 48, ORES.TITANITE, + ORES.ZIMBABWEITE, ORES.ZIRCON, ORES.FLORENCITE); + + public static WorldGen_GT_Ore_Layer Vein9 = new WorldGen_GT_Ore_Layer("vein9", 10, 30, 20, 1, 48, + ORES.LANTHANITE_CE, FLUORIDES.FLUORITE, ORES.LAFOSSAITE, ORES.FLORENCITE); + public static WorldGen_GT_Ore_Layer Vein10 = new WorldGen_GT_Ore_Layer("vein10", 20, 50, 20, 2, 32, ORES.GEIKIELITE, + ORES.YTTROCERITE, ORES.LANTHANITE_LA, ORES.RADIOBARITE); + public static WorldGen_GT_Ore_Layer Vein11 = new WorldGen_GT_Ore_Layer("vein11", 30, 70, 20, 1, 48, + FLUORIDES.FLUORITE, ORES.KASHINITE, ORES.ZIRCON, ORES.CRYOLITE); + public static WorldGen_GT_Ore_Layer Vein12 = new WorldGen_GT_Ore_Layer("vein12", 40, 80, 20, 3, 32, ORES.CERITE, + ORES.ALBURNITE, ORES.MIESSIITE, ORES.HIBONITE); - public static WorldGen_GT_Ore_Layer Vein9 = new WorldGen_GT_Ore_Layer( - "vein9", - 10, 30, - 20, - 4, - 48, - ORES.LANTHANITE_CE, - FLUORIDES.FLUORITE, - ORES.LAFOSSAITE, - ORES.FLORENCITE); - public static WorldGen_GT_Ore_Layer Vein10 = new WorldGen_GT_Ore_Layer( - "vein10", - 20, 50, - 20, - 8, - 32, - ORES.GEIKIELITE, - ORES.YTTROCERITE, - ORES.LANTHANITE_LA, - ORES.RADIOBARITE); - public static WorldGen_GT_Ore_Layer Vein11 = new WorldGen_GT_Ore_Layer( - "vein11", - 30, 70, - 20, - 5, - 48, - FLUORIDES.FLUORITE, - ORES.KASHINITE, - ORES.ZIRCON, - ORES.CRYOLITE); - public static WorldGen_GT_Ore_Layer Vein12 = new WorldGen_GT_Ore_Layer( - "vein12", - 40, 80, - 20, - 8, - 32, - ORES.CERITE, - ORES.ALBURNITE, - ORES.MIESSIITE, - ORES.HIBONITE); - /** * Best Rarest Veins 2017 */ - - public static WorldGen_GT_Ore_Layer Vein13 = new WorldGen_GT_Ore_Layer( - "vein13", - 5, 15, - 5, - 5, - 16, - ORES.CRYOLITE, - ORES.RADIOBARITE, - ORES.HONEAITE, - ORES.FLORENCITE); - public static WorldGen_GT_Ore_Layer Vein14 = new WorldGen_GT_Ore_Layer( - "vein14", - 10, 20, - 8, - 3, - 16, - ORES.DEMICHELEITE_BR, - ORES.PERROUDITE, - ORES.IRARSITE, - ORES.RADIOBARITE); + public static WorldGen_GT_Ore_Layer Vein13 = new WorldGen_GT_Ore_Layer("vein13", 5, 15, 5, 1, 16, ORES.CRYOLITE, + ORES.RADIOBARITE, ORES.HONEAITE, ORES.FLORENCITE); + + public static WorldGen_GT_Ore_Layer Vein14 = new WorldGen_GT_Ore_Layer("vein14", 10, 20, 8, 2, 16, + ORES.DEMICHELEITE_BR, ORES.PERROUDITE, ORES.IRARSITE, ORES.RADIOBARITE); - public static WorldGen_GT_Ore_Layer Vein15 = new WorldGen_GT_Ore_Layer( - "vein15", - 5, 25, - 5, - 6, - 24, - ORES.FLUORCAPHITE, - ORES.LAFOSSAITE, - ORES.GADOLINITE_CE, - ORES.GADOLINITE_Y); + public static WorldGen_GT_Ore_Layer Vein15 = new WorldGen_GT_Ore_Layer("vein15", 5, 25, 5, 3, 24, ORES.FLUORCAPHITE, + ORES.LAFOSSAITE, ORES.GADOLINITE_CE, ORES.GADOLINITE_Y); + + public static WorldGen_GT_Ore_Layer Vein16 = new WorldGen_GT_Ore_Layer("vein16", 0, 25, 4, 2, 32, ORES.YTTROCERITE, + ORES.LEPERSONNITE, ORES.LAUTARITE, FLUORIDES.FLUORITE); + + public static WorldGen_GT_Ore_Layer Vein17 = new WorldGen_GT_Ore_Layer("vein17", 10, 35, 4, 1, 32, ORES.FLORENCITE, + ORES.LAUTARITE, ORES.SAMARSKITE_YB, ORES.POLYCRASE); + public static WorldGen_GT_Ore_Layer Vein18 = new WorldGen_GT_Ore_Layer("vein18", 15, 40, 4, 1, 48, + ORES.GADOLINITE_CE, ORES.GADOLINITE_Y, ORES.AGARDITE_LA, ORES.AGARDITE_CD); - public static WorldGen_GT_Ore_Layer Vein16 = new WorldGen_GT_Ore_Layer( - "vein16", - 0, 25, - 4, - 6, - 32, - ORES.YTTROCERITE, - ORES.LEPERSONNITE, - ORES.LAUTARITE, - FLUORIDES.FLUORITE); - - public static WorldGen_GT_Ore_Layer Vein17 = new WorldGen_GT_Ore_Layer( - "vein17", - 10, 35, - 4, - 5, - 32, - ORES.FLORENCITE, - ORES.LAUTARITE, - ORES.SAMARSKITE_YB, - ORES.POLYCRASE); - public static WorldGen_GT_Ore_Layer Vein18 = new WorldGen_GT_Ore_Layer( - "vein18", - 15, 40, - 4, - 4, - 48, - ORES.GADOLINITE_CE, - ORES.GADOLINITE_Y, - ORES.AGARDITE_LA, - ORES.AGARDITE_CD); - - - - public static Hashtable validOreveins = new Hashtable( 1024); - - public static volatile BoxedQuad OreVein1 = new BoxedQuad(null, null, null, null); - static long ID = 0; - public static void generateValidOreVeins(){ + + public static void generateValidOreVeins() { validOreveins.put(ID++, BaseVein); validOreveins.put(ID++, Vein1); validOreveins.put(ID++, Vein2); @@ -304,5 +93,5 @@ public class WorldGen_Ores { validOreveins.put(ID++, Vein17); validOreveins.put(ID++, Vein18); } - + } diff --git a/src/resources/assets/gregtech/lang/en_US.lang b/src/resources/assets/gregtech/lang/en_US.lang index ffbb3d8a7a..a9bfa8993d 100644 --- a/src/resources/assets/gregtech/lang/en_US.lang +++ b/src/resources/assets/gregtech/lang/en_US.lang @@ -46,7 +46,11 @@ GTPP.nanohealer.tooltip.4=WILL NOT PREVENT DEATH GTPP.nanohealer.tooltip.5=Shift+RMB to toggle notifications GTPP.nanohealer.hidden=Hiding Info? - +//10/4/19 +//Tooltips for the Mob Killing Baubles +GTPP.monsterkiller.tooltip.1=Worn as an Amulet within Baubles +GTPP.monsterkiller.tooltip.2=Drains +GTPP.monsterkiller.tooltip.3=to kill -- cgit From 144cd9c09a2dab9461a61b8bfe4d5f4165030e54 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Wed, 17 Apr 2019 11:33:21 +1000 Subject: + Added new sifting recipe for Rare Earth, allowing more lanthanides to be obtained. - Removed Rare Earth centrifuge recipe. $ Corrected the spelling of Aluminium and Caesium. --- src/Java/gtPlusPlus/core/material/ELEMENT.java | 4 ++-- .../gtPlusPlus/core/recipe/RECIPES_GREGTECH.java | 15 +++++++++++++++ .../machines/TileEntityAdvPooCollector.java | 12 +++++------- src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java | 2 ++ .../xmod/gregtech/recipes/RecipesToRemove.java | 22 ++++++++++++++++++++++ 5 files changed, 46 insertions(+), 9 deletions(-) create mode 100644 src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java (limited to 'src/Java/gtPlusPlus/core/material') diff --git a/src/Java/gtPlusPlus/core/material/ELEMENT.java b/src/Java/gtPlusPlus/core/material/ELEMENT.java index 9727ccbed5..d1b7c01e0a 100644 --- a/src/Java/gtPlusPlus/core/material/ELEMENT.java +++ b/src/Java/gtPlusPlus/core/material/ELEMENT.java @@ -11,7 +11,7 @@ import gtPlusPlus.core.util.minecraft.MaterialUtils; public final class ELEMENT { - public static final String[] NAMES = new String[]{"Hydrogen", "Helium", "Lithium", "Beryllium", "Boron", "Carbon", "Nitrogen", "Oxygen", "Fluorine", "Neon", "Sodium", "Magnesium", "Aluminum", "Silicon", "Phosphorus", "Sulfur", "Chlorine", "Argon", "Potassium", "Calcium", "Scandium", "Titanium", "Vanadium", "Chromium", "Manganese", "Iron", "Cobalt", "Nickel", "Copper", "Zinc", "Gallium", "Germanium", "Arsenic", "Selenium", "Bromine", "Krypton", "Rubidium", "Strontium", "Yttrium", "Zirconium", "Niobium", "Molybdenum", "Technetium", "Ruthenium", "Rhodium", "Palladium", "Silver", "Cadmium", "Indium", "Tin", "Antimony", "Tellurium", "Iodine", "Xenon", "Cesium", "Barium", "Lanthanum", "Cerium", "Praseodymium", "Neodymium", "Promethium", "Samarium", "Europium", "Gadolinium", "Terbium", "Dysprosium", "Holmium", "Erbium", "Thulium", "Ytterbium", "Lutetium", "Hafnium", "Tantalum", "Tungsten", "Rhenium", "Osmium", "Iridium", "Platinum", "Gold", "Mercury", "Thallium", "Lead", "Bismuth", "Polonium", "Astatine", "Radon", "Francium", "Radium", "Actinium", "Thorium", "Protactinium", "Uranium", "Neptunium", "Plutonium", "Americium", "Curium", "Berkelium", "Californium", "Einsteinium", "Fermium", "Mendelevium", "Nobelium", "Lawrencium", "Rutherfordium", "Dubnium", "Seaborgium", "Bohrium", "Hassium", "Meitnerium", "Darmstadtium", "Roentgenium", "Copernicium", "Nihonium", "Flerovium", "Moscovium", "Livermorium", "Tennessine", "Oganesson"}; + public static final String[] NAMES = new String[]{"Hydrogen", "Helium", "Lithium", "Beryllium", "Boron", "Carbon", "Nitrogen", "Oxygen", "Fluorine", "Neon", "Sodium", "Magnesium", "Aluminium", "Silicon", "Phosphorus", "Sulfur", "Chlorine", "Argon", "Potassium", "Calcium", "Scandium", "Titanium", "Vanadium", "Chromium", "Manganese", "Iron", "Cobalt", "Nickel", "Copper", "Zinc", "Gallium", "Germanium", "Arsenic", "Selenium", "Bromine", "Krypton", "Rubidium", "Strontium", "Yttrium", "Zirconium", "Niobium", "Molybdenum", "Technetium", "Ruthenium", "Rhodium", "Palladium", "Silver", "Cadmium", "Indium", "Tin", "Antimony", "Tellurium", "Iodine", "Xenon", "Caesium", "Barium", "Lanthanum", "Cerium", "Praseodymium", "Neodymium", "Promethium", "Samarium", "Europium", "Gadolinium", "Terbium", "Dysprosium", "Holmium", "Erbium", "Thulium", "Ytterbium", "Lutetium", "Hafnium", "Tantalum", "Tungsten", "Rhenium", "Osmium", "Iridium", "Platinum", "Gold", "Mercury", "Thallium", "Lead", "Bismuth", "Polonium", "Astatine", "Radon", "Francium", "Radium", "Actinium", "Thorium", "Protactinium", "Uranium", "Neptunium", "Plutonium", "Americium", "Curium", "Berkelium", "Californium", "Einsteinium", "Fermium", "Mendelevium", "Nobelium", "Lawrencium", "Rutherfordium", "Dubnium", "Seaborgium", "Bohrium", "Hassium", "Meitnerium", "Darmstadtium", "Roentgenium", "Copernicium", "Nihonium", "Flerovium", "Moscovium", "Livermorium", "Tennessine", "Oganesson"}; //First 50 Elements public final Material HYDROGEN = MaterialUtils.generateMaterialFromGtENUM(Materials.Hydrogen); @@ -68,7 +68,7 @@ public final class ELEMENT { public final Material TELLURIUM = new Material("Tellurium", MaterialState.SOLID, new short[]{210, 210, 210}, 449, 989, 52, 76, false, "Te", 0);//Not a GT Inherited Material public final Material IODINE = new Material("Iodine", MaterialState.SOLID, TextureSet.SET_SHINY, new short[]{96, 96, 96}, 114, 184, 53, 74, false, "I", 0);//Not a GT Inherited Material public final Material XENON = new Material("Xenon", MaterialState.GAS, new short[]{255, 255, 255}, -111, -108, 54, 77, false, "Xe", 0);//Not a GT Inherited Material - public final Material CESIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Caesium); + public final Material CAESIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Caesium); public final Material BARIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Barium); public final Material LANTHANUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Lanthanum); public final Material CERIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Cerium); diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java index a4dc366aee..68f7bdd762 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java @@ -2127,6 +2127,21 @@ public class RECIPES_GREGTECH { private static void sifterRecipes() { + // Rare Earth Processing + GT_Values.RA.addSifterRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustRareEarth", 1), + new ItemStack[] { + ELEMENT.getInstance().YTTRIUM.getSmallDust(1), + ELEMENT.getInstance().NEODYMIUM.getSmallDust(1), + ELEMENT.getInstance().LANTHANUM.getSmallDust(1), + ELEMENT.getInstance().CERIUM.getSmallDust(1), + ELEMENT.getInstance().CADMIUM.getSmallDust(1), + ELEMENT.getInstance().CAESIUM.getSmallDust(1), + ELEMENT.getInstance().YTTERBIUM.getTinyDust(1), + ELEMENT.getInstance().SAMARIUM.getTinyDust(1), + ELEMENT.getInstance().GADOLINIUM.getTinyDust(1) + }, + new int[] { 2000, 2000, 2000, 2000, 2000, 2000, 1000, 1000, 1000 }, 20 * 30, 500); + // Zirconium GT_Values.RA.addSifterRecipe(ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedIlmenite", 1), new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustIron", 1), diff --git a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityAdvPooCollector.java b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityAdvPooCollector.java index 18954f12b6..6bb4c932dc 100644 --- a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityAdvPooCollector.java +++ b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityAdvPooCollector.java @@ -1,6 +1,5 @@ package gtPlusPlus.core.tileentities.machines; -import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.data.AutoMap; import gtPlusPlus.core.item.chemistry.AgriculturalChem; import gtPlusPlus.core.util.math.MathUtils; @@ -15,7 +14,6 @@ import net.minecraft.entity.passive.EntitySheep; import net.minecraft.entity.passive.EntityVillager; import net.minecraft.entity.passive.IAnimals; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; @@ -132,17 +130,17 @@ public class TileEntityAdvPooCollector extends TileEntityBaseFluidCollector { } @Override - public Item itemToSpawnInWorldIfTankIsFull() { + public ItemStack itemToSpawnInWorldIfTankIsFull() { int a = MathUtils.randInt(0, 75); - Item aItem = null; + ItemStack aItem = null; if (a <= 30) { - aItem = AgriculturalChem.dustDirt; + aItem = ItemUtils.getSimpleStack(AgriculturalChem.dustDirt); } else if (a <= 40) { - aItem = ItemUtils.getItemStackOfAmountFromOreDict("dustManureByproducts", 1).getItem(); + aItem = ItemUtils.getItemStackOfAmountFromOreDict("dustManureByproducts", 1); } else if (a <= 55) { - aItem = ItemUtils.getItemStackOfAmountFromOreDict("dustSmallManureByproducts", 1).getItem(); + aItem = ItemUtils.getItemStackOfAmountFromOreDict("dustSmallManureByproducts", 1); } return aItem; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java b/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java index 6edc47badf..34c2b9ad03 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java @@ -32,6 +32,7 @@ import gtPlusPlus.xmod.gregtech.common.StaticFields59; import gtPlusPlus.xmod.gregtech.common.blocks.fluid.GregtechFluidHandler; import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; import gtPlusPlus.xmod.gregtech.loaders.*; +import gtPlusPlus.xmod.gregtech.recipes.RecipesToRemove; import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechConduits; import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechNitroDieselFix; import net.minecraft.item.Item; @@ -110,6 +111,7 @@ public class HANDLER_GT { public static void onLoadComplete(FMLLoadCompleteEvent event) { removeCrudeTurbineRotors(); cleanAssemblyLineRecipeMap(); + RecipesToRemove.go(); } private static int removeCrudeTurbineRotors() { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java new file mode 100644 index 0000000000..5fae1e0b52 --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java @@ -0,0 +1,22 @@ +package gtPlusPlus.xmod.gregtech.recipes; + +import gregtech.api.util.GT_Recipe; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class RecipesToRemove { + + public static void go() { + + //Remove Rare Earth Centrifuging + //1 Rare Earth Dust - 25% chance for small piles of: neodymium, yttrium, lanthanum, cerium, cadmium, and caesium + //Replaced by advanced sifting recipe. + GT_Recipe aRareEarthCentrifuging = GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.findRecipe(null, false, 20, new FluidStack[] {}, new ItemStack[] {ItemUtils.getItemStackOfAmountFromOreDict("dustRareEarth", 1)}); + if (aRareEarthCentrifuging != null && aRareEarthCentrifuging.mEnabled) { + GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.remove(null); + } + + } + +} -- cgit From 94581e97e32bd7ecb0b4adefe6b03b6752f091a7 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Wed, 17 Apr 2019 12:52:02 +1000 Subject: % Reverted Pikyonium Alloy component Yttrium -> Ytterbium. $ Better handling of Rare Earth processing removal. Closes #455. --- src/Java/gtPlusPlus/core/material/ALLOY.java | 2 +- .../xmod/gregtech/recipes/RecipesToRemove.java | 26 +++++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) (limited to 'src/Java/gtPlusPlus/core/material') diff --git a/src/Java/gtPlusPlus/core/material/ALLOY.java b/src/Java/gtPlusPlus/core/material/ALLOY.java index 8bcbb2a051..d2639a220f 100644 --- a/src/Java/gtPlusPlus/core/material/ALLOY.java +++ b/src/Java/gtPlusPlus/core/material/ALLOY.java @@ -787,7 +787,7 @@ public final class ALLOY { new MaterialStack(ELEMENT.getInstance().CERIUM, 6), new MaterialStack(ELEMENT.getInstance().ANTIMONY, 4), new MaterialStack(ELEMENT.getInstance().PLATINUM, 4), - new MaterialStack(ELEMENT.getInstance().YTTRIUM, 2), + new MaterialStack(ELEMENT.getInstance().YTTERBIUM, 2), new MaterialStack(ALLOY.TUNGSTENSTEEL, 8) }); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java index 5fae1e0b52..06373c9e1d 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java @@ -1,6 +1,10 @@ package gtPlusPlus.xmod.gregtech.recipes; +import gregtech.api.enums.Materials; import gregtech.api.util.GT_Recipe; +import gregtech.api.util.Recipe_GT; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.material.ELEMENT; import gtPlusPlus.core.util.minecraft.ItemUtils; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; @@ -9,12 +13,32 @@ public class RecipesToRemove { public static void go() { + Logger.INFO("Processing Gregtech recipe maps, removing recipes to suit GT++."); + //Remove Rare Earth Centrifuging //1 Rare Earth Dust - 25% chance for small piles of: neodymium, yttrium, lanthanum, cerium, cadmium, and caesium //Replaced by advanced sifting recipe. GT_Recipe aRareEarthCentrifuging = GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.findRecipe(null, false, 20, new FluidStack[] {}, new ItemStack[] {ItemUtils.getItemStackOfAmountFromOreDict("dustRareEarth", 1)}); if (aRareEarthCentrifuging != null && aRareEarthCentrifuging.mEnabled) { - GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.remove(null); + aRareEarthCentrifuging.mEnabled = false; + aRareEarthCentrifuging.mHidden = true; + GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.remove(aRareEarthCentrifuging); + Recipe_GT.GT_Recipe_Map_LargeCentrifuge.sMultiblockCentrifugeRecipes.mRecipeList.remove(aRareEarthCentrifuging); + Recipe_GT.GT_Recipe_Map_LargeCentrifuge.sMultiblockCentrifugeRecipes_GT.mRecipeList.remove(aRareEarthCentrifuging); + Logger.INFO("Removed vanilla GT Rare Earth processing."); + //Set the Chemical Symbol for Rare Earth now that we are giving it custom outputs + //Best not to set this unless the original recipe is removed. + Materials.RareEarth.mChemicalFormula = "(" + +ELEMENT.getInstance().YTTRIUM.vChemicalSymbol + +ELEMENT.getInstance().NEODYMIUM.vChemicalSymbol + +ELEMENT.getInstance().LANTHANUM.vChemicalSymbol + +ELEMENT.getInstance().CERIUM.vChemicalSymbol + +ELEMENT.getInstance().CADMIUM.vChemicalSymbol + +ELEMENT.getInstance().CAESIUM.vChemicalSymbol + +ELEMENT.getInstance().YTTERBIUM.vChemicalSymbol + +ELEMENT.getInstance().SAMARIUM.vChemicalSymbol + +ELEMENT.getInstance().GADOLINIUM.vChemicalSymbol+ + ")"; } } -- cgit From 99da62fca32fa4c6346b2cea119488d7bbf65955 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Wed, 17 Apr 2019 13:57:35 +1000 Subject: % Updated Locale. % Adjusted names of three Materials slightly. $ Fixed Multiblocks not consuming inputs by reverting logic back to a previous state. $ Fixed Multiblocks not respecting Control Cores correctly when present. $ Fixed Multiblocks handling of recipes which require boosted outputs. $ Fixed Animation of Large Centrifuges. (Mostly) --- src/Java/gtPlusPlus/core/material/ELEMENT.java | 8 +- .../base/GregtechMeta_MultiBlockBase.java | 481 ++++++++++++--------- .../textures/TexturesCentrifugeMultiblock.java | 122 ++---- ...regtechMetaTileEntity_IndustrialCentrifuge.java | 29 +- src/resources/assets/miscutils/lang/en_US.lang | 105 ++++- 5 files changed, 449 insertions(+), 296 deletions(-) (limited to 'src/Java/gtPlusPlus/core/material') diff --git a/src/Java/gtPlusPlus/core/material/ELEMENT.java b/src/Java/gtPlusPlus/core/material/ELEMENT.java index d1b7c01e0a..e972992391 100644 --- a/src/Java/gtPlusPlus/core/material/ELEMENT.java +++ b/src/Java/gtPlusPlus/core/material/ELEMENT.java @@ -216,11 +216,11 @@ public final class ELEMENT { //Runescape materials - public static final Material BLACK_METAL = new Material("Black", MaterialState.SOLID, TextureSet.SET_METALLIC, new short[] {5, 5, 5}, 2350, 4650, 24, 17, false, "҈", 0, new MaterialStack[]{new MaterialStack(getInstance().LEAD, 15), new MaterialStack(getInstance().TUNGSTEN, 25), new MaterialStack(getInstance().CARBON, 60)});//Not a GT Inherited Material - public static final Material WHITE_METAL = new Material("White", MaterialState.SOLID, TextureSet.SET_METALLIC, new short[] {255, 255, 255}, 4560, 7580, 35, 41, false, "҉", 0, new MaterialStack[]{new MaterialStack(getInstance().COPPER, 5), new MaterialStack(getInstance().ANTIMONY, 10), new MaterialStack(getInstance().PLATINUM, 10), new MaterialStack(getInstance().TIN, 75)});//Not a GT Inherited Material - public static final Material GRANITE = new Material("Ancient Granite", MaterialState.SOLID, TextureSet.SET_SAND, new short[] {107, 107, 107}, 500, 2000, 16, 12, false, "«»", 0);//Not a GT Inherited Material + public static final Material BLACK_METAL = new Material("Black Metal", MaterialState.SOLID, TextureSet.SET_METALLIC, new short[] {5, 5, 5}, 2350, 4650, 24, 17, false, "҈", 0, new MaterialStack[]{new MaterialStack(getInstance().LEAD, 15), new MaterialStack(getInstance().TUNGSTEN, 25), new MaterialStack(getInstance().CARBON, 60)});//Not a GT Inherited Material + public static final Material WHITE_METAL = new Material("White Metal", MaterialState.SOLID, TextureSet.SET_METALLIC, new short[] {255, 255, 255}, 4560, 7580, 35, 41, false, "҉", 0, new MaterialStack[]{new MaterialStack(getInstance().COPPER, 5), new MaterialStack(getInstance().ANTIMONY, 10), new MaterialStack(getInstance().PLATINUM, 10), new MaterialStack(getInstance().TIN, 75)});//Not a GT Inherited Material + public static final Material GRANITE = new Material("Ancient Granite", MaterialState.SOLID, TextureSet.SET_SAND, new short[] {107, 107, 107}, 500, 2000, 16, 12, false, "«»", 0, false);//Not a GT Inherited Material public static final Material RUNITE = new Material("Runite", MaterialState.SOLID, TextureSet.SET_FINE, new short[] {60, 200, 190}, 6750, 11550, 73, 87, true, "§", 0);//Not a GT Inherited Material - public static final Material DRAGON_METAL = new Material("Dragon", MaterialState.SOLID, TextureSet.SET_SHINY, new short[] {220, 40, 20, 2}, 10160, 17850, 96, 105, true, "۞", 0);//Not a GT Inherited Material + public static final Material DRAGON_METAL = new Material("Dragonblood", MaterialState.SOLID, TextureSet.SET_SHINY, new short[] {220, 40, 20, 2}, 10160, 17850, 96, 105, true, "۞", 0);//Not a GT Inherited Material } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index 11eaf05535..516f78038d 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -273,7 +273,7 @@ GT_MetaTileEntity_MultiBlockBase { public final static String TAG_HIDE_HATCHES = "TAG_HIDE_HATCHES"; public final static String TAG_HIDE_POLLUTION = "TAG_HIDE_POLLUTION"; public final static String TAG_HIDE_MACHINE_TYPE = "TAG_HIDE_MACHINE_TYPE"; - + @Override public final String[] getDescription() { /*if (aCachedToolTip != null) { @@ -291,13 +291,13 @@ GT_MetaTileEntity_MultiBlockBase { aCachedToolTip = null; } }*/ - + String aRequiresMuffler = "1x Muffler Hatch"; String aRequiresCoreModule = "1x Core Module"; String aRequiresMaint = "1x Maintanence Hatch"; - + String[] x = getTooltip(); - + //Filter List, toggle switches, rebuild map without flags boolean showHatches = true; boolean showMachineType = true; @@ -323,8 +323,8 @@ GT_MetaTileEntity_MultiBlockBase { for (int ee = 0; ee < x.length; ee++) { x[ee] = aTempMap.get(ee); } - - + + //Assemble ordered map for misc tooltips AutoMap aOrderedMap = new AutoMap(); if (showHatches) { @@ -338,15 +338,15 @@ GT_MetaTileEntity_MultiBlockBase { if (showMachineType) { aOrderedMap.put(getMachineTooltip()); } - + if (showPollution) { aOrderedMap.put(getPollutionTooltip()); } - - - - - + + + + + //Add Stock Tooltip to bottom of list String[] z; z = new String[aOrderedMap.size()]; @@ -476,62 +476,6 @@ GT_MetaTileEntity_MultiBlockBase { } return true; } - - private int boostOutput(int aAmount) { - if (aAmount <= 0) { - return 10000; - } - if (aAmount <= 250) { - aAmount += MathUtils.randInt(Math.max(aAmount/2, 1), aAmount*2); - } - else if (aAmount <= 500) { - aAmount += MathUtils.randInt(Math.max(aAmount/2, 1), aAmount*2); - } - else if (aAmount <= 750) { - aAmount += MathUtils.randInt(Math.max(aAmount/2, 1), aAmount*2); - } - else if (aAmount <= 1000) { - aAmount = (aAmount*2); - } - else if (aAmount <= 1500) { - aAmount = (aAmount*2); - } - else if (aAmount <= 2000) { - aAmount = (int) (aAmount*1.5); - } - else if (aAmount <= 3000) { - aAmount = (int) (aAmount*1.5); - } - else if (aAmount <= 4000) { - aAmount = (int) (aAmount*1.2); - } - else if (aAmount <= 5000) { - aAmount = (int) (aAmount*1.2); - } - else if (aAmount <= 7000) { - aAmount = (int) (aAmount*1.2); - } - else if (aAmount <= 9000) { - aAmount = (int) (aAmount*1.1); - } - return Math.min(10000, aAmount); - } - - public GT_Recipe generateAdditionalOutputForRecipe(GT_Recipe aRecipe) { - AutoMap aNewChances = new AutoMap(); - for (int chance : aRecipe.mChances) { - aNewChances.put(boostOutput(chance)); - } - GT_Recipe aClone = aRecipe.copy(); - int[] aTemp = new int[aNewChances.size()]; - int slot = 0; - for (int g : aNewChances) { - aTemp[slot] = g; - slot++; - } - aClone.mChances = aTemp; - return aClone; - } /** * A Static {@link Method} object which holds the current status of logging. @@ -539,23 +483,16 @@ GT_MetaTileEntity_MultiBlockBase { public static Method aLogger = null; public void log(String s) { + boolean isDebugLogging = CORE.DEBUG; boolean reset = true; - - if (!isDebugLogging) { - return; - } - + if (aLogger == null || reset) { if (isDebugLogging) { - try { - aLogger = Logger.class.getMethod("INFO", String.class); - } catch (NoSuchMethodException | SecurityException e) {} + aLogger = ReflectionUtils.getMethod(Logger.class, "INFO", String.class); } else { - try { - aLogger = Logger.class.getMethod("MACHINE_INFO", String.class); - } catch (NoSuchMethodException | SecurityException e) {} + aLogger = ReflectionUtils.getMethod(Logger.class, "MACHINE_INFO", String.class); } } try { @@ -606,38 +543,195 @@ GT_MetaTileEntity_MultiBlockBase { ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes, int aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe) { + // Based on the Processing Array. A bit overkill, but very flexible. + + + if (this.doesMachineBoostOutput()) { + log("Boosting."); + return checkRecipeBoostedOutputs(aItemInputs, aFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, aRecipe); + } + + //Control Core to control the Multiblocks behaviour. + int aControlCoreTier = getControlCoreTier(); + + //If no core, return false; + if (aControlCoreTier > 0) { + log("Control core found."); + } + + + // Reset outputs and progress stats + this.mEUt = 0; + this.mMaxProgresstime = 0; + this.mOutputItems = new ItemStack[]{}; + this.mOutputFluids = new FluidStack[]{}; + long tVoltage = getMaxInputVoltage(); byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + log("Running checkRecipeGeneric(0)"); + + //Check to see if Voltage Tier > Control Core Tier + if (tTier > aControlCoreTier) { + log("Control core found is lower tier than power tier. OK"); + tTier = (byte) aControlCoreTier; + } + GT_Recipe tRecipe = aRecipe != null ? aRecipe : findRecipe( getBaseMetaTileEntity(), mLastRecipe, false, gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); + log("Running checkRecipeGeneric(1)"); + // Remember last recipe - an optimization for findRecipe() + this.mLastRecipe = tRecipe; + if (tRecipe == null) { log("BAD RETURN - 1"); return false; } - - //Boost output if machine implements this strategy - if (doesMachineBoostOutput()) { - return checkRecipeBoostedOutputs(aItemInputs, aFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, tRecipe); - } - else { - return checkRecipeGeneric(tRecipe, aSpeedBonusPercent, aOutputChanceRoll); + + if (!this.canBufferOutputs(tRecipe, aMaxParallelRecipes)) { + log("BAD RETURN - 2"); + return false; } - + + // EU discount + float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; + float tTotalEUt = 0.0f; + + int parallelRecipes = 0; + + log("parallelRecipes: "+parallelRecipes); + log("aMaxParallelRecipes: "+aMaxParallelRecipes); + log("tTotalEUt: "+tTotalEUt); + log("tVoltage: "+tVoltage); + log("tRecipeEUt: "+tRecipeEUt); + // Count recipes to do in parallel, consuming input items and fluids and considering input voltage limits + for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (tVoltage - tRecipeEUt); parallelRecipes++) { + if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) { + log("Broke at "+parallelRecipes+"."); + break; + } + log("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); + tTotalEUt += tRecipeEUt; + } + + if (parallelRecipes == 0) { + log("BAD RETURN - 3"); + return false; + } + + // -- Try not to fail after this point - inputs have already been consumed! -- + + + // Convert speed bonus to duration multiplier + // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. + aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); + float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); + this.mMaxProgresstime = (int)(tRecipe.mDuration * tTimeFactor); + + this.mEUt = (int)Math.ceil(tTotalEUt); + + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + + // Overclock + if (this.mEUt <= 16) { + this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); + } else { + while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.mEUt *= 4; + this.mMaxProgresstime /= 2; + } + } + + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + + // Collect fluid outputs + FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length]; + for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) { + if (tRecipe.getFluidOutput(h) != null) { + tOutputFluids[h] = tRecipe.getFluidOutput(h).copy(); + tOutputFluids[h].amount *= parallelRecipes; + } + } + + // Collect output item types + ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length]; + for (int h = 0; h < tRecipe.mOutputs.length; h++) { + if (tRecipe.getOutput(h) != null) { + tOutputItems[h] = tRecipe.getOutput(h).copy(); + tOutputItems[h].stackSize = 0; + } + } + + // Set output item stack sizes (taking output chance into account) + for (int f = 0; f < tOutputItems.length; f++) { + if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) { + for (int g = 0; g < parallelRecipes; g++) { + if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f)) + tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize; + } + } + } + + tOutputItems = removeNulls(tOutputItems); + + // Sanitize item stack size, splitting any stacks greater than max stack size + List splitStacks = new ArrayList(); + for (ItemStack tItem : tOutputItems) { + while (tItem.getMaxStackSize() < tItem.stackSize) { + ItemStack tmp = tItem.copy(); + tmp.stackSize = tmp.getMaxStackSize(); + tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize(); + splitStacks.add(tmp); + } + } + + if (splitStacks.size() > 0) { + ItemStack[] tmp = new ItemStack[splitStacks.size()]; + tmp = splitStacks.toArray(tmp); + tOutputItems = ArrayUtils.addAll(tOutputItems, tmp); + } + + // Strip empty stacks + List tSList = new ArrayList(); + for (ItemStack tS : tOutputItems) { + if (tS.stackSize > 0) tSList.add(tS); + } + tOutputItems = tSList.toArray(new ItemStack[tSList.size()]); + + // Commit outputs + this.mOutputItems = tOutputItems; + this.mOutputFluids = tOutputFluids; + updateSlots(); + + // Play sounds (GT++ addition - GT multiblocks play no sounds) + startProcess(); + + log("GOOD RETURN - 1"); + return true; } - + + + + + /* * Here we handle recipe boosting, which grants additional output %'s to recipes that do not have 100%. */ - + private boolean mHasBoostedCurrentRecipe = false; private GT_Recipe mBoostedRecipe = null; private ItemStack[] mInputVerificationForBoosting = null; - + /** * Does this machine boost it's output? * @return - if true, gives additional % to output chances. @@ -646,6 +740,65 @@ GT_MetaTileEntity_MultiBlockBase { return false; } + + + private int boostOutput(int aAmount) { + if (aAmount <= 0) { + return 10000; + } + if (aAmount <= 250) { + aAmount += MathUtils.randInt(Math.max(aAmount/2, 1), aAmount*2); + } + else if (aAmount <= 500) { + aAmount += MathUtils.randInt(Math.max(aAmount/2, 1), aAmount*2); + } + else if (aAmount <= 750) { + aAmount += MathUtils.randInt(Math.max(aAmount/2, 1), aAmount*2); + } + else if (aAmount <= 1000) { + aAmount = (aAmount*2); + } + else if (aAmount <= 1500) { + aAmount = (aAmount*2); + } + else if (aAmount <= 2000) { + aAmount = (int) (aAmount*1.5); + } + else if (aAmount <= 3000) { + aAmount = (int) (aAmount*1.5); + } + else if (aAmount <= 4000) { + aAmount = (int) (aAmount*1.2); + } + else if (aAmount <= 5000) { + aAmount = (int) (aAmount*1.2); + } + else if (aAmount <= 7000) { + aAmount = (int) (aAmount*1.2); + } + else if (aAmount <= 9000) { + aAmount = (int) (aAmount*1.1); + } + return Math.min(10000, aAmount); + } + + public GT_Recipe generateAdditionalOutputForRecipe(GT_Recipe aRecipe) { + AutoMap aNewChances = new AutoMap(); + for (int chance : aRecipe.mChances) { + aNewChances.put(boostOutput(chance)); + } + GT_Recipe aClone = aRecipe.copy(); + int[] aTemp = new int[aNewChances.size()]; + int slot = 0; + for (int g : aNewChances) { + aTemp[slot] = g; + slot++; + } + aClone.mChances = aTemp; + return aClone; + } + + /** * Processes recipes but provides a bonus to the output % of items if they are < 100%. * @@ -740,67 +893,6 @@ GT_MetaTileEntity_MultiBlockBase { // Remember last recipe - an optimization for findRecipe() this.mLastRecipe = tRecipe; - if (tRecipe == null) { - log("BAD RETURN - 1"); - return false; - } - - // -- Try not to fail after this point - inputs have already been consumed! -- - return checkRecipeGeneric(tRecipe, aSpeedBonusPercent, aOutputChanceRoll); - } - - - /** - * Directly processes a recipe from a non-generic recipe handler - * @param aRecipe - A pre-modified GT_Recipe - * @return - Did we process? - */ - public boolean checkRecipeGeneric(GT_Recipe tRecipe, int rSpeedBonus, int aMaxOutputChance) { - // Based on the Processing Array. A bit overkill, but very flexible. - - if (tRecipe == null) { - return false; - } - - - ItemStack[] aItemInputs = tRecipe.mInputs; - FluidStack[] aFluidInputs = tRecipe.mFluidInputs; - int aMaxParallelRecipes = getMaxParallelRecipes(); - int aEUPercent = this.getEuDiscountForParallelism(); - int aSpeedBonusPercent = rSpeedBonus; - int aOutputChanceRoll = aMaxOutputChance; - - - - //Control Core to control the Multiblocks behaviour. - int aControlCoreTier = getControlCoreTier(); - - //If no core, return false; - if (aControlCoreTier == 0 && requireControlCores) { - log("No control core found."); - return false; - } - - // Reset outputs and progress stats - this.mEUt = 0; - this.mMaxProgresstime = 0; - this.mOutputItems = new ItemStack[]{}; - this.mOutputFluids = new FluidStack[]{}; - - long tVoltage = getMaxInputVoltage(); - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - log("Running checkRecipeGeneric(0)"); - - //Check to see if Voltage Tier > Control Core Tier - if (tTier > aControlCoreTier && requireControlCores) { - log("Control core found is lower tier than power tier."); - return false; - } - - log("Running checkRecipeGeneric(1)"); - // Remember last recipe - an optimization for findRecipe() - this.mLastRecipe = tRecipe; - if (tRecipe == null) { log("BAD RETURN - 1"); return false; @@ -851,11 +943,6 @@ GT_MetaTileEntity_MultiBlockBase { this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; - - //Only Overclock as high as the control circuit. - byte tTierOld = tTier; - tTier = getControlCoreTier() > 0 ? (byte) aControlCoreTier : tTierOld; - // Overclock if (this.mEUt <= 16) { this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); @@ -939,40 +1026,30 @@ GT_MetaTileEntity_MultiBlockBase { return true; } - public GT_Recipe reduceRecipeTimeByPercentage(final GT_Recipe tRecipe, - final float percentage) { - int cloneTime = 0; - GT_Recipe baseRecipe; - GT_Recipe cloneRecipe = null; - baseRecipe = tRecipe.copy(); - if ((baseRecipe != null) && ((cloneRecipe != baseRecipe) || (cloneRecipe == null))) { - cloneRecipe = baseRecipe.copy(); - log("Setting Recipe"); - } - if ((baseRecipe != null) && ((cloneTime != baseRecipe.mDuration) || (cloneTime == 0))) { - cloneTime = baseRecipe.mDuration; - log("Setting Time"); - } - if ((cloneRecipe != null) && cloneRecipe.mDuration > 0) { - final int originalTime = cloneRecipe.mDuration; - final int tempTime = MathUtils.findPercentageOfInt(cloneRecipe.mDuration, - (100 - percentage)); - cloneRecipe.mDuration = tempTime; - if (cloneRecipe.mDuration < originalTime) { - log("Generated recipe with a smaller time. | " - + originalTime + " | " + cloneRecipe.mDuration + " |"); - return cloneRecipe; - } else { - log("Did not generate recipe with a smaller time. | " - + originalTime + " | " + cloneRecipe.mDuration + " |"); - return tRecipe; - } - } - log("Error generating recipe, returning null."); - return null; - } + + + + + + + + + + + + + + + + + + + + + + public boolean isMachineRunning() { boolean aRunning = this.getBaseMetaTileEntity().isActive(); @@ -1166,13 +1243,13 @@ GT_MetaTileEntity_MultiBlockBase { } public int getControlCoreTier() { - + //Always return best tier if config is off. /*boolean aCoresConfig = gtPlusPlus.core.lib.CORE.ConfigSwitches.requireControlCores; if (!aCoresConfig) { return 10; }*/ - + if (mControlCoreBus.isEmpty()) { log("No Control Core Modules Found."); return 0; @@ -1212,9 +1289,9 @@ GT_MetaTileEntity_MultiBlockBase { log("Tried to add a secondary control core module."); return false; } - + GT_MetaTileEntity_Hatch_ControlCore Module = (GT_MetaTileEntity_Hatch_ControlCore) aMetaTileEntity; - + if (Module != null) { if (Module.setOwner(aTileEntity)) { log("Adding control core module."); @@ -1503,12 +1580,12 @@ GT_MetaTileEntity_MultiBlockBase { @SuppressWarnings("rawtypes") public boolean isThisHatchMultiDynamo(Object aMetaTileEntity){ Class mDynamoClass; - mDynamoClass = ReflectionUtils.getClass("com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti"); - if (mDynamoClass != null){ - if (mDynamoClass.isInstance(aMetaTileEntity)){ - return true; - } + mDynamoClass = ReflectionUtils.getClass("com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti"); + if (mDynamoClass != null){ + if (mDynamoClass.isInstance(aMetaTileEntity)){ + return true; } + } return false; } @@ -1540,7 +1617,7 @@ GT_MetaTileEntity_MultiBlockBase { return ""; } } - + private static Method calculatePollutionReduction; public int calculatePollutionReductionForHatch(GT_MetaTileEntity_Hatch_Muffler i , int g) { if (calculatePollutionReduction == null) { @@ -1794,17 +1871,17 @@ GT_MetaTileEntity_MultiBlockBase { } public abstract boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack); - - + + public boolean isValidBlockForStructure(IGregTechTileEntity aBaseMetaTileEntity, int aCasingID, boolean canBeHatch, Block aFoundBlock, int aFoundMeta, Block aExpectedBlock, int aExpectedMeta) { boolean isHatch = false; if (aBaseMetaTileEntity != null) { - + if (aCasingID < 64) { aCasingID = TAE.GTPP_INDEX(aCasingID); } - + isHatch = this.addToMachineList(aBaseMetaTileEntity, aCasingID); if (isHatch) { return true; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java index cf6e484ff5..4fde2d6916 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java @@ -1,16 +1,14 @@ package gtPlusPlus.xmod.gregtech.common.blocks.textures; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; - import gregtech.api.enums.Textures; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialCentrifuge; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; public class TexturesCentrifugeMultiblock { @@ -92,103 +90,55 @@ public class TexturesCentrifugeMultiblock { TileEntity tTileEntity; IMetaTileEntity tMetaTileEntity; if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return this.CENTRIFUGE_ACTIVE[0].getIcon(); - } - return this.CENTRIFUGE[0].getIcon(); + return getIconByIndex(tMetaTileEntity, 0); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return this.CENTRIFUGE_ACTIVE[3].getIcon(); - } - return this.CENTRIFUGE[3].getIcon(); + return getIconByIndex(tMetaTileEntity, 3); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return this.CENTRIFUGE_ACTIVE[6].getIcon(); - } - return this.CENTRIFUGE[6].getIcon(); + return getIconByIndex(tMetaTileEntity, 6); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return this.CENTRIFUGE_ACTIVE[1].getIcon(); - } - return this.CENTRIFUGE[1].getIcon(); + return getIconByIndex(tMetaTileEntity, 1); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return this.CENTRIFUGE_ACTIVE[7].getIcon(); - } - return this.CENTRIFUGE[7].getIcon(); + return getIconByIndex(tMetaTileEntity, 7); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return this.CENTRIFUGE_ACTIVE[8].getIcon(); - } - return this.CENTRIFUGE[8].getIcon(); + return getIconByIndex(tMetaTileEntity, 8); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return this.CENTRIFUGE_ACTIVE[5].getIcon(); - } - return this.CENTRIFUGE[5].getIcon(); + return getIconByIndex(tMetaTileEntity, 5); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return this.CENTRIFUGE_ACTIVE[2].getIcon(); - } - return this.CENTRIFUGE[2].getIcon(); + return getIconByIndex(tMetaTileEntity, 2); } } else if ((aSide == 4) || (aSide == 5)) { TileEntity tTileEntity; Object tMetaTileEntity; if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return this.CENTRIFUGE_ACTIVE[0].getIcon(); - } - return this.CENTRIFUGE[0].getIcon(); + return getIconByIndex((IMetaTileEntity) tMetaTileEntity, 0); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return this.CENTRIFUGE_ACTIVE[3].getIcon(); - } - return this.CENTRIFUGE[3].getIcon(); + return getIconByIndex((IMetaTileEntity) tMetaTileEntity, 3); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return this.CENTRIFUGE_ACTIVE[6].getIcon(); - } - return this.CENTRIFUGE[6].getIcon(); + return getIconByIndex((IMetaTileEntity) tMetaTileEntity, 6); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return this.CENTRIFUGE_ACTIVE[1].getIcon(); - } - return this.CENTRIFUGE[1].getIcon(); + return getIconByIndex((IMetaTileEntity) tMetaTileEntity, 1); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return this.CENTRIFUGE_ACTIVE[7].getIcon(); - } - return this.CENTRIFUGE[7].getIcon(); + return getIconByIndex((IMetaTileEntity) tMetaTileEntity, 7); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return this.CENTRIFUGE_ACTIVE[8].getIcon(); - } - return this.CENTRIFUGE[8].getIcon(); + return getIconByIndex((IMetaTileEntity) tMetaTileEntity, 8); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return this.CENTRIFUGE_ACTIVE[5].getIcon(); - } - return this.CENTRIFUGE[5].getIcon(); + return getIconByIndex((IMetaTileEntity) tMetaTileEntity, 5); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return this.CENTRIFUGE_ACTIVE[2].getIcon(); - } - return this.CENTRIFUGE[2].getIcon(); + return getIconByIndex((IMetaTileEntity) tMetaTileEntity, 2); } } return TexturesGtBlock.Casing_Material_Centrifuge.getIcon(); @@ -440,15 +390,33 @@ public class TexturesCentrifugeMultiblock { return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); } - public boolean isUsingAnimatedTexture(TileEntity tTileEntity) { - IGregTechTileEntity aTile; - if (tTileEntity instanceof IGregTechTileEntity) { - aTile = (IGregTechTileEntity) tTileEntity; - if (aTile instanceof GregtechMetaTileEntity_IndustrialCentrifuge) { - return ((GregtechMetaTileEntity_IndustrialCentrifuge) aTile).usingAnimations(); - } - } + public boolean isCentrifugeRunning(IMetaTileEntity aTile) { + if (aTile == null) { + return false; + } + else { + return aTile.getBaseMetaTileEntity().isActive(); + } + + + } + + public boolean isUsingAnimatedTexture(IMetaTileEntity aMetaTileEntity) { + if (aMetaTileEntity != null) { + if (aMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) { + return ((GregtechMetaTileEntity_IndustrialCentrifuge) aMetaTileEntity).usingAnimations(); + } + } return false; } + public IIcon getIconByIndex(IMetaTileEntity aMetaTileEntity, int aIndex) { + if (isUsingAnimatedTexture(aMetaTileEntity)) { + if (isCentrifugeRunning(aMetaTileEntity)) { + return this.CENTRIFUGE_ACTIVE[aIndex].getIcon(); + } + } + return this.CENTRIFUGE[aIndex].getIcon(); + } + } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java index e3c05a8388..3f3a276f0c 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java @@ -1,13 +1,10 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; -import gregtech.api.GregTech_API; import gregtech.api.enums.TAE; 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; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; @@ -27,7 +24,7 @@ import net.minecraftforge.common.util.ForgeDirection; public class GregtechMetaTileEntity_IndustrialCentrifuge extends GregtechMeta_MultiBlockBase { - private boolean mIsAnimated = true; + private boolean mIsAnimated; private static ITexture frontFace; private static ITexture frontFaceActive; private static CustomIcon GT9_5_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE5"); @@ -38,10 +35,12 @@ extends GregtechMeta_MultiBlockBase { super(aID, aName, aNameRegional); frontFaceActive = new GT_RenderedTexture(GT9_5_Active); frontFace = new GT_RenderedTexture(GT9_5); + mIsAnimated = true; } public GregtechMetaTileEntity_IndustrialCentrifuge(final String aName) { super(aName); + mIsAnimated = true; } @Override @@ -59,6 +58,7 @@ extends GregtechMeta_MultiBlockBase { return new String[]{ "Controller Block for the Industrial Centrifuge", "125% faster than using single block machines of the same voltage", + "Disable animations with a screwdriver", "Only uses 90% of the eu/t normally required", "Processes six items per voltage tier", "Size: 3x3x3 (Hollow)", @@ -179,13 +179,14 @@ extends GregtechMeta_MultiBlockBase { @Override public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - this.mIsAnimated = Utils.invertBoolean(mIsAnimated); + this.mIsAnimated = !mIsAnimated; + Logger.INFO("Is Centrifuge animated "+this.mIsAnimated); if (this.mIsAnimated) { - PlayerUtils.messagePlayer(aPlayer, "Using Animated Turbine Texture."); + PlayerUtils.messagePlayer(aPlayer, "Using Animated Turbine Texture. "); } else { - PlayerUtils.messagePlayer(aPlayer, "Using Static Turbine Texture."); - } + PlayerUtils.messagePlayer(aPlayer, "Using Static Turbine Texture. "); + } } @Override @@ -196,12 +197,18 @@ extends GregtechMeta_MultiBlockBase { @Override public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - mIsAnimated = aNBT.getBoolean("mIsAnimated"); + super.loadNBTData(aNBT); + if (aNBT.hasKey("mIsAnimated")) { + mIsAnimated = aNBT.getBoolean("mIsAnimated"); + } + else { + mIsAnimated = true; + } } public boolean usingAnimations() { - return mIsAnimated; + //Logger.INFO("Is animated? "+this.mIsAnimated); + return this.mIsAnimated; } private ITexture getFrontFacingTurbineTexture(boolean isActive) { diff --git a/src/resources/assets/miscutils/lang/en_US.lang b/src/resources/assets/miscutils/lang/en_US.lang index e1102d708e..9ce7e83082 100644 --- a/src/resources/assets/miscutils/lang/en_US.lang +++ b/src/resources/assets/miscutils/lang/en_US.lang @@ -2609,7 +2609,7 @@ item.particle.ion.Antimony.name=Antimony Ion item.particle.ion.Tellurium.name=Tellurium Ion item.particle.ion.Iodine.name=Iodine Ion item.particle.ion.Xenon.name=Xenon Ion -item.particle.ion.Cesium.name=Cesium Ion +item.particle.ion.Cesium.name=Caesium Ion item.particle.ion.Barium.name=Barium Ion item.particle.ion.Lanthanum.name=Lanthanum Ion item.particle.ion.Cerium.name=Cerium Ion @@ -2770,4 +2770,105 @@ item.itemNuggetTeflon.name=Teflon Nugget item.itemPlateTeflon.name=Teflon Plate item.itemPlateDoubleTeflon.name=Double Teflon Plate item.itemCellTeflon.name=Teflon Cell -tile.Block of Teflon.name=Block of Teflon \ No newline at end of file +tile.Block of Teflon.name=Block of Teflon + +//Added 17/4/19 +//Spelling Corrections +item.particle.ion.Aluminium.name=Aluminium Ion +item.particle.ion.Caesium.name=Caesium Ion + +item.GTPP.MonsterKiller.Enderman.name=Enderman Killer +item.GTPP.MonsterKiller.Spider.name=Spider Killer +item.GTPP.MonsterKiller.Skeleton.name=Skeleton Killer +item.GTPP.MonsterKiller.Creeper.name=Creeper Killer +item.GTPP.MonsterKiller.Zombie.name=Zombie Killer +item.GTPP.MonsterKiller.Hellish.name=Nether Mob Killer + +item.itemIngotRunite.name=Runite Ingot +item.itemDustRunite.name=Runite Dust +item.itemDustTinyRunite.name=Tiny Pile of Runite Dust +item.itemDustSmallRunite.name=Small Pile of Runite Dust +item.itemNuggetRunite.name=Runite Nugget +item.itemPlateRunite.name=Runite Plate +item.itemPlateDoubleRunite.name=Double Runite Plate +item.itemCellRunite.name=Runite Cell +tile.Block of Runite.name=Block of Runite + +item.itemIngotDragonblood.name=Dragonblood Ingot +item.itemDustDragonblood.name=Dragonblood Dust +item.itemDustTinyDragonblood.name=Tiny Pile of Dragonblood Dust +item.itemDustSmallDragonblood.name=Small Pile of Dragonblood Dust +item.itemNuggetDragonblood.name=Dragonblood Nugget +item.itemPlateDragonblood.name=Dragonblood Plate +item.itemPlateDoubleDragonblood.name=Double Dragonblood Plate +item.itemCellDragonblood.name=Dragonblood Cell +tile.Block of Dragonblood.name=Block of Dragonblood + +item.itemIngotBlackTitanium.name=Black Titanium Ingot +item.itemDustBlackTitanium.name=Black Titanium Dust +item.itemDustTinyBlackTitanium.name=Tiny Pile of Black Titanium Dust +item.itemDustSmallBlackTitanium.name=Small Pile of Black Titanium Dust +item.itemNuggetBlackTitanium.name=Black Titanium Nugget +item.itemPlateBlackTitanium.name=Black Titanium Plate +item.itemPlateDoubleBlackTitanium.name=Double Black Titanium Plate +item.itemCellBlackTitanium.name=Black Titanium Cell +tile.Block of Black Titanium.name=Block of Black Titanium + +item.itemIngotAncientGranite.name=Ancient Granite Ingot +item.itemHotIngotAncientGranite.name=Hot Ancient Granite Ingot +item.itemDustAncientGranite.name=Ancient Granite Dust +item.itemDustTinyAncientGranite.name=Tiny Pile of Ancient Granite Dust +item.itemDustSmallAncientGranite.name=Small Pile of Ancient Granite Dust +item.itemNuggetAncientGranite.name=Ancient Granite Nugget +item.itemPlateAncientGranite.name=Ancient Granite Plate +item.itemPlateDoubleAncientGranite.name=Double Ancient Granite Plate +tile.Block of Ancient Granite.name=Block of Ancient Granite + +item.itemIngotBabbitAlloy.name=Babbit Alloy Ingot +item.itemHotIngotBabbitAlloy.name=Hot Babbit Alloy Ingot +item.itemDustBabbitAlloy.name=Babbit Alloy Dust +item.itemDustTinyBabbitAlloy.name=Tiny Pile of Babbit Alloy Dust +item.itemDustSmallBabbitAlloy.name=Small Pile of Babbit Alloy Dust +item.itemNuggetBabbitAlloy.name=Babbit Alloy Nugget +item.itemPlateBabbitAlloy.name=Babbit Alloy Plate +item.itemPlateDoubleBabbitAlloy.name=Double Babbit Alloy Plate +item.itemCellBabbitAlloy.name=Babbit Alloy Cell +tile.Block of Babbit Alloy.name=Block of Babbit Alloy + +item.itemIngotBlackMetal.name=Black Metal Ingot +item.itemHotIngotBlackMetal.name=Hot Black Metal Ingot +item.itemDustBlackMetal.name=Black Metal Dust +item.itemDustTinyBlackMetal.name=Tiny Pile of Black Metal Dust +item.itemDustSmallBlackMetal.name=Small Pile of Black Metal Dust +item.itemNuggetBlackMetal.name=Black Metal Nugget +item.itemPlateBlackMetal.name=Black Metal Plate +item.itemPlateDoubleBlackMetal.name=Double Black Metal Plate +item.itemBoltBlackMetal.name=Black Metal Bolt +item.itemRodBlackMetal.name=Black Metal Rod +item.itemRodLongBlackMetal.name=Long Black Metal Rod +item.itemRingBlackMetal.name=Black Metal Ring +item.itemScrewBlackMetal.name=Black Metal Screw +item.itemRotorBlackMetal.name=Black Metal Rotor +item.itemGearBlackMetal.name=Black Metal Gear +item.itemCellBlackMetal.name=Black Metal Cell +tile.Block of Black Metal.name=Block of Black Metal +tile.Black Metal Frame Box.name=Black Metal Frame Box + +item.itemIngotWhiteMetal.name=White Metal Ingot +item.itemHotIngotWhiteMetal.name=Hot White Metal Ingot +item.itemDustWhiteMetal.name=White Metal Dust +item.itemDustTinyWhiteMetal.name=Tiny Pile of White Metal Dust +item.itemDustSmallWhiteMetal.name=Small Pile of White Metal Dust +item.itemNuggetWhiteMetal.name=White Metal Nugget +item.itemPlateWhiteMetal.name=White Metal Plate +item.itemPlateDoubleWhiteMetal.name=Double White Metal Plate +item.itemBoltWhiteMetal.name=White Metal Bolt +item.itemRodWhiteMetal.name=White Metal Rod +item.itemRodLongWhiteMetal.name=Long White Metal Rod +item.itemRingWhiteMetal.name=White Metal Ring +item.itemScrewWhiteMetal.name=White Metal Screw +item.itemRotorWhiteMetal.name=White Metal Rotor +item.itemGearWhiteMetal.name=White Metal Gear +item.itemCellWhiteMetal.name=White Metal Cell +tile.Block of White Metal.name=Block of White Metal +tile.White Metal Frame Box.name=White Metal Frame Box \ No newline at end of file -- cgit