diff options
Diffstat (limited to 'src/Java/gtPlusPlus/core')
10 files changed, 426 insertions, 40 deletions
diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java index 04470b3554..2fd23ec88d 100644 --- a/src/Java/gtPlusPlus/core/item/ModItems.java +++ b/src/Java/gtPlusPlus/core/item/ModItems.java @@ -37,8 +37,10 @@ import gtPlusPlus.core.item.base.plates.BaseItemPlateDouble; import gtPlusPlus.core.item.bauble.HealthBoostBauble; import gtPlusPlus.core.item.bauble.ModularBauble; import gtPlusPlus.core.item.chemistry.CoalTar; +import gtPlusPlus.core.item.chemistry.IonParticles; import gtPlusPlus.core.item.chemistry.NuclearChem; import gtPlusPlus.core.item.chemistry.RocketFuels; +import gtPlusPlus.core.item.chemistry.StandardBaseParticles; import gtPlusPlus.core.item.effects.RarityUncommon; import gtPlusPlus.core.item.general.*; import gtPlusPlus.core.item.general.books.ItemBaseBook; @@ -536,6 +538,7 @@ public final class ModItems { MaterialGenerator.generate(ALLOY.MARAGING250); MaterialGenerator.generate(ALLOY.MARAGING300); MaterialGenerator.generate(ALLOY.MARAGING350); + MaterialGenerator.generate(ALLOY.AQUATIC_STEEL); MaterialGenerator.generate(ALLOY.NITINOL_60); @@ -811,11 +814,8 @@ public final class ModItems { dustTechnetium99M = new DustDecayable("dustTechnetium99M", ELEMENT.getInstance().TECHNETIUM.getRgbAsHex(), 8570, new String[] {""+StringUtils.superscript("99ᵐTc"), "Result: Technicium 99 ("+StringUtils.superscript("99Tc")+")"}, dustTechnetium99, 4); dustMolybdenum99 = new DustDecayable("dustMolybdenum99", ELEMENT.getInstance().MOLYBDENUM.getRgbAsHex(), 16450, new String[] {""+StringUtils.superscript("99Mo"), "Result: Technicium 99ᵐ ("+StringUtils.superscript("99ᵐTc")+")"}, dustTechnetium99M, 4); - new BaseItemParticle(ELEMENT.getInstance().HYDROGEN, "Ion"); - new BaseItemParticle(ELEMENT.getInstance().HELIUM, "Ion"); - new BaseItemParticle(ELEMENT.getInstance().LITHIUM, "Ion"); - new BaseItemParticle(ELEMENT.getInstance().BERYLLIUM, "Ion"); - + new IonParticles(); + new StandardBaseParticles(); diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java index ec0b490f63..4dbb5851f2 100644 --- a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java +++ b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java @@ -7,15 +7,6 @@ import java.util.Map; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.TextureSet; import gregtech.api.util.GT_OreDictUnificator; @@ -32,15 +23,23 @@ import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.sys.KeyboardUtils; import gtPlusPlus.xmod.thaumcraft.aspect.GTPP_Aspects; import gtPlusPlus.xmod.thaumcraft.util.ThaumcraftUtils; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; public class BaseItemComponent extends Item{ private final static Class<TextureSet> mTextureSetPreload; - + static { mTextureSetPreload = TextureSet.class; } - + public final Material componentMaterial; public final String materialName; public final String unlocalName; @@ -62,9 +61,9 @@ public class BaseItemComponent extends Item{ //this.setTextureName(this.getCorrectTextures()); this.componentColour = material.getRgbAsHex(); GameRegistry.registerItem(this, this.unlocalName); - + //if (componentType != ComponentTypes.DUST) - + GT_OreDictUnificator.registerOre(componentType.getOreDictName()+material.getUnlocalizedName(), ItemUtils.getSimpleStack(this)); if (LoadedMods.Thaumcraft) { ThaumcraftUtils.addAspectToItem(ItemUtils.getSimpleStack(this), GTPP_Aspects.METALLUM, 1); @@ -91,7 +90,7 @@ public class BaseItemComponent extends Item{ GT_OreDictUnificator.registerOre(ComponentTypes.CELL.getOreDictName()+unlocalName, ItemUtils.getSimpleStack(this)); registerComponent(); } - + public boolean registerComponent() { if (this.componentMaterial == null) { return false; @@ -197,6 +196,7 @@ public class BaseItemComponent extends Item{ super.addInformation(stack, aPlayer, list, bool); } + @SuppressWarnings("unchecked") @Override public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { if (this.componentMaterial != null){ @@ -206,6 +206,19 @@ public class BaseItemComponent extends Item{ } } } + + if (extraData != null) { + if (componentMaterial != null && componentMaterial.getRGBA()[3] > 1) { + if (((Map<Integer, Short[]>) extraData).get(9999) == null) { + ((Map<Integer, Short[]>) extraData).put(9999, new Short[] {0}); + } + Short aCurrentFrame = ((Map<Integer, Short[]>) extraData).get(9999)[0]; + short fC = (short) (aCurrentFrame >= Short.MAX_VALUE ? 0 : aCurrentFrame+1); + ((Map<Integer, Short[]>) extraData).put((int) 9999, new Short[] {(short) (fC), 0}); + ((Map<Integer, Short[]>) extraData).put((int) 9998, new Short[] {aCurrentFrame, 0}); + + } + } } @@ -221,15 +234,209 @@ public class BaseItemComponent extends Item{ return (CORE.ConfigSwitches.useGregtechTextures ? true : false); } + @SuppressWarnings("unchecked") @Override public int getColorFromItemStack(final ItemStack stack, final int renderPass) { + + if (renderPass == 0 && !CORE.ConfigSwitches.useGregtechTextures){ return Utils.rgbtoHexValue(255, 255, 255); } if (renderPass == 1 && CORE.ConfigSwitches.useGregtechTextures){ return Utils.rgbtoHexValue(255, 255, 255); } + + + + try { + if (this.componentMaterial == null) { + if (extraData != null) { + if (short.class.isInstance(extraData)){ + short[] abc = (short[]) extraData; + return Utils.rgbtoHexValue(abc[0], abc[1], abc[2]); + } + } + return this.componentColour; + } + + if (this.componentMaterial.getRGBA()[3] <= 1) { + return this.componentColour; + } + else { + + //Mild Glow Effect + if (this.componentMaterial.getRGBA()[3] == 2) { + if (extraData == null) { + extraData = new HashMap<Integer, Short[]>(); + ((Map<Integer, Short[]>) extraData).put((int) Short.MAX_VALUE, new Short[] {0}); + ((Map<Integer, Short[]>) extraData).put((int) Short.MAX_VALUE-1, new Short[] {0}); + short[] er = this.componentMaterial.getRGBA(); + short value = 1; + Short[] ht = new Short[] {er[0], er[1], er[2]}; + for (int y = 0; y < 40; y++) { + if (y < 20) { + value = 1; + } + else { + value = -1; + } + short r = (short) (ht[0] + value); + short g = (short) (ht[1] + value); + short b = (short) (ht[2] + value); + Short[] qq = new Short[] {(short) Math.min(255, r), (short) Math.min(255, g), (short) Math.min(255, b)}; + ht = qq; + ((Map<Integer, Short[]>) extraData).put(y, qq); + } + } + if (extraData != null) { + + Short aCurrentFrame = ((Map<Integer, Short[]>) extraData).get((int) Short.MAX_VALUE)[0]; + Short aSize = 40; + short nextFrame = (short) ((aCurrentFrame < aSize) ? (aCurrentFrame+1) : 0); + Short[] aCurrentFrameRGB = ((Map<Integer, Short[]>) extraData).get(aCurrentFrame < aSize ? (int) aCurrentFrame : 0); + ((Map<Integer, Short[]>) extraData).put((int) Short.MAX_VALUE, new Short[] {nextFrame}); + return Utils.rgbtoHexValue(aCurrentFrameRGB[0], aCurrentFrameRGB[1], aCurrentFrameRGB[2]); + + + /*Short aCurrentFrame = ((Map<Integer, Short[]>) extraData).get((int) Short.MAX_VALUE)[0]; + Short[] aCurrentFrameRGB = ((Map<Integer, Short[]>) extraData).get((int) aCurrentFrame); + short nextFrame = aCurrentFrame < 40 ? aCurrentFrame++ : 0; + ((Map<Integer, Short[]>) extraData).put((int) Short.MAX_VALUE, new Short[] {nextFrame}); + return Utils.rgbtoHexValue(aCurrentFrameRGB[0], aCurrentFrameRGB[1], aCurrentFrameRGB[2]);*/ + } + } + + //Rainbow Hue Cycle + else if (this.componentMaterial.getRGBA()[3] == 3) { + if (extraData == null) { + extraData = new HashMap<Integer, Short[]>(); + ((Map<Integer, Short[]>) extraData).put((int) Short.MAX_VALUE, new Short[] {0}); + ((Map<Integer, Short[]>) extraData).put((int) Short.MAX_VALUE-1, new Short[] {0}); + int aSlot = 0; + + //Let's say you're starting with green: + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 0}); + //Slowly start adding in some red to get to yellow: + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 255, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 255, 0}); + //Then, take out the green to get to red: + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 204, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 153, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 102, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 51, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 0}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 0}); + //Now, add blue to get to purple: + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {255, 0, 255}); + //Then, remove red to get to blue: + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {204, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {153, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] {102, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 51, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 0, 255}); + //Add the green back in to get to cyan: + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 51, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 102, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 153, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 204, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 255}); + //And finally remove the blue to get back to green: + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 204}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 153}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 102}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map<Integer, Short[]>) extraData).put(aSlot++, new Short[] { 0, 255, 51}); + ((Map<Integer, Short[]>) extraData).put((int) Byte.MAX_VALUE, new Short[] {(short) (((Map<Integer, Short[]>) extraData).size()-1)}); + + + } + if (extraData != null) { + Short aCurrentFrame = ((Map<Integer, Short[]>) extraData).get((int) Short.MAX_VALUE)[0]; + Short aSize = (short) (((Map<Integer, Short[]>) extraData).size() - 3); + short nextFrame = (short) ((aCurrentFrame < aSize) ? (aCurrentFrame+1) : 0); + Short[] aCurrentFrameRGB = ((Map<Integer, Short[]>) extraData).get(aCurrentFrame < aSize ? (int) aCurrentFrame : 0); + ((Map<Integer, Short[]>) extraData).put((int) Short.MAX_VALUE, new Short[] {nextFrame}); + return Utils.rgbtoHexValue(aCurrentFrameRGB[0], aCurrentFrameRGB[1], aCurrentFrameRGB[2]); + } + } + } + + + } + catch (Throwable t) { + + } return this.componentColour; + + + + + } @Override @@ -307,7 +514,7 @@ public class BaseItemComponent extends Item{ public OrePrefixes getGtOrePrefix() { return this.a_GT_EQUAL; } - + } } diff --git a/src/Java/gtPlusPlus/core/item/base/misc/BaseItemParticle.java b/src/Java/gtPlusPlus/core/item/base/misc/BaseItemParticle.java index 363b9ad00d..89cd1e55ae 100644 --- a/src/Java/gtPlusPlus/core/item/base/misc/BaseItemParticle.java +++ b/src/Java/gtPlusPlus/core/item/base/misc/BaseItemParticle.java @@ -1,26 +1,54 @@ package gtPlusPlus.core.item.base.misc; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + import gtPlusPlus.core.creative.AddToCreativeTab; import gtPlusPlus.core.item.base.CoreItem; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; +import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -public class BaseItemParticle extends CoreItem { - - private final Material mParticleMaterial; +public abstract class BaseItemParticle extends CoreItem { + + protected static final Map<Integer, Integer> aColourMap = new LinkedHashMap<Integer, Integer> (); + private final int aMaxCount; - public BaseItemParticle(Material aMat, String aType) { - super("particle"+aMat.getLocalizedName()+aType, aMat.getLocalizedName()+" "+aType, AddToCreativeTab.tabOther, 64, 0, new String[] {}, EnumRarity.rare, EnumChatFormatting.DARK_AQUA, false, null); + public BaseItemParticle(String aType, int aCount, EnumRarity aRarity) { + super("particle"+aType, aType, AddToCreativeTab.tabOther, 64, 0, new String[] {}, aRarity, EnumChatFormatting.DARK_AQUA, false, null); this.setTextureName(CORE.MODID + ":" + "science/Atom"); - mParticleMaterial = aMat; + aMaxCount = aCount; + this.setHasSubtypes(true); + } @Override public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { - return this.mParticleMaterial.getRgbAsHex(); + return aColourMap.get(stack.getItemDamage()); + } + + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < aMaxCount; i ++) { + list.add(new ItemStack(item, 1, i)); + } } + + @Override + public final String getItemStackDisplayName(final ItemStack tItem) { + String aReturnValue = super.getItemStackDisplayName(tItem); + String[] a2 = getAffixes(); + aReturnValue = (a2[0] + aReturnValue + a2[1]); + return aReturnValue; + } + + public abstract String[] getAffixes(); + } diff --git a/src/Java/gtPlusPlus/core/item/chemistry/IonParticles.java b/src/Java/gtPlusPlus/core/item/chemistry/IonParticles.java new file mode 100644 index 0000000000..ff5f67d2da --- /dev/null +++ b/src/Java/gtPlusPlus/core/item/chemistry/IonParticles.java @@ -0,0 +1,49 @@ +package gtPlusPlus.core.item.chemistry; + +import gregtech.api.enums.Materials; +import gtPlusPlus.core.item.base.misc.BaseItemParticle; +import gtPlusPlus.core.util.Utils; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; + +public class IonParticles extends BaseItemParticle { + + public IonParticles() { + super("Ion", aElements.length, EnumRarity.rare); + } + + private static final String[] aElements = 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"}; + + static { + //Generate Ions + int key = 0; + for (String s : aElements) { + Materials m = Materials.get(s); + int aColour = 0; + if (m == null) { + aColour = Utils.rgbtoHexValue(128, 128, 128); + } + else { + aColour = Utils.rgbtoHexValue(m.mRGBa[0], m.mRGBa[1], m.mRGBa[2]); + } + aColourMap.put(key++, aColour); + } + + } + + @Override + public String[] getAffixes() { + return new String[] {"", ""}; + } + + @Override + public String getUnlocalizedName() { + return ""; + } + + @Override + public String getUnlocalizedName(final ItemStack itemStack) { + return "item.particle.ion" + "." + aElements[itemStack.getItemDamage()]; + } + +} diff --git a/src/Java/gtPlusPlus/core/item/chemistry/StandardBaseParticles.java b/src/Java/gtPlusPlus/core/item/chemistry/StandardBaseParticles.java new file mode 100644 index 0000000000..dd07d41b3d --- /dev/null +++ b/src/Java/gtPlusPlus/core/item/chemistry/StandardBaseParticles.java @@ -0,0 +1,77 @@ +package gtPlusPlus.core.item.chemistry; + +import gregtech.api.enums.Materials; +import gtPlusPlus.core.item.base.misc.BaseItemParticle; +import gtPlusPlus.core.material.Particle; +import gtPlusPlus.core.material.Particle.ElementaryGroup; +import gtPlusPlus.core.util.Utils; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; + +public class StandardBaseParticles extends BaseItemParticle { + + public StandardBaseParticles() { + super("Base", aTypes.length, EnumRarity.rare); + } + + private static final String[] aTypes = new String[] { "Graviton", "Up", "Down", "Charm", "Strange", "Top", + "Bottom", "Electron", "Electron Neutrino", "Muon", "Muon Neutrino", "Tau", "Tau Neutrino", "Gluon", + "Photon", "Z Boson", "W Boson", "Higgs Boson", "Proton", "Neutron", "Lambda", "Omega", "Pion", + "ETA Meson", }; + + static { + //Generate Ions + int key = 0; + for (String s : aTypes) { + Particle p; + for (Particle o : Particle.aMap) { + int aColour = 0; + if (o.mParticleName.toLowerCase().equals(s.toLowerCase())) { + if (o.mParticleType == ElementaryGroup.BARYON) { + aColour = Utils.rgbtoHexValue(174, 226, 156); + aColourMap.put(key++, aColour); + } + else if (o.mParticleType == ElementaryGroup.BOSON) { + if (o == Particle.HIGGS_BOSON) { + aColour = Utils.rgbtoHexValue(226, 196, 104); + aColourMap.put(key++, aColour); + } + else { + aColour = Utils.rgbtoHexValue(226, 52, 66); + aColourMap.put(key++, aColour); + } + } + else if (o.mParticleType == ElementaryGroup.LEPTON) { + aColour = Utils.rgbtoHexValue(126, 226, 95); + aColourMap.put(key++, aColour); + } + else if (o.mParticleType == ElementaryGroup.MESON) { + aColour = Utils.rgbtoHexValue(90, 154, 226); + aColourMap.put(key++, aColour); + } + else { + aColour = Utils.rgbtoHexValue(188, 61, 226); + aColourMap.put(key++, aColour); + } + } + } + } + + } + + @Override + public String[] getAffixes() { + return new String[] {"", ""}; + } + + @Override + public String getUnlocalizedName() { + return ""; + } + + @Override + public String getUnlocalizedName(final ItemStack itemStack) { + return "item.particle.base" + "." + aTypes[itemStack.getItemDamage()]; + } + +} diff --git a/src/Java/gtPlusPlus/core/material/ALLOY.java b/src/Java/gtPlusPlus/core/material/ALLOY.java index 6a659fc165..a27cace300 100644 --- a/src/Java/gtPlusPlus/core/material/ALLOY.java +++ b/src/Java/gtPlusPlus/core/material/ALLOY.java @@ -280,6 +280,26 @@ public final class ALLOY { new MaterialStack(ELEMENT.getInstance().COBALT, 8), }); + public static final Material AQUATIC_STEEL = new Material( + "Watertight Steel", //Material Name + MaterialState.SOLID, //State + new short[] {120, 120, 180}, //Material Colour + 2673, //Melting Point in C + 4835, + -1, + -1, + true, //Uses Blast furnace? + //Material Stacks with Percentage of required elements. + new MaterialStack[]{ + new MaterialStack(ALLOY.STEEL, 60), + new MaterialStack(ELEMENT.getInstance().CARBON, 10), + new MaterialStack(ELEMENT.getInstance().MANGANESE, 5), + new MaterialStack(ELEMENT.getInstance().SILICON, 10), + new MaterialStack(ELEMENT.getInstance().PHOSPHORUS, 5), + new MaterialStack(ELEMENT.getInstance().SULFUR, 5), + new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 5) + }); + public static final Material STELLITE = new Material( "Stellite", //Material Name MaterialState.SOLID, //State @@ -459,7 +479,7 @@ public final class ALLOY { "Tungsten Titanium Carbide", //Material Name MaterialState.SOLID, //State null, - -1, //Melting Point in C + 4422, //Melting Point in C -1, -1, -1, diff --git a/src/Java/gtPlusPlus/core/material/ELEMENT.java b/src/Java/gtPlusPlus/core/material/ELEMENT.java index d69ad9b065..99bc37444e 100644 --- a/src/Java/gtPlusPlus/core/material/ELEMENT.java +++ b/src/Java/gtPlusPlus/core/material/ELEMENT.java @@ -47,7 +47,7 @@ public final class ELEMENT { public final Material ARSENIC = MaterialUtils.generateMaterialFromGtENUM(Materials.Arsenic); public final Material SELENIUM = new Material("Selenium", MaterialState.SOLID, new short[]{190, 190, 190}, 217, 685, 34, 45, false, "Se", 0);//Not a GT Inherited Material public final Material BROMINE = new Material("Bromine", MaterialState.PURE_LIQUID, new short[]{200, 25, 25}, -7, 58, 35, 45, false, "Br", 0);//Not a GT Inherited Material - public final Material KRYPTON = new Material("Krypton", MaterialState.GAS, new short[]{255, 255, 255}, -157, -153, 36, 48, false, "Kr", 0);//Not a GT Inherited Material + public final Material KRYPTON = new Material("Krypton", MaterialState.PURE_LIQUID, new short[]{255, 255, 255}, -157, -153, 36, 48, false, "Kr", 0);//Not a GT Inherited Material public final Material RUBIDIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Rubidium); public final Material STRONTIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Strontium); public final Material YTTRIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Yttrium); @@ -206,9 +206,9 @@ public final class ELEMENT { public static class STANDALONE { - public static final Material CELESTIAL_TUNGSTEN = new Material("Celestial Tungsten", MaterialState.SOLID, TextureSets.REFINED.get(), ELEMENT.INSTANCE.TUNGSTEN.getRGB(), INSTANCE.TUNGSTEN.getMeltingPointC()+6500, INSTANCE.TUNGSTEN.getBoilingPointC()+7500, 160, 101, true, "✦◆✦", 0);//Not a GT Inherited Material - public static final Material ASTRAL_TITANIUM = new Material("Astral Titanium", MaterialState.SOLID, TextureSets.REFINED.get(), ELEMENT.INSTANCE.TITANIUM.getRGB(), 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}, 9200, 17550, 40, 51, false, "🕛🕒🕕🕘🕛 ", 0);//Not a GT Inherited Material + public static final Material CELESTIAL_TUNGSTEN = new Material("Celestial Tungsten", MaterialState.SOLID, TextureSets.REFINED.get(), new short[] {50, 50, 50, 2}, INSTANCE.TUNGSTEN.getMeltingPointC()+6500, INSTANCE.TUNGSTEN.getBoilingPointC()+7500, 160, 101, true, "✦◆✦", 0);//Not a GT Inherited Material + 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 diff --git a/src/Java/gtPlusPlus/core/material/ORES.java b/src/Java/gtPlusPlus/core/material/ORES.java index 78a0d250a9..a8b86a142c 100644 --- a/src/Java/gtPlusPlus/core/material/ORES.java +++ b/src/Java/gtPlusPlus/core/material/ORES.java @@ -797,7 +797,7 @@ public final class ORES { public static final Material DEEP_EARTH_REACTOR_FUEL_DEPOSIT = new Material( - "Radioactive Minerial Mix", //Material Name + "Radioactive Mineral Mix", //Material Name MaterialState.ORE, //State TextureSets.NUCLEAR.get(), //Texture Set null, //Material Colour diff --git a/src/Java/gtPlusPlus/core/material/Particle.java b/src/Java/gtPlusPlus/core/material/Particle.java index 5b3e37b4a9..6cc0f878d6 100644 --- a/src/Java/gtPlusPlus/core/material/Particle.java +++ b/src/Java/gtPlusPlus/core/material/Particle.java @@ -1,5 +1,7 @@ package gtPlusPlus.core.material; +import gtPlusPlus.api.objects.data.AutoMap; + public class Particle { public static final Particle GRAVITON; @@ -32,6 +34,8 @@ public class Particle { public static final Particle PION; public static final Particle ETA_MESON; + public static final AutoMap<Particle> aMap = new AutoMap<Particle>(); + static { /* @@ -99,7 +103,8 @@ public class Particle { public Particle(ElementaryGroup aParticleType, String aParticleName, Particle[] aComposition) { mParticleType = aParticleType; mParticleName = aParticleName; - mComposition = aComposition == null ? new Particle[] {this} : aComposition; + mComposition = aComposition == null ? new Particle[] {this} : aComposition; + aMap.put(this); } } diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java index 4ce4bb3da6..5cca67402b 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java @@ -1193,7 +1193,7 @@ public class RECIPES_Machines { } if (CORE.ConfigSwitches.enableMultiblock_IndustrialFishingPort){ - ItemStack plate = ALLOY.INCONEL_792.getPlate(1); + ItemStack plate = ALLOY.AQUATIC_STEEL.getPlate(1); RecipeUtils.recipeBuilder( plate, CI.craftingToolHammer_Hard, plate, "plateEglinSteel", "frameGtEglinSteel", "plateEglinSteel", @@ -1478,9 +1478,9 @@ public class RECIPES_Machines { new ItemStack[] { aDrillController, ItemUtils.getItemStackOfAmountFromOreDict("frameGtTriniumNaquadahCarbonite", 3), - ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(8), 2 * (CORE.GTNH ? 2 : 1)), - ItemUtils.getSimpleStack(CI.conveyorModule_ZPM, 2 * (CORE.GTNH ? 2 : 1)), - ItemUtils.getSimpleStack(CI.electricPump_ZPM, 4 * (CORE.GTNH ? 2 : 1)), + ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(9), 2 * (CORE.GTNH ? 4 : 1)), + ItemUtils.getSimpleStack((CORE.GTNH ? CI.conveyorModule_UV : CI.conveyorModule_ZPM), 2 * (CORE.GTNH ? 2 : 1)), + ItemUtils.getSimpleStack((CORE.GTNH ? CI.electricPump_UV : CI.electricPump_ZPM), 4 * (CORE.GTNH ? 2 : 1)), }, ALLOY.LAFIUM.getFluid(144 * 8 * (CORE.GTNH ? 2 : 1)), GregtechItemList.BedrockMiner_MKI.get(1), @@ -1494,7 +1494,7 @@ public class RECIPES_Machines { ItemUtils.getItemStackOfAmountFromOreDict("plateDoubleTriniumTitaniumAlloy", 1 * (CORE.GTNH ? 2 : 1)), ItemUtils.getItemStackOfAmountFromOreDict("gearGtPikyonium64B", 2 * (CORE.GTNH ? 2 : 1)), ALLOY.TRINIUM_REINFORCED_STEEL.getPlateDouble(4 * (CORE.GTNH ? 2 : 1)), - ItemUtils.getSimpleStack(CI.machineHull_LuV, 1 * (CORE.GTNH ? 2 : 1)), + ItemUtils.getSimpleStack((CORE.GTNH ? CI.machineHull_UV : CI.machineHull_LuV), 1 * (CORE.GTNH ? 2 : 1)), }, ALLOY.MARAGING350.getFluid(144 * 16 * (CORE.GTNH ? 2 : 1)), GregtechItemList.Casing_BedrockMiner.get(1), |