aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/core')
-rw-r--r--src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java8
-rw-r--r--src/Java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java18
-rw-r--r--src/Java/gtPlusPlus/core/common/CommonProxy.java9
-rw-r--r--src/Java/gtPlusPlus/core/item/ModItems.java26
-rw-r--r--src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java172
-rw-r--r--src/Java/gtPlusPlus/core/item/base/CoreItem.java2
-rw-r--r--src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java17
-rw-r--r--src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java4
-rw-r--r--src/Java/gtPlusPlus/core/lib/CORE.java256
-rw-r--r--src/Java/gtPlusPlus/core/material/ELEMENT.java5
-rw-r--r--src/Java/gtPlusPlus/core/material/Material.java436
-rw-r--r--src/Java/gtPlusPlus/core/material/ORES.java34
-rw-r--r--src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java8
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java29
-rw-r--r--src/Java/gtPlusPlus/core/util/PollutionUtils.java12
-rw-r--r--src/Java/gtPlusPlus/core/util/array/ArrayUtils.java6
-rw-r--r--src/Java/gtPlusPlus/core/util/fluid/FluidUtils.java7
-rw-r--r--src/Java/gtPlusPlus/core/util/input/KeyboardUtils.java23
-rw-r--r--src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java18
-rw-r--r--src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java4
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/block/DarkWorldContentLoader.java7
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Base.java7
22 files changed, 609 insertions, 499 deletions
diff --git a/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java b/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java
index 0bab9638e0..2bea09d806 100644
--- a/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java
+++ b/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java
@@ -11,10 +11,10 @@ import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.ITexturedTileEntity;
import gregtech.api.objects.GT_CopiedBlockTexture;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_OreDictUnificator;
+import gtPlusPlus.api.interfaces.ITexturedBlock;
import gtPlusPlus.core.client.renderer.CustomOreBlockRenderer;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.item.base.itemblock.ItemBlockOre;
@@ -31,10 +31,10 @@ import net.minecraft.init.Blocks;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
-public class BlockBaseOre extends BasicBlock implements ITexturedTileEntity {
+public class BlockBaseOre extends BasicBlock implements ITexturedBlock {
private final Material blockMaterial;
-
+
public BlockBaseOre(final Material material, final BlockTypes blockType, final int colour) {
super(Utils.sanitizeString(material.getUnlocalizedName()), net.minecraft.block.material.Material.rock);
this.blockMaterial = material;
@@ -96,7 +96,7 @@ public class BlockBaseOre extends BasicBlock implements ITexturedTileEntity {
public ITexture[] getTexture(Block block, byte side) {
if (this.blockMaterial != null){
- GT_RenderedTexture aIconSet = new GT_RenderedTexture(Materials.Iron.mIconSet.mTextures[OrePrefixes.ore.mTextureIndex], this.blockMaterial.getRGBA());
+ GT_RenderedTexture aIconSet = new GT_RenderedTexture(blockMaterial.getTextureSet().mTextures[OrePrefixes.ore.mTextureIndex], this.blockMaterial.getRGBA());
if (aIconSet != null){
//Logger.INFO("[Render] Good Overlay.");
return new ITexture[]{new GT_CopiedBlockTexture(Blocks.stone, 0, 0), aIconSet};
diff --git a/src/Java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java b/src/Java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java
index 0ebf3462c1..01d597df5e 100644
--- a/src/Java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java
+++ b/src/Java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java
@@ -5,7 +5,7 @@ import org.lwjgl.opengl.GL11;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import cpw.mods.fml.client.registry.RenderingRegistry;
import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.ITexturedTileEntity;
+import gtPlusPlus.api.interfaces.ITexturedBlock;
import gtPlusPlus.api.objects.Logger;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
@@ -29,8 +29,8 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler {
public boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer) {
Block tTileEntity = aBlock;
- if ((tTileEntity instanceof ITexturedTileEntity)) {
- return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer, new ITexture[][]{((ITexturedTileEntity) tTileEntity).getTexture((byte) 0), ((ITexturedTileEntity) tTileEntity).getTexture((byte) 1), ((ITexturedTileEntity) tTileEntity).getTexture((byte) 2), ((ITexturedTileEntity) tTileEntity).getTexture((byte) 3), ((ITexturedTileEntity) tTileEntity).getTexture((byte) 4), ((ITexturedTileEntity) tTileEntity).getTexture((byte) 5)});
+ if ((tTileEntity instanceof ITexturedBlock)) {
+ return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer, new ITexture[][]{((ITexturedBlock) tTileEntity).getTexture((byte) 0), ((ITexturedBlock) tTileEntity).getTexture((byte) 1), ((ITexturedBlock) tTileEntity).getTexture((byte) 2), ((ITexturedBlock) tTileEntity).getTexture((byte) 3), ((ITexturedBlock) tTileEntity).getTexture((byte) 4), ((ITexturedBlock) tTileEntity).getTexture((byte) 5)});
}
return false;
}
@@ -192,27 +192,27 @@ public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler {
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
Tessellator.instance.startDrawingQuads();
Tessellator.instance.setNormal(0.0F, -1.0F, 0.0F);
- renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedTileEntity) aBlock).getTexture((byte) 0), true);
+ renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 0), true);
Tessellator.instance.draw();
Tessellator.instance.startDrawingQuads();
Tessellator.instance.setNormal(0.0F, 1.0F, 0.0F);
- renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedTileEntity) aBlock).getTexture((byte) 1), true);
+ renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 1), true);
Tessellator.instance.draw();
Tessellator.instance.startDrawingQuads();
Tessellator.instance.setNormal(0.0F, 0.0F, -1.0F);
- renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedTileEntity) aBlock).getTexture((byte) 2), true);
+ renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 2), true);
Tessellator.instance.draw();
Tessellator.instance.startDrawingQuads();
Tessellator.instance.setNormal(0.0F, 0.0F, 1.0F);
- renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedTileEntity) aBlock).getTexture((byte) 3), true);
+ renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 3), true);
Tessellator.instance.draw();
Tessellator.instance.startDrawingQuads();
Tessellator.instance.setNormal(-1.0F, 0.0F, 0.0F);
- renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedTileEntity) aBlock).getTexture((byte) 4), true);
+ renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 4), true);
Tessellator.instance.draw();
Tessellator.instance.startDrawingQuads();
Tessellator.instance.setNormal(1.0F, 0.0F, 0.0F);
- renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedTileEntity) aBlock).getTexture((byte) 5), true);
+ renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, ((ITexturedBlock) aBlock).getTexture((byte) 5), true);
Tessellator.instance.draw();
aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
aRenderer.setRenderBoundsFromBlock(aBlock);
diff --git a/src/Java/gtPlusPlus/core/common/CommonProxy.java b/src/Java/gtPlusPlus/core/common/CommonProxy.java
index 532da59515..191f81cef5 100644
--- a/src/Java/gtPlusPlus/core/common/CommonProxy.java
+++ b/src/Java/gtPlusPlus/core/common/CommonProxy.java
@@ -73,6 +73,12 @@ public class CommonProxy {
registerTileEntities();
Logger.INFO("[Proxy] Calling Render registrator.");
registerRenderThings();
+
+ //Moved from Init after Debug Loading.
+ //29/01/18 - Alkalus
+ ModItems.init();
+ ModBlocks.init();
+ CI.Init();
}
@@ -82,9 +88,6 @@ public class CommonProxy {
if (CORE.DEBUG){
DEBUG_INIT.registerHandlers();
}
- ModItems.init();
- ModBlocks.init();
- CI.Init();
/**
* Register the Event Handlers.
diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java
index 97cf3310ea..98043d9775 100644
--- a/src/Java/gtPlusPlus/core/item/ModItems.java
+++ b/src/Java/gtPlusPlus/core/item/ModItems.java
@@ -274,7 +274,7 @@ public final class ModItems {
public static Item itemRope;
public static Item itemFiber;
-
+
public static Item itemDragonJar;
public static final void init(){
@@ -346,27 +346,27 @@ public final class ModItems {
try{
-
+
/**
* Try generate dusts for missing rare earth materials if they don't exist
*/
if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustGadolinium", 1) == null){
- ItemUtils.generateSpecialUseDusts("Gadolinium", "Gadolinium", Materials.Gadolinium.mElement.name(), Utils.rgbtoHexValue(226, 172, 9));
+ ItemUtils.generateSpecialUseDusts("Gadolinium", "Gadolinium", Materials.Gadolinium.mElement.name(), Utils.rgbtoHexValue(226, 172, 9));
}
if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustYtterbium", 1) == null){
- ItemUtils.generateSpecialUseDusts("Ytterbium", "Ytterbium", Materials.Ytterbium.mElement.name(), Utils.rgbtoHexValue(Materials.Yttrium.mRGBa[0]-60, Materials.Yttrium.mRGBa[1]-60, Materials.Yttrium.mRGBa[2]-60));
+ ItemUtils.generateSpecialUseDusts("Ytterbium", "Ytterbium", Materials.Ytterbium.mElement.name(), Utils.rgbtoHexValue(Materials.Yttrium.mRGBa[0]-60, Materials.Yttrium.mRGBa[1]-60, Materials.Yttrium.mRGBa[2]-60));
}
if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustSamarium", 1) == null){
- ItemUtils.generateSpecialUseDusts("Samarium", "Samarium", Materials.Samarium.mElement.name(), Utils.rgbtoHexValue(161, 168, 114));
+ ItemUtils.generateSpecialUseDusts("Samarium", "Samarium", Materials.Samarium.mElement.name(), Utils.rgbtoHexValue(161, 168, 114));
}
if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustLanthanum", 1) == null){
- ItemUtils.generateSpecialUseDusts("Lanthanum", "Lanthanum", Materials.Lanthanum.mElement.name(), Utils.rgbtoHexValue(106, 127, 163));
+ ItemUtils.generateSpecialUseDusts("Lanthanum", "Lanthanum", Materials.Lanthanum.mElement.name(), Utils.rgbtoHexValue(106, 127, 163));
}
/*if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustGadolinium", 1) == null){
ItemUtils.generateSpecialUseDusts("Gadolinium", "Gadolinium", "", Utils.rgbtoHexValue(Materials.Gadolinium.mRGBa[0], Materials.Gadolinium.mRGBa[1], Materials.Gadolinium.mRGBa[2]));
}*/
-
+
//Elements generate first so they can be used in compounds.
//Missing Elements
@@ -513,16 +513,18 @@ public final class ModItems {
MaterialGenerator.generate(ALLOY.HG1223, false, false);
//Generate Fictional Materials
- MaterialGenerator.generate(ELEMENT.getInstance().TRINIUM, false);
- MaterialGenerator.generate(ELEMENT.getInstance().TRINIUM_REFINED, false);
+ if (!CORE.GTNH) {
+ MaterialGenerator.generate(ELEMENT.getInstance().TRINIUM, false);
+ MaterialGenerator.generate(ELEMENT.getInstance().TRINIUM_REFINED, false);
+ }
MaterialGenerator.generate(ALLOY.TRINIUM_TITANIUM);
MaterialGenerator.generate(ALLOY.TRINIUM_NAQUADAH, false);
MaterialGenerator.generate(ALLOY.TRINIUM_NAQUADAH_CARBON);
//Must be the final Alloy to Generate
MaterialGenerator.generate(ALLOY.QUANTUM);
-
-
+
+
//Ores
MaterialGenerator.generateOreMaterial(FLUORIDES.FLUORITE);
GTplusplus_Secondary.GenerateOreMaterials();
@@ -692,7 +694,7 @@ public final class ModItems {
itemLavaFilter = new ItemLavaFilter();
itemGrindleTablet = new BaseItemGrindle();
-
+
itemDragonJar = new ItemEntityCatcher();
//Chemistry
diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java
index 235d50ae36..4e22fb959b 100644
--- a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java
+++ b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java
@@ -3,6 +3,9 @@ package gtPlusPlus.core.item.base;
import java.util.List;
import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.enums.TextureSet;
import gregtech.api.util.GT_OreDictUnificator;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.lib.CORE;
@@ -10,13 +13,16 @@ import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.material.state.MaterialState;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.entity.EntityUtils;
+import gtPlusPlus.core.util.input.KeyboardUtils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.math.MathUtils;
+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{
@@ -28,6 +34,9 @@ public class BaseItemComponent extends Item{
public final int componentColour;
public Object extraData;
+ protected IIcon base;
+ protected IIcon overlay;
+
public BaseItemComponent(final Material material, final ComponentTypes componentType) {
this.componentMaterial = material;
this.unlocalName = "item"+componentType.COMPONENT_NAME+material.getUnlocalizedName();
@@ -36,7 +45,7 @@ public class BaseItemComponent extends Item{
this.setCreativeTab(AddToCreativeTab.tabMisc);
this.setUnlocalizedName(this.unlocalName);
this.setMaxStackSize(64);
- this.setTextureName(this.getCorrectTextures());
+ //this.setTextureName(this.getCorrectTextures());
this.componentColour = material.getRgbAsHex();
GameRegistry.registerItem(this, this.unlocalName);
GT_OreDictUnificator.registerOre(componentType.getOreDictName()+material.getUnlocalizedName(), ItemUtils.getSimpleStack(this));
@@ -62,46 +71,19 @@ public class BaseItemComponent extends Item{
if (!CORE.ConfigSwitches.useGregtechTextures){
return CORE.MODID + ":" + "item"+this.componentType.COMPONENT_NAME;
}
- if (this.componentType == ComponentTypes.GEAR){
- return "gregtech" + ":" + "materialicons/METALLIC/" + "gearGt";
- }
- else if (this.componentType == ComponentTypes.SMALLGEAR){
- return "gregtech" + ":" + "materialicons/METALLIC/" + "gearGtSmall";
- }
- else if (this.componentType == ComponentTypes.ROD){
- return "gregtech" + ":" + "materialicons/METALLIC/" + "stick";
- }
- else if (this.componentType == ComponentTypes.RODLONG){
- return "gregtech" + ":" + "materialicons/METALLIC/" + "stickLong";
- }
- else if (this.componentType == ComponentTypes.PLATEDOUBLE){
- return "gregtech" + ":" + "materialicons/METALLIC/" + "plateDouble";
- }
- else if (this.componentType == ComponentTypes.CELL){
- return "gregtech" + ":" + "materialicons/METALLIC/" + "cell";
- }
- else if (this.componentType == ComponentTypes.PLASMACELL){
- return "gregtech" + ":" + "materialicons/METALLIC/" + "cellPlasma";
- }
- else if (this.componentType == ComponentTypes.BOLT){
- return "gregtech" + ":" + "materialicons/METALLIC/" + "bolt";
- }
- else if (this.componentType == ComponentTypes.RING){
- return "gregtech" + ":" + "materialicons/METALLIC/" + "ring";
- }
- else if (this.componentType == ComponentTypes.ROTOR){
- return "gregtech" + ":" + "materialicons/METALLIC/" + "rotor";
- }
- else if (this.componentType == ComponentTypes.SCREW){
- return "gregtech" + ":" + "materialicons/METALLIC/" + "screw";
- }
- else if (this.componentType == ComponentTypes.INGOT){
- return "gregtech" + ":" + "materialicons/METALLIC/" + "ingot";
- }
- else if (this.componentType == ComponentTypes.HOTINGOT){
- return "gregtech" + ":" + "materialicons/METALLIC/" + "ingotHot";
- }
- return "gregtech" + ":" + "materialicons/METALLIC/" + this.componentType.COMPONENT_NAME.toLowerCase();
+ String metType = "9j4852jyo3rjmh3owlhw9oe";
+ if (this.componentMaterial != null) {
+ TextureSet u = this.componentMaterial.getTextureSet();
+ if (u != null) {
+ metType = u.mSetName;
+ }
+ }
+ metType = (metType.equals("9j4852jyo3rjmh3owlhw9oe") ? "METALLIC" : metType);
+ return "gregtech" + ":" + "materialicons/"+metType+"/" + this.componentType.getOreDictName();
+
+
+
+ //return "gregtech" + ":" + "materialicons/"+metType+"/" + this.componentType.COMPONENT_NAME.toLowerCase();
}
@Override
@@ -128,42 +110,6 @@ public class BaseItemComponent extends Item{
if ((this.materialName != null) && (this.materialName != "") && !this.materialName.equals("") && (this.componentMaterial != null)){
- if (this.componentType == ComponentTypes.DUST){
- //list.add(EnumChatFormatting.GRAY+"A pile of " + materialName + " dust.");
- }
- if (this.componentType == ComponentTypes.INGOT){
- //list.add(EnumChatFormatting.GRAY+"A solid ingot of " + materialName + ".");
- if ((this.materialName != null) && (this.materialName != "") && !this.materialName.equals("") && this.unlocalName.toLowerCase().contains("ingothot")){
- list.add(EnumChatFormatting.GRAY+"Warning: "+EnumChatFormatting.RED+"Very hot! "+EnumChatFormatting.GRAY+" Avoid direct handling..");
- }
- }
- if (this.componentType == ComponentTypes.PLATE){
- //list.add(EnumChatFormatting.GRAY+"A flat plate of " + materialName + ".");
- }
- if (this.componentType == ComponentTypes.PLATEDOUBLE){
- //list.add(EnumChatFormatting.GRAY+"A double plate of " + materialName + ".");
- }
- if (this.componentType == ComponentTypes.ROD){
- //list.add(EnumChatFormatting.GRAY+"A 40cm Rod of " + materialName + ".");
- }
- if (this.componentType == ComponentTypes.RODLONG){
- //list.add(EnumChatFormatting.GRAY+"A 80cm Rod of " + materialName + ".");
- }
- if (this.componentType == ComponentTypes.ROTOR){
- //list.add(EnumChatFormatting.GRAY+"A Rotor made out of " + materialName + ". ");
- }
- if (this.componentType == ComponentTypes.BOLT){
- //list.add(EnumChatFormatting.GRAY+"A small Bolt, constructed from " + materialName + ".");
- }
- if (this.componentType == ComponentTypes.SCREW){
- //list.add(EnumChatFormatting.GRAY+"A 8mm Screw, fabricated out of some " + materialName + ".");
- }
- if (this.componentType == ComponentTypes.GEAR){
- //list.add(EnumChatFormatting.GRAY+"A large Gear, constructed from " + materialName + ".");
- }
- if (this.componentType == ComponentTypes.RING){
- //list.add(EnumChatFormatting.GRAY+"A " + materialName + " Ring.");
- }
if (this.componentMaterial != null){
if (!this.componentMaterial.vChemicalFormula.equals("??") && !this.componentMaterial.vChemicalFormula.equals("?") && this.componentMaterial.getState() != MaterialState.PURE_LIQUID) {
list.add(Utils.sanitizeStringKeepBrackets(this.componentMaterial.vChemicalFormula));
@@ -172,19 +118,33 @@ public class BaseItemComponent extends Item{
if (this.componentMaterial.isRadioactive){
list.add(CORE.GT_Tooltip_Radioactive);
}
+
+ if (this.componentType == ComponentTypes.INGOT){
+ if ((this.materialName != null) && (this.materialName != "") && !this.materialName.equals("") && this.unlocalName.toLowerCase().contains("ingothot")){
+ list.add(EnumChatFormatting.GRAY+"Warning: "+EnumChatFormatting.RED+"Very hot! "+EnumChatFormatting.GRAY+" Avoid direct handling..");
+ }
+ }
+ }
+
+ //Hidden Tooltip
+ if (KeyboardUtils.isCtrlKeyDown()) {
+ if (this.componentMaterial != null) {
+ String type = this.componentMaterial.getTextureSet().mSetName;
+ String output = type.substring(0, 1).toUpperCase() + type.substring(1);
+ list.add(EnumChatFormatting.GRAY+"Material Type: "+output+".");
+ list.add(EnumChatFormatting.GRAY+"Material State: "+this.componentMaterial.getState().name()+".");
+ list.add(EnumChatFormatting.GRAY+"Radioactivity Level: "+this.componentMaterial.vRadiationLevel+".");
+ }
}
+ else {
+ list.add(EnumChatFormatting.DARK_GRAY+"Hold Ctrl to show additional info.");
+ }
}
super.addInformation(stack, aPlayer, list, bool);
}
-
- @Override
- public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) {
- return this.componentColour;
- }
-
@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){
@@ -197,8 +157,52 @@ public class BaseItemComponent extends Item{
}
+ /**
+ *
+ * Handle Custom Rendering
+ *
+ */
+ @Override
+ @SideOnly(Side.CLIENT)
+ public boolean requiresMultipleRenderPasses(){
+ return (CORE.ConfigSwitches.useGregtechTextures ? true : false);
+ }
+ @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);
+ }
+ return this.componentColour;
+ }
+
+ @Override
+ public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) {
+ if (CORE.ConfigSwitches.useGregtechTextures) {
+ if(pass == 0) {
+ return this.base;
+ }
+ return this.overlay;
+ }
+ return this.base;
+ }
+
+ @Override
+ public void registerIcons(final IIconRegister i) {
+
+ if (CORE.ConfigSwitches.useGregtechTextures){
+ this.base = i.registerIcon(getCorrectTextures());
+ this.overlay = i.registerIcon(getCorrectTextures() + "_OVERLAY");
+ }
+ else {
+ this.base = i.registerIcon(getCorrectTextures());
+ //this.overlay = i.registerIcon(getCorrectTextures() + "_OVERLAY");
+ }
+ }
@@ -211,7 +215,7 @@ public class BaseItemComponent extends Item{
PLATEDOUBLE("PlateDouble", " Double Plate", "plateDouble"),
ROD("Rod", " Rod", "stick"),
RODLONG("RodLong", " Long Rod", "stickLong"),
- GEAR("Gear", " Gear", "gear"),
+ GEAR("Gear", " Gear", "gearGt"),
SMALLGEAR("SmallGear", " Gear", "gearGtSmall"), //TODO
SCREW("Screw", " Screw", "screw"),
BOLT("Bolt", " Bolt", "bolt"),
diff --git a/src/Java/gtPlusPlus/core/item/base/CoreItem.java b/src/Java/gtPlusPlus/core/item/base/CoreItem.java
index 8baf909af7..3b0fa7b621 100644
--- a/src/Java/gtPlusPlus/core/item/base/CoreItem.java
+++ b/src/Java/gtPlusPlus/core/item/base/CoreItem.java
@@ -155,7 +155,7 @@ public class CoreItem extends Item
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
- list.add(this.descColour+this.itemDescription);
+ //list.add(this.descColour+this.itemDescription);
//super.addInformation(stack, aPlayer, list, bool);
}
diff --git a/src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java b/src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java
index f2228afb78..275e7bbb3a 100644
--- a/src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java
+++ b/src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java
@@ -17,8 +17,6 @@ import net.minecraftforge.fluids.FluidContainerRegistry;
public class BaseItemCell extends BaseItemComponent{
- private IIcon base;
- private IIcon overlay;
ComponentTypes Cell = ComponentTypes.CELL;
public BaseItemCell(final Material material) {
@@ -40,12 +38,6 @@ public class BaseItemCell extends BaseItemComponent{
}
@Override
- @SideOnly(Side.CLIENT)
- public boolean requiresMultipleRenderPasses(){
- return true;
- }
-
- @Override
public void registerIcons(final IIconRegister i) {
if (CORE.ConfigSwitches.useGregtechTextures){
@@ -73,13 +65,4 @@ public class BaseItemCell extends BaseItemComponent{
return this.componentColour;
}
-
- @Override
- public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) {
- if(pass == 0) {
- return this.base;
- }
- return this.overlay;
- }
-
}
diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java
index 8a72b4d629..4e868e5ecd 100644
--- a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java
+++ b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java
@@ -58,10 +58,10 @@ public class ItemBlockOre extends ItemBlock{
* Tooltip Handler for Ores
*/
if (this.mThisMaterial == FLUORIDES.FLUORITE){
- list.add("Mined from Sandstone and Limestone.");
+ list.add("Mined from Sandstone with a 1/"+CORE.ConfigSwitches.chanceToDropFluoriteOre+" chance, or Limestone with a 1/"+(CORE.ConfigSwitches.chanceToDropFluoriteOre*20)+" chance.");
}
else if (this.mThisMaterial != FLUORIDES.FLUORITE){
- list.add("Mined from the Dark Dimension.");
+ list.add("Mined from the Toxic Everglades.");
}
super.addInformation(stack, aPlayer, list, bool);
}
diff --git a/src/Java/gtPlusPlus/core/lib/CORE.java b/src/Java/gtPlusPlus/core/lib/CORE.java
index a681baaa98..d81e6fd280 100644
--- a/src/Java/gtPlusPlus/core/lib/CORE.java
+++ b/src/Java/gtPlusPlus/core/lib/CORE.java
@@ -76,146 +76,152 @@ public class CORE {
public static boolean BRC = false;
-
+
/**
* Lists/Maps
*/
- //Burnables List
- public static List<Pair<Integer, ItemStack>> burnables = new ArrayList<Pair<Integer, ItemStack>>();
+ //Burnables List
+ public static List<Pair<Integer, ItemStack>> burnables = new ArrayList<Pair<Integer, ItemStack>>();
+
+
+ //TesseractMapss
+ public static final Map<UUID, Map<Integer, GT_MetaTileEntity_TesseractGenerator>> sTesseractGeneratorOwnershipMap = new HashMap<UUID, Map<Integer, GT_MetaTileEntity_TesseractGenerator>>();
+ public static final Map<UUID, Map<Integer, GT_MetaTileEntity_TesseractTerminal>> sTesseractTerminalOwnershipMap = new HashMap<UUID, Map<Integer, GT_MetaTileEntity_TesseractTerminal>>();
+ //BookMap
+ public static final Map<String, ItemStack> sBookList = new ConcurrentHashMap<String, ItemStack>();
- //TesseractMapss
- public static final Map<UUID, Map<Integer, GT_MetaTileEntity_TesseractGenerator>> sTesseractGeneratorOwnershipMap = new HashMap<UUID, Map<Integer, GT_MetaTileEntity_TesseractGenerator>>();
- public static final Map<UUID, Map<Integer, GT_MetaTileEntity_TesseractTerminal>> sTesseractTerminalOwnershipMap = new HashMap<UUID, Map<Integer, GT_MetaTileEntity_TesseractTerminal>>();
- //BookMap
- public static final Map<String, ItemStack> sBookList = new ConcurrentHashMap<String, ItemStack>();
-
-
/**
* Some Gregtech Material and Recipe Variables
*/
-
- @Deprecated
- public static IGregtech_RecipeAdder sRecipeAdder;
- public static GregtechRecipe GT_Recipe = new GregtechRecipe();
- public static final GT_Materials[] sMU_GeneratedMaterials = new GT_Materials[1000];
-
- /**
- * File Paths and Resource Paths
- */
-
- public static final String
- TEX_DIR = "textures/",
- TEX_DIR_GUI = TEX_DIR + "gui/",
- TEX_DIR_ITEM = TEX_DIR + "items/",
- TEX_DIR_BLOCK = TEX_DIR + "blocks/",
- TEX_DIR_ENTITY = TEX_DIR + "entity/",
- TEX_DIR_ASPECTS = TEX_DIR + "aspects/",
- TEX_DIR_FLUIDS = TEX_DIR_BLOCK + "fluids/",
- RES_PATH = MODID + ":" + TEX_DIR,
- RES_PATH_GUI = MODID + ":" + TEX_DIR_GUI,
- RES_PATH_ITEM = MODID + ":" + TEX_DIR_ITEM,
- RES_PATH_BLOCK = MODID + ":" + TEX_DIR_BLOCK,
- RES_PATH_ENTITY = MODID + ":" + TEX_DIR_ENTITY,
- RES_PATH_ASPECTS = MODID + ":" + TEX_DIR_ASPECTS,
- RES_PATH_FLUIDS = MODID + ":" + TEX_DIR_FLUIDS;
-
-
-
-
-
-
-
-
-
-
-
- /*
- * Config Switch Class
- */
-
- public static class ConfigSwitches {
-
- //Updates
- public static boolean enableUpdateChecker = true;
-
- //Debug
- public static boolean disableEnderIOIntegration = false;
- public static boolean MACHINE_INFO = true;
- public static boolean showHiddenNEIItems = false;
-
- //Tools
- public static boolean enableSkookumChoochers = true;
- public static boolean enableMultiSizeTools = true;
-
- //Block Drops
- public static int chanceToDropDrainedShard = 196;
- public static int chanceToDropFluoriteOre = 32;
-
- //Machine Related
- public static boolean enableAlternativeBatteryAlloy = false;
- public static boolean enableThaumcraftShardUnification = false;
- public static boolean disableIC2Recipes = false;
- public static boolean enableAlternativeDivisionSigilRecipe = false;
- public static int boilerSteamPerSecond = 750;
-
- //Feature Related
- public static boolean enableCustomCapes = false;
- public static boolean enableCustomCircuits = true;
- public static boolean enableOldGTcircuits = false;
- public static boolean disableZombieReinforcement = false;
-
- //GT Fixes
- public static boolean enableNitroFix = false;
-
- //Single Block Machines
- public static boolean enableMachine_SolarGenerators = false;
- public static boolean enableMachine_Safes = true;
- public static boolean enableMachine_Dehydrators = true;
- public static boolean enableMachine_SteamConverter = true;
- public static boolean enableMachine_FluidTanks = true;
- public static boolean enableMachine_RocketEngines = true;
- public static boolean enableMachine_GeothermalEngines = true;
- public static boolean enableMachine_WorldAccelerators = true;
- public static boolean enableMachine_Tesseracts = true;
- public static boolean enableMachine_SimpleWasher = true;
- public static boolean enableMachine_Pollution = true;
- public static boolean enableCustom_Pipes = true;
- public static boolean enableCustom_Cables = true;
-
- //Multiblocks
- public static boolean enableMultiblock_AlloyBlastSmelter = true;
- public static boolean enableMultiblock_IndustrialCentrifuge = true;
- public static boolean enableMultiblock_IndustrialCokeOven = true;
- public static boolean enableMultiblock_IndustrialElectrolyzer = true;
- public static boolean enableMultiblock_IndustrialMacerationStack = true;
- public static boolean enableMultiblock_IndustrialPlatePress = true;
- public static boolean enableMultiblock_IndustrialWireMill = true;
- public static boolean enableMultiblock_IronBlastFurnace = true;
- public static boolean enableMultiblock_MatterFabricator = true;
- public static boolean enableMultiblock_MultiTank = true;
- public static boolean enableMultiblock_PowerSubstation = true;
- public static boolean enableMultiblock_LiquidFluorideThoriumReactor = true;
- public static boolean enableMultiblock_NuclearFuelRefinery = true;
- public static boolean enableMultiblock_TreeFarmer = true;
- public static boolean enableMultiblock_IndustrialSifter = true;
- public static boolean enableMultiblock_IndustrialThermalCentrifuge = true;
- public static boolean enableMultiblock_IndustrialWashPlant = true;
- public static boolean enableMultiblock_LargeAutoCrafter = true;
- public static boolean enableMultiblock_ThermalBoiler = true;
- public static boolean enableMultiblock_IndustrialCuttingMachine = true;
-
- //Visuals
- public static boolean enableTreeFarmerParticles = true;
- public static boolean useGregtechTextures = true;
+
+ @Deprecated
+ public static IGregtech_RecipeAdder sRecipeAdder;
+ public static GregtechRecipe GT_Recipe = new GregtechRecipe();
+ public static final GT_Materials[] sMU_GeneratedMaterials = new GT_Materials[1000];
+
+ /**
+ * File Paths and Resource Paths
+ */
+
+ public static final String
+ TEX_DIR = "textures/",
+ TEX_DIR_GUI = TEX_DIR + "gui/",
+ TEX_DIR_ITEM = TEX_DIR + "items/",
+ TEX_DIR_BLOCK = TEX_DIR + "blocks/",
+ TEX_DIR_ENTITY = TEX_DIR + "entity/",
+ TEX_DIR_ASPECTS = TEX_DIR + "aspects/",
+ TEX_DIR_FLUIDS = TEX_DIR_BLOCK + "fluids/",
+ RES_PATH = MODID + ":" + TEX_DIR,
+ RES_PATH_GUI = MODID + ":" + TEX_DIR_GUI,
+ RES_PATH_ITEM = MODID + ":" + TEX_DIR_ITEM,
+ RES_PATH_BLOCK = MODID + ":" + TEX_DIR_BLOCK,
+ RES_PATH_ENTITY = MODID + ":" + TEX_DIR_ENTITY,
+ RES_PATH_ASPECTS = MODID + ":" + TEX_DIR_ASPECTS,
+ RES_PATH_FLUIDS = MODID + ":" + TEX_DIR_FLUIDS;
+
- }
+
+
+
+
+
+
+ /*
+ * Config Switch Class
+ */
+
+ public static class ConfigSwitches {
+
+ //Updates
+ public static boolean enableUpdateChecker = true;
+
+ //Debug
+ public static boolean disableEnderIOIntegration = false;
+ public static boolean MACHINE_INFO = true;
+ public static boolean showHiddenNEIItems = false;
+
+ //Tools
+ public static boolean enableSkookumChoochers = true;
+ public static boolean enableMultiSizeTools = true;
+
+ //Block Drops
+ public static int chanceToDropDrainedShard = 196;
+ public static int chanceToDropFluoriteOre = 32;
+
+ //Machine Related
+ public static boolean enableAlternativeBatteryAlloy = false;
+ public static boolean enableThaumcraftShardUnification = false;
+ public static boolean disableIC2Recipes = false;
+ public static boolean enableAlternativeDivisionSigilRecipe = false;
+ public static int boilerSteamPerSecond = 750;
+
+ //Feature Related
+ public static boolean enableCustomCapes = false;
+ public static boolean enableCustomCircuits = true;
+ public static boolean enableOldGTcircuits = false;
+ public static boolean disableZombieReinforcement = false;
+
+ //GT Fixes
+ public static boolean enableNitroFix = false;
+
+ //Single Block Machines
+ public static boolean enableMachine_SolarGenerators = false;
+ public static boolean enableMachine_Safes = true;
+ public static boolean enableMachine_Dehydrators = true;
+ public static boolean enableMachine_SteamConverter = true;
+ public static boolean enableMachine_FluidTanks = true;
+ public static boolean enableMachine_RocketEngines = true;
+ public static boolean enableMachine_GeothermalEngines = true;
+ public static boolean enableMachine_WorldAccelerators = true;
+ public static boolean enableMachine_Tesseracts = true;
+ public static boolean enableMachine_SimpleWasher = true;
+ public static boolean enableMachine_Pollution = true;
+ public static boolean enableCustom_Pipes = true;
+ public static boolean enableCustom_Cables = true;
+
+ //Multiblocks
+ public static boolean enableMultiblock_AlloyBlastSmelter = true;
+ public static boolean enableMultiblock_IndustrialCentrifuge = true;
+ public static boolean enableMultiblock_IndustrialCokeOven = true;
+ public static boolean enableMultiblock_IndustrialElectrolyzer = true;
+ public static boolean enableMultiblock_IndustrialMacerationStack = true;
+ public static boolean enableMultiblock_IndustrialPlatePress = true;
+ public static boolean enableMultiblock_IndustrialWireMill = true;
+ public static boolean enableMultiblock_IronBlastFurnace = true;
+ public static boolean enableMultiblock_MatterFabricator = true;
+ public static boolean enableMultiblock_MultiTank = true;
+ public static boolean enableMultiblock_PowerSubstation = true;
+ public static boolean enableMultiblock_LiquidFluorideThoriumReactor = true;
+ public static boolean enableMultiblock_NuclearFuelRefinery = true;
+ public static boolean enableMultiblock_TreeFarmer = true;
+ public static boolean enableMultiblock_IndustrialSifter = true;
+ public static boolean enableMultiblock_IndustrialThermalCentrifuge = true;
+ public static boolean enableMultiblock_IndustrialWashPlant = true;
+ public static boolean enableMultiblock_LargeAutoCrafter = true;
+ public static boolean enableMultiblock_ThermalBoiler = true;
+ public static boolean enableMultiblock_IndustrialCuttingMachine = true;
+
+ //Visuals
+ public static boolean enableTreeFarmerParticles = true;
+ public static boolean useGregtechTextures = true;
+
+
+
+
+ }
+
+ public static class Everglades{
+ public static final String MODID = "ToxicEverglades";
+ public static final String NAME = "GT++ Toxic Everglades";
+ public static final String VERSION = "0.1";
+ }
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/material/ELEMENT.java b/src/Java/gtPlusPlus/core/material/ELEMENT.java
index f98eb3552e..8d5e3c2a76 100644
--- a/src/Java/gtPlusPlus/core/material/ELEMENT.java
+++ b/src/Java/gtPlusPlus/core/material/ELEMENT.java
@@ -1,6 +1,7 @@
package gtPlusPlus.core.material;
import gregtech.api.enums.Materials;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.material.state.MaterialState;
import gtPlusPlus.core.util.StringUtils;
@@ -9,6 +10,10 @@ import gtPlusPlus.core.util.materials.MaterialUtils;
public final class ELEMENT {
private static final ELEMENT thisClass = new ELEMENT();
+
+ static {
+ Logger.MATERIALS("Initialising Base Elements.");
+ }
public ELEMENT(){
diff --git a/src/Java/gtPlusPlus/core/material/Material.java b/src/Java/gtPlusPlus/core/material/Material.java
index 0f90d61312..eb20e831ac 100644
--- a/src/Java/gtPlusPlus/core/material/Material.java
+++ b/src/Java/gtPlusPlus/core/material/Material.java
@@ -3,6 +3,7 @@ package gtPlusPlus.core.material;
import static gregtech.api.enums.GT_Values.M;
import java.util.*;
+import java.util.Map.Entry;
import gregtech.api.enums.*;
import gtPlusPlus.api.objects.Logger;
@@ -10,6 +11,9 @@ import gtPlusPlus.core.item.base.cell.BaseItemCell;
import gtPlusPlus.core.material.state.MaterialState;
import gtPlusPlus.core.util.StringUtils;
import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.array.ArrayUtils;
+import gtPlusPlus.core.util.array.AutoMap;
+import gtPlusPlus.core.util.array.Pair;
import gtPlusPlus.core.util.fluid.FluidUtils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.materials.MaterialUtils;
@@ -20,6 +24,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
+import scala.xml.dtd.ELEMENTS;
public class Material {
@@ -27,6 +32,11 @@ public class Material {
private String localizedName;
private MaterialState materialState;
+ private TextureSet textureSet;
+
+ public synchronized final TextureSet getTextureSet() {
+ return textureSet;
+ }
private Fluid vMoltenFluid;
private Fluid vPlasma;
@@ -66,19 +76,23 @@ public class Material {
public static Map<Integer, Materials> invalidMaterials = new HashMap<Integer, Materials>();
public Material(String materialName, MaterialState defaultState, short[] rgba, int radiationLevel, MaterialStack[] materialStacks) {
- this (materialName, defaultState, 0, rgba, -1, -1, -1, -1, false, "", radiationLevel, false, materialStacks);
+ this(materialName, defaultState, null, 0, rgba, -1, -1, -1, -1, false, "", radiationLevel, false, materialStacks);
}
public Material(String materialName, MaterialState defaultState, short[] rgba, int j, int k, int l, int m, int radiationLevel, MaterialStack[] materialStacks){
- this (materialName, defaultState, 0, rgba, j, k, l, m, false, "", radiationLevel, false, materialStacks);
+ this(materialName, defaultState, null, 0, rgba, j, k, l, m, false, "", radiationLevel, false, materialStacks);
}
+ public Material(String materialName, MaterialState defaultState, final TextureSet set, short[] rgba, int j, int k, int l, int m, int radiationLevel, MaterialStack[] materialStacks){
+ this(materialName, defaultState, set, 0, rgba, j, k, l, m, false, "", radiationLevel, false, materialStacks);
+ }
+
public Material(final String materialName, final MaterialState defaultState,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final MaterialStack... inputs){
this(materialName, defaultState, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, "", 0, inputs);
}
- public Material(final String materialName, final MaterialState defaultState,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, boolean generateCells, final MaterialStack... inputs){
- this(materialName, defaultState, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, "", 0, generateCells, inputs);
+ public Material(final String materialName, final MaterialState defaultState, final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, boolean generateCells, final MaterialStack... inputs){
+ this(materialName, defaultState, null, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, "", 0, generateCells, inputs);
}
public Material(final String materialName, final MaterialState defaultState,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final int radiationLevel, final MaterialStack... inputs){
@@ -94,229 +108,256 @@ public class Material {
}
public Material(final String materialName, final MaterialState defaultState,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final String chemicalSymbol, final int radiationLevel, boolean addCells,final MaterialStack... inputs) {
- this (materialName, defaultState, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, chemicalSymbol, radiationLevel, addCells, inputs);
+ this (materialName, defaultState, null, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, chemicalSymbol, radiationLevel, addCells, inputs);
}
public Material(final String materialName, final MaterialState defaultState, final long durability, final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final String chemicalSymbol, final int radiationLevel, final MaterialStack... inputs){
- this (materialName, defaultState, durability, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, chemicalSymbol, radiationLevel, true, inputs);
+ this (materialName, defaultState, null, durability, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, chemicalSymbol, radiationLevel, true, inputs);
}
- public Material(final String materialName, final MaterialState defaultState, final long durability, final 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, final MaterialStack... inputs){
+ public Material(final String materialName, final MaterialState defaultState, final TextureSet set, final long durability, final 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, final MaterialStack... inputs){
try {
- this.unlocalizedName = Utils.sanitizeString(materialName);
- this.localizedName = materialName;
-
- this.materialState = defaultState;
- Logger.MATERIALS(this.getLocalizedName()+" is "+defaultState.name()+".");
-
- this.RGBA = rgba;
- this.vGenerateCells = generateCells;
-
- //Add Components to an array.
- if (inputs == null){
- this.vMaterialInput = null;
- }
- else {
- if (inputs.length != 0){
- for (int i=0; i < inputs.length; i++){
- if (inputs[i] != null){
- this.vMaterialInput.add(i, inputs[i]);
+ this.unlocalizedName = Utils.sanitizeString(materialName);
+ this.localizedName = materialName;
+
+ this.materialState = defaultState;
+
+ Logger.MATERIALS(this.getLocalizedName()+" is "+defaultState.name()+".");
+
+ this.RGBA = rgba;
+ this.vGenerateCells = generateCells;
+
+ //Add Components to an array.
+ if (inputs == null){
+ this.vMaterialInput = null;
+ }
+ else {
+ if (inputs.length != 0){
+ for (int i=0; i < inputs.length; i++){
+ if (inputs[i] != null){
+ this.vMaterialInput.add(i, inputs[i]);
+ }
}
}
}
- }
+ this.textureSet = setTextureSet(set);
- //Set Melting/Boiling point, if value is -1 calculate it from compound inputs.
- if (meltingPoint != -1){
- this.meltingPointC = meltingPoint;
- }
- else {
- this.meltingPointC = this.calculateMeltingPoint();
- }
- if (boilingPoint != -1){
- if (boilingPoint != 0){
- this.boilingPointC = boilingPoint;
+ //Set Melting/Boiling point, if value is -1 calculate it from compound inputs.
+ if (meltingPoint != -1){
+ this.meltingPointC = meltingPoint;
}
else {
- this.boilingPointC = meltingPoint*4;
+ this.meltingPointC = this.calculateMeltingPoint();
+ }
+ if (boilingPoint != -1){
+ if (boilingPoint != 0){
+ this.boilingPointC = boilingPoint;
+ }
+ else {
+ this.boilingPointC = meltingPoint*4;
+ }
+ }
+ else {
+ this.boilingPointC = this.calculateMeltingPoint();
}
- }
- else {
- this.boilingPointC = this.calculateMeltingPoint();
- }
- this.meltingPointK = (int) MathUtils.celsiusToKelvin(this.meltingPointC);
- this.boilingPointK = (int) MathUtils.celsiusToKelvin(this.boilingPointC);
+ this.meltingPointK = (int) MathUtils.celsiusToKelvin(this.meltingPointC);
+ this.boilingPointK = (int) MathUtils.celsiusToKelvin(this.boilingPointC);
- //Set Proton/Neutron count, if value is -1 calculate it from compound inputs.
- if (protons != -1){
- this.vProtons = protons;
- }
- else {
- this.vProtons = this.calculateProtons();
- }
- if (boilingPoint != -1){
- this.vNeutrons = neutrons;
- }
- else {
- this.vNeutrons = this.calculateNeutrons();
- }
+ //Set Proton/Neutron count, if value is -1 calculate it from compound inputs.
+ if (protons != -1){
+ this.vProtons = protons;
+ }
+ else {
+ this.vProtons = this.calculateProtons();
+ }
+ if (boilingPoint != -1){
+ this.vNeutrons = neutrons;
+ }
+ else {
+ this.vNeutrons = this.calculateNeutrons();
+ }
- this.vMass = this.getMass();
+ this.vMass = this.getMass();
- //Sets tool Durability
- if (durability != 0){
- this.vDurability = durability;
- }
- else {
- if (inputs != null){
- long durabilityTemp = 0;
- int counterTemp = 0;
- for (final MaterialStack m : inputs){
- if (m.getStackMaterial() != null){
- if (m.getStackMaterial().vDurability != 0){
- durabilityTemp = (durabilityTemp+m.getStackMaterial().vDurability);
- counterTemp++;
+ //Sets tool Durability
+ if (durability != 0){
+ this.vDurability = durability;
+ }
+ else {
+ if (inputs != null){
+ long durabilityTemp = 0;
+ int counterTemp = 0;
+ for (final MaterialStack m : inputs){
+ if (m.getStackMaterial() != null){
+ if (m.getStackMaterial().vDurability != 0){
+ durabilityTemp = (durabilityTemp+m.getStackMaterial().vDurability);
+ counterTemp++;
+ }
}
}
- }
- if ((durabilityTemp != 0) && (counterTemp != 0)){
- this.vDurability = (durabilityTemp/counterTemp);
+ if ((durabilityTemp != 0) && (counterTemp != 0)){
+ this.vDurability = (durabilityTemp/counterTemp);
+ }
+ else {
+ this.vDurability = 8196;
+ }
}
else {
- this.vDurability = 8196;
+ this.vDurability = 0;
}
}
+
+ if ((this.vDurability >= 0) && (this.vDurability < 64000)){
+ this.vToolQuality = 1;
+ this.vHarvestLevel = 2;
+ }
+ else if ((this.vDurability >= 64000) && (this.vDurability < 128000)){
+ this.vToolQuality = 2;
+ this.vHarvestLevel = 2;
+ }
+ else if ((this.vDurability >= 128000) && (this.vDurability < 256000)){
+ this.vToolQuality = 3;
+ this.vHarvestLevel = 2;
+ }
+ else if ((this.vDurability >= 256000) && (this.vDurability < 512000)){
+ this.vToolQuality = 3;
+ this.vHarvestLevel = 3;
+ }
+ else if ((this.vDurability >= 512000) && (this.vDurability <= Integer.MAX_VALUE)){
+ this.vToolQuality = 4;
+ this.vHarvestLevel = 4;
+ }
else {
- this.vDurability = 0;
+ this.vToolQuality = 0;
+ this.vHarvestLevel = 0;
}
- }
- if ((this.vDurability >= 0) && (this.vDurability < 64000)){
- this.vToolQuality = 1;
- this.vHarvestLevel = 2;
- }
- else if ((this.vDurability >= 64000) && (this.vDurability < 128000)){
- this.vToolQuality = 2;
- this.vHarvestLevel = 2;
- }
- else if ((this.vDurability >= 128000) && (this.vDurability < 256000)){
- this.vToolQuality = 3;
- this.vHarvestLevel = 2;
- }
- else if ((this.vDurability >= 256000) && (this.vDurability < 512000)){
- this.vToolQuality = 3;
- this.vHarvestLevel = 3;
- }
- else if ((this.vDurability >= 512000) && (this.vDurability <= Integer.MAX_VALUE)){
- this.vToolQuality = 4;
- this.vHarvestLevel = 4;
- }
- else {
- this.vToolQuality = 0;
- this.vHarvestLevel = 0;
- }
-
- //Sets the Rad level
- if (radiationLevel > 0){
- Logger.MATERIALS(this.getLocalizedName()+" is radioactive. Level: "+radiationLevel+".");
- this.isRadioactive = true;
- this.vRadiationLevel = (byte) radiationLevel;
- }
- else {
- Logger.MATERIALS(this.getLocalizedName()+" is not radioactive.");
- this.isRadioactive = false;
- this.vRadiationLevel = 0;
- }
+ //Sets the Rad level
+ if (radiationLevel > 0){
+ Logger.MATERIALS(this.getLocalizedName()+" is radioactive. Level: "+radiationLevel+".");
+ this.isRadioactive = true;
+ this.vRadiationLevel = (byte) radiationLevel;
+ }
+ else {
+ Logger.MATERIALS(this.getLocalizedName()+" is not radioactive.");
+ this.isRadioactive = false;
+ this.vRadiationLevel = 0;
+ }
- //Sets the materials 'tier'. Will probably replace this logic.
- this.vTier = MaterialUtils.getTierOfMaterial((int) MathUtils.celsiusToKelvin(meltingPoint));
+ //Sets the materials 'tier'. Will probably replace this logic.
+ this.vTier = MaterialUtils.getTierOfMaterial((int) MathUtils.celsiusToKelvin(meltingPoint));
- this.usesBlastFurnace = blastFurnace;
- this.vVoltageMultiplier = this.getMeltingPointK() >= 2800 ? 60 : 15;
+ this.usesBlastFurnace = blastFurnace;
+ this.vVoltageMultiplier = this.getMeltingPointK() >= 2800 ? 60 : 15;
- this.vComponentCount = this.getComponentCount(inputs);
- this.vSmallestRatio = this.getSmallestRatio(this.vMaterialInput);
- int tempSmallestSize = 0;
+ this.vComponentCount = this.getComponentCount(inputs);
+ this.vSmallestRatio = this.getSmallestRatio(this.vMaterialInput);
+ int tempSmallestSize = 0;
- if (this.vSmallestRatio != null){
- for (int v=0;v<this.vSmallestRatio.length;v++){
- tempSmallestSize=(int) (tempSmallestSize+this.vSmallestRatio[v]);
+ if (this.vSmallestRatio != null){
+ for (int v=0;v<this.vSmallestRatio.length;v++){
+ tempSmallestSize=(int) (tempSmallestSize+this.vSmallestRatio[v]);
+ }
+ this.smallestStackSizeWhenProcessing = tempSmallestSize; //Valid stacksizes
+ }
+ else {
+ this.smallestStackSizeWhenProcessing = 1; //Valid stacksizes
}
- this.smallestStackSizeWhenProcessing = tempSmallestSize; //Valid stacksizes
- }
- else {
- this.smallestStackSizeWhenProcessing = 1; //Valid stacksizes
- }
- //Makes a Fancy Chemical Tooltip
- this.vChemicalSymbol = chemicalSymbol;
- if (this.vMaterialInput != null){
- this.vChemicalFormula = this.getToolTip(chemicalSymbol, OrePrefixes.dust.mMaterialAmount / M, true);
- }
- else if (!this.vChemicalSymbol.equals("")){
- Logger.INFO("materialInput is null, using a valid chemical symbol.");
- this.vChemicalFormula = this.vChemicalSymbol;
- }
- else{
- Logger.INFO("MaterialInput == null && chemicalSymbol probably equals nothing");
- this.vChemicalFormula = "??";
- }
+ //Makes a Fancy Chemical Tooltip
+ this.vChemicalSymbol = chemicalSymbol;
+ if (this.vMaterialInput != null){
+ this.vChemicalFormula = this.getToolTip(chemicalSymbol, OrePrefixes.dust.mMaterialAmount / M, true);
+ }
+ else if (!this.vChemicalSymbol.equals("")){
+ Logger.INFO("materialInput is null, using a valid chemical symbol.");
+ this.vChemicalFormula = this.vChemicalSymbol;
+ }
+ else{
+ Logger.INFO("MaterialInput == null && chemicalSymbol probably equals nothing");
+ this.vChemicalFormula = "??";
+ }
- final Materials isValid = Materials.get(this.getLocalizedName());
- if (FluidUtils.getFluidStack(localizedName, 1) != null){
- this.vMoltenFluid = FluidUtils.getFluidStack(localizedName, 1).getFluid();
- }
- else if (isValid == null || isValid == Materials._NULL){
- this.vMoltenFluid = this.generateFluid();
- }
- else {
- if (isValid.mFluid != null){
- this.vMoltenFluid = isValid.mFluid;
+ final Materials isValid = Materials.get(this.getLocalizedName());
+ if (FluidUtils.getFluidStack(localizedName, 1) != null){
+ this.vMoltenFluid = FluidUtils.getFluidStack(localizedName, 1).getFluid();
}
- else if (isValid.mGas != null){
- this.vMoltenFluid = isValid.mGas;
+ else if (isValid == null || isValid == Materials._NULL){
+ this.vMoltenFluid = this.generateFluid();
}
else {
- this.vMoltenFluid = this.generateFluid();
+ if (isValid.mFluid != null){
+ this.vMoltenFluid = isValid.mFluid;
+ }
+ else if (isValid.mGas != null){
+ this.vMoltenFluid = isValid.mGas;
+ }
+ else {
+ this.vMoltenFluid = this.generateFluid();
+ }
}
- }
- this.vPlasma = this.generatePlasma();
+ this.vPlasma = this.generatePlasma();
- String ratio = "";
- if (this.vSmallestRatio != null) {
- for (int hu=0;hu<this.vSmallestRatio.length;hu++){
- if (ratio.equals("")){
- ratio = String.valueOf(this.vSmallestRatio[hu]);
- }
- else {
- ratio = ratio + ":" +this.vSmallestRatio[hu];
+ String ratio = "";
+ if (this.vSmallestRatio != null) {
+ for (int hu=0;hu<this.vSmallestRatio.length;hu++){
+ if (ratio.equals("")){
+ ratio = String.valueOf(this.vSmallestRatio[hu]);
+ }
+ else {
+ ratio = ratio + ":" +this.vSmallestRatio[hu];
+ }
}
}
- }
- Logger.INFO("Creating a Material instance for "+materialName);
- Logger.INFO("Formula: "+this.vChemicalFormula + " Smallest Stack: "+this.smallestStackSizeWhenProcessing+" Smallest Ratio:"+ratio);
- Logger.INFO("Protons: "+this.vProtons);
- Logger.INFO("Neutrons: "+this.vNeutrons);
- Logger.INFO("Mass: "+this.vMass+"/units");
- Logger.INFO("Melting Point: "+this.meltingPointC+"C.");
- Logger.INFO("Boiling Point: "+this.boilingPointC+"C.");
+ Logger.INFO("Creating a Material instance for "+materialName);
+ Logger.INFO("Formula: "+this.vChemicalFormula + " Smallest Stack: "+this.smallestStackSizeWhenProcessing+" Smallest Ratio:"+ratio);
+ Logger.INFO("Protons: "+this.vProtons);
+ Logger.INFO("Neutrons: "+this.vNeutrons);
+ Logger.INFO("Mass: "+this.vMass+"/units");
+ Logger.INFO("Melting Point: "+this.meltingPointC+"C.");
+ Logger.INFO("Boiling Point: "+this.boilingPointC+"C.");
}
catch (Throwable t){
t.printStackTrace();
}
- }
+ }
-
+ private TextureSet setTextureSet(TextureSet set) {
+ if (set != null) {
+ return set;
+ }
+ else {
+ // build hash table with count
+ AutoMap<Material> sets = new AutoMap<Material>();
+ if (this.vMaterialInput != null) {
+ for (MaterialStack r : this.vMaterialInput) {
+ if (r.getStackMaterial().getTextureSet().mSetName.toLowerCase().contains("fluid")) {
+ sets.put(ELEMENT.getInstance().GOLD);
+ }
+ else {
+ sets.put(r.getStackMaterial());
+ }
+ }
+ TextureSet mostUsedTypeTextureSet = (TextureSet) MaterialUtils.getMostCommonTextureSet(new ArrayList(sets.values()));
+ if (mostUsedTypeTextureSet != null && mostUsedTypeTextureSet instanceof TextureSet) {
+ Logger.MATERIALS("Set textureset for "+this.localizedName+" to be "+mostUsedTypeTextureSet.mSetName+".");
+ return mostUsedTypeTextureSet;
+ }
+ }
+ }
+ Logger.MATERIALS("Set textureset for "+this.localizedName+" to be "+Materials.Iron.mIconSet.mSetName+". [Fallback]");
+ return Materials.Iron.mIconSet;
+ }
public final String getLocalizedName(){
if (this.localizedName != null) {
@@ -342,7 +383,7 @@ public class Material {
}
return new short[] {255,0,0};
}
-
+
final public short[] getRGBA(){
if (this.RGBA != null) {
if (this.RGBA.length == 4){
@@ -475,12 +516,12 @@ public class Material {
public final ItemStack getNugget(final int stacksize){
return ItemUtils.getItemStackOfAmountFromOreDictNoBroken("nugget"+this.unlocalizedName, stacksize);
}
-
+
/**
* Ore Components
* @return
*/
-
+
public final ItemStack getOre(final int stacksize){
return ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ore"+Utils.sanitizeString(this.getUnlocalizedName()), stacksize);
}
@@ -494,14 +535,14 @@ public class Material {
Logger.DEBUG_MATERIALS("[Invalid Ore] Is a1 valid? "+(a1 != null));
Logger.DEBUG_MATERIALS("[Invalid Ore] Is a2 valid? "+(a2 != null));
Logger.DEBUG_MATERIALS("[Invalid Ore] Is a3 valid? "+(a3 != null));
-
- Block x = Block.getBlockFromItem(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ore"+Utils.sanitizeString(this.unlocalizedName), stacksize).getItem());
- if (x != null){
- return x;
- }
+
+ Block x = Block.getBlockFromItem(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ore"+Utils.sanitizeString(this.unlocalizedName), stacksize).getItem());
+ if (x != null){
+ return x;
+ }
}
catch (Throwable t){
- t.printStackTrace();
+ //t.printStackTrace();
}
Logger.MATERIALS("Failed getting the Ore Block for "+this.getLocalizedName()+".");
return Blocks.stone;
@@ -585,7 +626,6 @@ public class Material {
}
- @SuppressWarnings("static-method")
public final long[] getSmallestRatio(final ArrayList<MaterialStack> tempInput){
if (tempInput != null){
if (!tempInput.isEmpty()){
@@ -687,7 +727,7 @@ public class Material {
if (this.materialState == MaterialState.ORE){
return null;
}
-
+
final Materials isValid = Materials.get(this.getLocalizedName());
Logger.INFO("Is "+this.getLocalizedName()+" a Gregtech material? "+(isValid != null && isValid != Materials._NULL)+" | Found "+isValid.mDefaultLocalName);
if (isValid != Materials._NULL){
@@ -923,32 +963,4 @@ public class Material {
}
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
}
diff --git a/src/Java/gtPlusPlus/core/material/ORES.java b/src/Java/gtPlusPlus/core/material/ORES.java
index 22e43a0aef..2f0eb72fcc 100644
--- a/src/Java/gtPlusPlus/core/material/ORES.java
+++ b/src/Java/gtPlusPlus/core/material/ORES.java
@@ -1,5 +1,6 @@
package gtPlusPlus.core.material;
+import gregtech.api.enums.TextureSet;
import gtPlusPlus.core.material.state.MaterialState;
public final class ORES {
@@ -7,6 +8,7 @@ public final class ORES {
public static final Material GEIKIELITE = new Material(
"Geikielite", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_GEM_HORIZONTAL, //Texture Set
new short[]{187, 193, 204, 0}, //Material Colour
500,
1500,
@@ -22,6 +24,7 @@ public final class ORES {
public static final Material ZIMBABWEITE = new Material(
"Zimbabweite", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_FINE, //Texture Set
new short[]{193, 187, 131, 0}, //Material Colour
500,
1500,
@@ -42,6 +45,7 @@ public final class ORES {
public static final Material TITANITE = new Material(
"Titanite", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_METALLIC, //Texture Set
new short[]{184, 198, 105, 0}, //Material Colour
500,
1500,
@@ -59,6 +63,7 @@ public final class ORES {
public static final Material ZIRCONILITE = new Material(
"Zirconolite", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_FINE, //Texture Set
new short[]{45, 26, 0, 0}, //Material Colour
500,
1500,
@@ -76,6 +81,7 @@ public final class ORES {
public static final Material CROCROITE = new Material(
"Crocoite", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_GEM_VERTICAL, //Texture Set
new short[]{255, 143, 84, 0}, //Material Colour
500,
1500,
@@ -91,6 +97,7 @@ public final class ORES {
public static final Material NICHROMITE = new Material(
"Nichromite", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_METALLIC, //Texture Set
new short[]{22, 19, 19, 0}, //Material Colour
500,
1500,
@@ -106,9 +113,10 @@ public final class ORES {
new MaterialStack(ELEMENT.getInstance().OXYGEN, 8)
});
- public static final Material YTTRIAITE = new Material(
+ public static final Material YTTRIAITE = new Material( //TODO
"Yttriaite", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_METALLIC, //Texture Set
new short[]{255, 143, 84, 0}, //Material Colour
500,
1500,
@@ -124,6 +132,7 @@ public final class ORES {
public static final Material SAMARSKITE_Y = new Material(
"Samarskite (Y)", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_FINE, //Texture Set
new short[]{65, 163, 164, 0}, //Material Colour
500,
1500,
@@ -143,6 +152,7 @@ public final class ORES {
public static final Material SAMARSKITE_YB = new Material(
"Samarskite (Yb)", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_FINE, //Texture Set
new short[]{95, 193, 194, 0}, //Material Colour
500,
1500,
@@ -161,6 +171,7 @@ public final class ORES {
public static final Material ZIRCON = new Material(
"Zircon", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_GEM_VERTICAL, //Texture Set
new short[]{195, 19, 19, 0}, //Material Colour
500,
1500,
@@ -177,6 +188,7 @@ public final class ORES {
public static final Material GADOLINITE_CE = new Material(
"Gadolinite (Ce)", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_FINE, //Texture Set
new short[]{15, 159, 59, 0}, //Material Colour
500,
1500,
@@ -198,6 +210,7 @@ public final class ORES {
public static final Material GADOLINITE_Y = new Material(
"Gadolinite (Y)", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_FINE, //Texture Set
new short[]{35, 189, 99, 0}, //Material Colour
500,
1500,
@@ -218,6 +231,7 @@ public final class ORES {
public static final Material LEPERSONNITE = new Material(
"Lepersonnite", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_EMERALD, //Texture Set
new short[]{175, 175, 20, 0}, //Material Colour
500,
1500,
@@ -236,6 +250,7 @@ public final class ORES {
public static final Material XENOTIME = new Material(
"Xenotime", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_OPAL, //Texture Set
new short[]{235, 89, 199, 0}, //Material Colour
500,
1500,
@@ -251,6 +266,7 @@ public final class ORES {
public static final Material YTTRIALITE = new Material(
"Yttrialite", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_RUBY, //Texture Set
new short[]{35, 189, 99, 0}, //Material Colour
500,
1500,
@@ -267,6 +283,7 @@ public final class ORES {
public static final Material YTTROCERITE = new Material(
"Yttrocerite", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_DIAMOND, //Texture Set
new short[]{35, 19, 199, 0}, //Material Colour
500,
1500,
@@ -283,6 +300,7 @@ public final class ORES {
public static final Material POLYCRASE = new Material(
"Polycrase", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_ROUGH, //Texture Set
new short[]{51, 0, 11, 0}, //Material Colour
500,
1500,
@@ -304,6 +322,7 @@ public final class ORES {
public static final Material ZIRCOPHYLLITE = new Material(
"Zircophyllite", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_FIERY, //Texture Set
new short[]{30, 0, 6, 0}, //Material Colour
500,
1500,
@@ -326,6 +345,7 @@ public final class ORES {
public static final Material ZIRKELITE = new Material(
"Zirkelite", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_GEM_HORIZONTAL, //Texture Set
new short[]{229, 208, 48, 0}, //Material Colour
500,
1500,
@@ -345,6 +365,7 @@ public final class ORES {
public static final Material LANTHANITE_LA = new Material(
"Lanthanite (La)", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_METALLIC, //Texture Set
new short[]{219, 160, 214, 0}, //Material Colour
500,
1500,
@@ -362,6 +383,7 @@ public final class ORES {
public static final Material LANTHANITE_CE = new Material(
"Lanthanite (Ce)", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_METALLIC, //Texture Set
new short[]{186, 113, 179, 0}, //Material Colour
500,
1500,
@@ -379,6 +401,7 @@ public final class ORES {
public static final Material LANTHANITE_ND = new Material(
"Lanthanite (Nd)", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_METALLIC, //Texture Set
new short[]{153, 76, 145, 0}, //Material Colour
500,
1500,
@@ -396,6 +419,7 @@ public final class ORES {
public static final Material HIBONITE = new Material(
"Hibonite", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_METALLIC, //Texture Set
new short[]{58, 31, 0, 0}, //Material Colour
500,
1500,
@@ -414,6 +438,7 @@ public final class ORES {
public static final Material CERITE = new Material(
"Cerite", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_METALLIC, //Texture Set
new short[]{68, 13, 0, 0}, //Material Colour
500,
1500,
@@ -434,6 +459,7 @@ public final class ORES {
public static final Material AGARDITE_Y = new Material(
"Agardite (Y)", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_METALLIC, //Texture Set
new short[]{210, 232, 44, 0}, //Material Colour
500,
1500,
@@ -452,6 +478,7 @@ public final class ORES {
public static final Material AGARDITE_CD = new Material(
"Agardite (Cd)", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_METALLIC, //Texture Set
new short[]{170, 188, 33, 0}, //Material Colour
500,
1500,
@@ -470,6 +497,7 @@ public final class ORES {
public static final Material AGARDITE_LA = new Material(
"Agardite (La)", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_FINE, //Texture Set
new short[]{206, 232, 9, 0}, //Material Colour
500,
1500,
@@ -488,6 +516,7 @@ public final class ORES {
public static final Material AGARDITE_ND = new Material(
"Agardite (Nd)", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_METALLIC, //Texture Set
new short[]{225, 244, 78, 0}, //Material Colour
500,
1500,
@@ -506,6 +535,7 @@ public final class ORES {
public static final Material FLUORCAPHITE = new Material(
"Fluorcaphite", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_FINE, //Texture Set
new short[]{255, 255, 30, 0}, //Material Colour
500,
1500,
@@ -525,6 +555,7 @@ public final class ORES {
public static final Material FLORENCITE = new Material(
"Florencite", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_METALLIC, //Texture Set
new short[]{249, 249, 124, 0}, //Material Colour
500,
1500,
@@ -542,6 +573,7 @@ public final class ORES {
public static final Material CRYOLITE = new Material(
"Cryolite", //Material Name
MaterialState.ORE, //State
+ TextureSet.SET_SHINY, //Texture Set
new short[]{205, 205, 255, 0}, //Material Colour
500,
1500,
diff --git a/src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java b/src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java
index ea21a1d270..436115dac6 100644
--- a/src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java
+++ b/src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java
@@ -19,10 +19,10 @@ public final class NUCLIDE {
public final Material THORIUM232 = new Material("Thorium 232", MaterialState.SOLID, new short[]{15, 60, 15, 0}, Materials.Thorium.mMeltingPoint, Materials.Thorium.mBlastFurnaceTemp, 90, 142, false, StringUtils.superscript("232Th"), 1, false);//Not a GT Inherited Material
//RTG Fuels
- public final Material PLUTONIUM238 = new Material("Plutonium-238", MaterialState.SOLID, Materials.Plutonium241.mDurability, Materials.Plutonium241.mRGBa, Materials.Plutonium241.mMeltingPoint, Materials.Plutonium241.mBlastFurnaceTemp, 94, 144, false, StringUtils.superscript("238Pu"), 2, false);//Not a GT Inherited Material
- public final Material STRONTIUM90 = new Material("Strontium-90", MaterialState.SOLID, Materials.Strontium.mDurability, Materials.Strontium.mRGBa, Materials.Strontium.mMeltingPoint, Materials.Strontium.mBlastFurnaceTemp, 38, 52, false, StringUtils.superscript("90Sr"), 2, false);//Not a GT Inherited Material
- public final Material POLONIUM210 = new Material("Polonium-210", MaterialState.SOLID, ELEMENT.getInstance().POLONIUM.vDurability, ELEMENT.getInstance().POLONIUM.getRGBA(), ELEMENT.getInstance().POLONIUM.getMeltingPointK(), ELEMENT.getInstance().POLONIUM.getBoilingPointK(), 84, 126, false, StringUtils.superscript("210Po"), 2, false);//Not a GT Inherited Material
- public final Material AMERICIUM241 = new Material("Americium-241", MaterialState.SOLID, Materials.Americium.mDurability, Materials.Americium.mRGBa, Materials.Americium.mMeltingPoint, Materials.Americium.mBlastFurnaceTemp, 95, 146, false, StringUtils.superscript("241Am"), 2, false);//Not a GT Inherited Material
+ public final Material PLUTONIUM238 = new Material("Plutonium-238", MaterialState.SOLID, Materials.Plutonium241.mIconSet, Materials.Plutonium241.mDurability, Materials.Plutonium241.mRGBa, Materials.Plutonium241.mMeltingPoint, Materials.Plutonium241.mBlastFurnaceTemp, 94, 144, false, StringUtils.superscript("238Pu"), 2, false);//Not a GT Inherited Material
+ public final Material STRONTIUM90 = new Material("Strontium-90", MaterialState.SOLID, Materials.Strontium.mIconSet, Materials.Strontium.mDurability, Materials.Strontium.mRGBa, Materials.Strontium.mMeltingPoint, Materials.Strontium.mBlastFurnaceTemp, 38, 52, false, StringUtils.superscript("90Sr"), 2, false);//Not a GT Inherited Material
+ public final Material POLONIUM210 = new Material("Polonium-210", MaterialState.SOLID, Materials.Plutonium241.mIconSet, ELEMENT.getInstance().POLONIUM.vDurability, ELEMENT.getInstance().POLONIUM.getRGBA(), ELEMENT.getInstance().POLONIUM.getMeltingPointK(), ELEMENT.getInstance().POLONIUM.getBoilingPointK(), 84, 126, false, StringUtils.superscript("210Po"), 2, false);//Not a GT Inherited Material
+ public final Material AMERICIUM241 = new Material("Americium-241", MaterialState.SOLID, Materials.Americium.mIconSet, Materials.Americium.mDurability, Materials.Americium.mRGBa, Materials.Americium.mMeltingPoint, Materials.Americium.mBlastFurnaceTemp, 95, 146, false, StringUtils.superscript("241Am"), 2, false);//Not a GT Inherited Material
public static final Material LiFBeF2ThF4UF4 = new Material(
"LiFBeF2ThF4UF4", //Material Name
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
index a09a865743..86be02faed 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
@@ -636,7 +636,7 @@ public class RECIPES_GREGTECH {
230); //EU
}catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
-
+
//Be(OH)2 + 2 (NH4)HF2 → (NH4)2BeF4 + 2 H2O
try {
CORE.RA.addDehydratorRecipe(
@@ -653,7 +653,7 @@ public class RECIPES_GREGTECH {
new int[]{0, 0, 0},
32*20, //Time in ticks
64); //EU
-
+
}catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
@@ -903,7 +903,7 @@ public class RECIPES_GREGTECH {
chances,
30*20,
240);
-
+
GT_Values.RA.addChemicalBathRecipe(
FLUORIDES.FLUORITE.getCrushed(2),
FluidUtils.getFluidStack("hydrogen", 2000),
@@ -1166,6 +1166,7 @@ public class RECIPES_GREGTECH {
}
private static void electroMagneticSeperatorRecipes(){
+ //Bauxite
GT_Values.RA.addElectromagneticSeparatorRecipe(
ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedBauxite", 1),
ItemUtils.getItemStackOfAmountFromOreDict("dustBauxite", 1),
@@ -1174,6 +1175,28 @@ public class RECIPES_GREGTECH {
new int[]{10000, 2500, 4000},
20*20,
24);
+
+
+
+ /*//Trinium
+ GT_Values.RA.addElectromagneticSeparatorRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedBauxite", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustBauxite", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustSmallRutile", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("nuggetZirconium", 1),
+ new int[]{10000, 2500, 4000},
+ 20*20,
+ 24);
+
+ //Trinium
+ GT_Values.RA.addElectromagneticSeparatorRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedBauxite", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustBauxite", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustSmallRutile", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("nuggetZirconium", 1),
+ new int[]{10000, 2500, 4000},
+ 20*20,
+ 24);*/
}
private static void advancedMixerRecipes(){
diff --git a/src/Java/gtPlusPlus/core/util/PollutionUtils.java b/src/Java/gtPlusPlus/core/util/PollutionUtils.java
index 7e8de5f706..d68a25a844 100644
--- a/src/Java/gtPlusPlus/core/util/PollutionUtils.java
+++ b/src/Java/gtPlusPlus/core/util/PollutionUtils.java
@@ -18,9 +18,7 @@ public class PollutionUtils {
return mPollution.getBoolean(GT_Pollution);
}
}
- } catch (SecurityException | IllegalArgumentException | IllegalAccessException | NoSuchFieldException e) {
- return false;
- }
+ } catch (SecurityException | IllegalArgumentException | IllegalAccessException | NoSuchFieldException e) {}
return false;
}
@@ -35,9 +33,7 @@ public class PollutionUtils {
}
}
} catch (ClassNotFoundException | SecurityException | NoSuchMethodException | IllegalAccessException
- | IllegalArgumentException | InvocationTargetException e) {
- return false;
- }
+ | IllegalArgumentException | InvocationTargetException e) {}
return false;
}
@@ -51,9 +47,7 @@ public class PollutionUtils {
}
}
} catch (ClassNotFoundException | SecurityException | NoSuchMethodException | IllegalAccessException
- | IllegalArgumentException | InvocationTargetException e) {
- return 0;
- }
+ | IllegalArgumentException | InvocationTargetException e) {}
return 0;
}
diff --git a/src/Java/gtPlusPlus/core/util/array/ArrayUtils.java b/src/Java/gtPlusPlus/core/util/array/ArrayUtils.java
index 910c4597af..cd8a1a7fd7 100644
--- a/src/Java/gtPlusPlus/core/util/array/ArrayUtils.java
+++ b/src/Java/gtPlusPlus/core/util/array/ArrayUtils.java
@@ -14,5 +14,11 @@ public class ArrayUtils {
series[series.length - 1] = newValueToAdd;
return series;
}
+
+ /*public static <V> Object getMostCommonElement(List<V> list) {
+ Optional r = list.stream().map(V::getTextureSet).collect(Collectors.groupingBy(Function.identity(), Collectors.counting())).entrySet().stream().max(Map.Entry.comparingByValue()).map(Map.Entry::getKey);
+ return r.get();
+ }*/
}
+
diff --git a/src/Java/gtPlusPlus/core/util/fluid/FluidUtils.java b/src/Java/gtPlusPlus/core/util/fluid/FluidUtils.java
index b4a3e23997..8a99edac5f 100644
--- a/src/Java/gtPlusPlus/core/util/fluid/FluidUtils.java
+++ b/src/Java/gtPlusPlus/core/util/fluid/FluidUtils.java
@@ -442,14 +442,17 @@ public class FluidUtils {
ItemList.Cell_Empty.get(1L, new Object[0]),
1000);
- GT_Values.RA.addFluidExtractionRecipe(
+ //Disable this, not sure why it exists //TODO
+ /*GT_Values.RA.addFluidExtractionRecipe(
ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dust"+Utils.sanitizeString(localizedName), 1), //Input
null, //Input 2
FluidUtils.getFluidStack(gtFluid, 144), //Fluid Output
0, //Chance
1*20, //Duration
16 //Eu Tick
- );
+ );*/
+
+
return gtFluid;
}
Logger.INFO("FLUID GENERATION FAILED FOR "+localizedName);
diff --git a/src/Java/gtPlusPlus/core/util/input/KeyboardUtils.java b/src/Java/gtPlusPlus/core/util/input/KeyboardUtils.java
new file mode 100644
index 0000000000..3b5dc3b5d8
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/util/input/KeyboardUtils.java
@@ -0,0 +1,23 @@
+package gtPlusPlus.core.util.input;
+
+import org.lwjgl.input.Keyboard;
+
+import net.minecraft.client.Minecraft;
+
+public class KeyboardUtils {
+
+ public static boolean isCtrlKeyDown(){
+ // prioritize CONTROL, but allow OPTION as well on Mac (note: GuiScreen's isCtrlKeyDown only checks for the OPTION key on Mac)
+ boolean isCtrlKeyDown = Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL);
+ if (!isCtrlKeyDown && Minecraft.isRunningOnMac)
+ isCtrlKeyDown = Keyboard.isKeyDown(Keyboard.KEY_LMETA) || Keyboard.isKeyDown(Keyboard.KEY_RMETA);
+
+ return isCtrlKeyDown;
+ }
+
+ public static boolean isShiftKeyDown(){
+ return Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT);
+
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java b/src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java
index 7db80c70fb..5cd7532f0f 100644
--- a/src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java
+++ b/src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java
@@ -1,6 +1,10 @@
package gtPlusPlus.core.util.materials;
import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.function.Function;
+import java.util.stream.Collectors;
import org.apache.commons.lang3.reflect.FieldUtils;
@@ -44,6 +48,7 @@ public class MaterialUtils {
final long protons = material.getProtons();
final long neutrons = material.getNeutrons();
final boolean blastFurnace = material.mBlastFurnaceRequired;
+ final TextureSet iconSet = material.mIconSet;
final int durability = material.mDurability;
boolean mGenerateCell = false;
MaterialState materialState;
@@ -99,7 +104,7 @@ public class MaterialUtils {
if (hasValidRGBA(rgba) || (element == Element.H) || ((material == Materials.InfusedAir) || (material == Materials.InfusedFire) || (material == Materials.InfusedEarth) || (material == Materials.InfusedWater))){
//ModItems.itemBaseDecidust = UtilsItems.generateDecidust(material);
//ModItems.itemBaseCentidust = UtilsItems.generateCentidust(material);
- return new Material(name, materialState, durability, rgba, melting, boiling, protons, neutrons, blastFurnace, chemicalFormula, radioactivity, mGenerateCell);
+ return new Material(name, materialState,iconSet, durability, rgba, melting, boiling, protons, neutrons, blastFurnace, chemicalFormula, radioactivity, mGenerateCell);
}
else {
Logger.DEBUG_MATERIALS("Failed to generate GT++ material instance for "+material.name() +" | Valid RGB? "+(hasValidRGBA(rgba)));
@@ -235,5 +240,14 @@ public class MaterialUtils {
}
return mName;
}
+
+ public static TextureSet getMostCommonTextureSet(List<Material> list) {
+ Optional<TextureSet> r = list.stream().map(Material::getTextureSet).collect(Collectors.groupingBy(Function.identity(), Collectors.counting())).entrySet().stream().max(Map.Entry.comparingByValue()).map(Map.Entry::getKey);
+ TextureSet o = (r != null && r.isPresent() && r.get() != null) ? r.get() : null;
+ return o;
+ }
+
+
+ }
+
-}
diff --git a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java
index 047f941aef..2a98f0a75a 100644
--- a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java
+++ b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java
@@ -20,10 +20,10 @@ public class ReflectionUtils {
} catch (final NoSuchFieldException e) {
final Class<?> superClass = clazz.getSuperclass();
if (superClass == null) {
- Logger.REFLECTION("Failed to get Field from Class. "+fieldName+" does not existing within "+clazz.getCanonicalName()+".");
+ //Logger.REFLECTION("Failed to get Field from Class. "+fieldName+" does not existing within "+clazz.getCanonicalName()+".");
throw e;
}
- Logger.REFLECTION("Failed to get Field from Class. "+fieldName+" does not existing within "+clazz.getCanonicalName()+". Trying super class.");
+ //Logger.REFLECTION("Failed to get Field from Class. "+fieldName+" does not existing within "+clazz.getCanonicalName()+". Trying super class.");
return getField(superClass, fieldName);
}
}
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/block/DarkWorldContentLoader.java b/src/Java/gtPlusPlus/core/world/darkworld/block/DarkWorldContentLoader.java
index 0eab691720..e74fe1e1a5 100644
--- a/src/Java/gtPlusPlus/core/world/darkworld/block/DarkWorldContentLoader.java
+++ b/src/Java/gtPlusPlus/core/world/darkworld/block/DarkWorldContentLoader.java
@@ -38,16 +38,15 @@ public class DarkWorldContentLoader {
}
public synchronized static boolean initItems(){
- portalItem = (itemDarkWorldPortalTrigger) (new itemDarkWorldPortalTrigger().setUnlocalizedName("dimensionDarkWorld_trigger"));
- GameRegistry.registerItem(portalItem, "dimensionDarkWorld_trigger");
-
+ portalItem = (itemDarkWorldPortalTrigger) (new itemDarkWorldPortalTrigger().setUnlocalizedName("everglades.trigger"));
+ GameRegistry.registerItem(portalItem, "everglades.trigger");
return true;
}
public synchronized static boolean initBlocks(){
//Create Block Instances
- blockFluidLakes = new BlockBaseFluid("Sludge", SLUDGE, blockDarkWorldSludgeFluid.SLUDGE).setLightLevel(2f).setLightOpacity(1).setBlockName("blockDarkWorldSludgeFluid");
+ blockFluidLakes = new BlockBaseFluid("Sludge", SLUDGE, blockDarkWorldSludgeFluid.SLUDGE).setLightLevel(2f).setLightOpacity(1).setBlockName("fluidSludge");
portalBlock = new blockDarkWorldPortal();
blockTopLayer = new blockDarkWorldGround();
blockSecondLayer = new blockDarkWorldPollutedDirt();
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Base.java b/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Base.java
index 44d62663bd..65184b6f35 100644
--- a/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Base.java
+++ b/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Base.java
@@ -137,7 +137,7 @@ public class WorldGen_GT_Base implements IWorldGenerator {
this.mIsGenerating = true;
Logger.WORLD("Setting Generation to true.");
int mList_sS = WorldGen_GT_Base.mList.size();
- mList_sS = Math.min(mList_sS, 5); // Run a maximum of 5 chunks at a
+ mList_sS = Math.min(mList_sS, 3); // Run a maximum of 3 chunks at a
// time through worldgen. Extra
// chunks get done later.
for (int i = 0; i < mList_sS; i++) {
@@ -377,6 +377,7 @@ public class WorldGen_GT_Base implements IWorldGenerator {
case WorldGen_GT_Ore_Layer.NO_OVERLAP:
if (debugWorldGen)
GT_Log.out.println(" No overlap");
+ break;
}
}
}
@@ -391,11 +392,11 @@ public class WorldGen_GT_Base implements IWorldGenerator {
// For now, manually reducing oreveinMaxSize when not in the
// Underdark for performance
if (this.mWorld.provider.getDimensionName().equals("Underdark")) {
- oreveinMaxSize = 32; // Leave Deep Dark/Underdark max oregen at
+ oreveinMaxSize = 24; // Leave Deep Dark/Underdark max oregen at
// 32, instead of 64
}
else {
- oreveinMaxSize = 32;
+ oreveinMaxSize = 24;
}
int wXbox = this.mX - (oreveinMaxSize / 16);