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;