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/item/base/BaseItemComponent.java25
-rw-r--r--src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java27
-rw-r--r--src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java26
-rw-r--r--src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java2
-rw-r--r--src/Java/gtPlusPlus/core/lib/CORE.java2
-rw-r--r--src/Java/gtPlusPlus/core/util/item/ItemUtils.java2
-rw-r--r--src/Java/gtPlusPlus/core/util/recipe/RecipeUtils.java4
7 files changed, 69 insertions, 19 deletions
diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java
index 90da27914a..bab4bfeded 100644
--- a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java
+++ b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java
@@ -35,7 +35,7 @@ public class BaseItemComponent extends Item{
this.setCreativeTab(AddToCreativeTab.tabMisc);
this.setUnlocalizedName(unlocalName);
this.setMaxStackSize(64);
- this.setTextureName(CORE.MODID + ":" + "item"+componentType.COMPONENT_NAME);
+ this.setTextureName(getCorrectTextures());
this.componentColour = material.getRgbAsHex();
GameRegistry.registerItem(this, unlocalName);
GT_OreDictUnificator.registerOre(componentType.getOreDictName()+material.getUnlocalizedName(), ItemUtils.getSimpleStack(this));
@@ -57,6 +57,25 @@ public class BaseItemComponent extends Item{
GT_OreDictUnificator.registerOre(ComponentTypes.CELL.getOreDictName()+unlocalName, ItemUtils.getSimpleStack(this));
}
+ public String getCorrectTextures(){
+ if (!CORE.configSwitches.useGregtechTextures){
+ return CORE.MODID + ":" + "item"+componentType.COMPONENT_NAME;
+ }
+ if (componentType == ComponentTypes.GEAR){
+ return "gregtech" + ":" + "materialicons/METALLIC/" + "gearGt";
+ }
+ else if (componentType == ComponentTypes.ROD){
+ return "gregtech" + ":" + "materialicons/METALLIC/" + "stick";
+ }
+ else if (componentType == ComponentTypes.RODLONG){
+ return "gregtech" + ":" + "materialicons/METALLIC/" + "stickLong";
+ }
+ else if (componentType == ComponentTypes.PLATEDOUBLE){
+ return "gregtech" + ":" + "materialicons/METALLIC/" + "plateDouble";
+ }
+ return "gregtech" + ":" + "materialicons/METALLIC/" + componentType.COMPONENT_NAME.toLowerCase();
+ }
+
@Override
public String getItemStackDisplayName(ItemStack p_77653_1_) {
@@ -114,8 +133,8 @@ public class BaseItemComponent extends Item{
}
if (componentMaterial != null){
if (!componentMaterial.vChemicalFormula.equals("??"))
- list.add(componentMaterial.vChemicalFormula);
-
+ list.add(componentMaterial.vChemicalFormula);
+
if (componentMaterial.isRadioactive){
list.add(CORE.GT_Tooltip_Radioactive);
}
diff --git a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java
index 2998fbbc74..4e4192262a 100644
--- a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java
+++ b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java
@@ -33,11 +33,9 @@ public class BaseItemDust extends Item{
public BaseItemDust(String unlocalizedName, String materialName, Material matInfo, int colour, String pileSize, int tier, int sRadioactivity) {
setUnlocalizedName(unlocalizedName);
this.setUnlocalizedName(unlocalizedName);
- this.setMaxStackSize(64);
- if (pileSize == "dust" || pileSize == "Dust"){
- this.setTextureName(CORE.MODID + ":" + "dust");}
- else{
- this.setTextureName(CORE.MODID + ":" + "dust"+pileSize);}
+ this.setMaxStackSize(64);
+ this.setTextureName(getCorrectTexture(pileSize));
+
this.setCreativeTab(tabMisc);
this.colour = colour;
this.mTier = tier;
@@ -75,6 +73,23 @@ public class BaseItemDust extends Item{
addMacerationRecipe();
}
+ private String getCorrectTexture(String pileSize){
+ if (!CORE.configSwitches.useGregtechTextures){
+ if (pileSize == "dust" || pileSize == "Dust"){
+ this.setTextureName(CORE.MODID + ":" + "dust");}
+ else{
+ this.setTextureName(CORE.MODID + ":" + "dust"+pileSize);
+ }
+ }
+ if (pileSize.toLowerCase().contains("small")){
+ return "gregtech" + ":" + "materialicons/METALLIC/dustSmall";
+ }
+ else if (pileSize.toLowerCase().contains("tiny")){
+ return "gregtech" + ":" + "materialicons/METALLIC/dustTiny";
+ }
+ return "gregtech" + ":" + "materialicons/METALLIC/dust";
+ }
+
@Override
public String getItemStackDisplayName(ItemStack iStack) {
@@ -117,7 +132,7 @@ public class BaseItemDust extends Item{
if (dustInfo != null){
list.add(dustInfo.vChemicalFormula);
}
-
+
//}
super.addInformation(stack, aPlayer, list, bool);
diff --git a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java
index fee8861d64..c90499c1ca 100644
--- a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java
+++ b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java
@@ -29,11 +29,8 @@ public class BaseItemDustUnique extends Item{
public BaseItemDustUnique(String unlocalizedName, String materialName, int colour, String pileSize) {
setUnlocalizedName(unlocalizedName);
this.setUnlocalizedName(unlocalizedName);
- this.setMaxStackSize(64);
- if (pileSize == "dust" || pileSize == "Dust"){
- this.setTextureName(CORE.MODID + ":" + "dust");}
- else{
- this.setTextureName(CORE.MODID + ":" + "dust"+pileSize);}
+ this.setMaxStackSize(64);
+ this.setTextureName(getCorrectTexture(pileSize));
this.setCreativeTab(tabMisc);
this.colour = colour;
this.materialName = materialName;
@@ -82,6 +79,23 @@ public class BaseItemDustUnique extends Item{
return name;
}
+ private String getCorrectTexture(String pileSize){
+ if (!CORE.configSwitches.useGregtechTextures){
+ if (pileSize == "dust" || pileSize == "Dust"){
+ this.setTextureName(CORE.MODID + ":" + "dust");}
+ else{
+ this.setTextureName(CORE.MODID + ":" + "dust"+pileSize);
+ }
+ }
+ if (pileSize.toLowerCase().contains("small")){
+ return "gregtech" + ":" + "materialicons/SHINY/dustSmall";
+ }
+ else if (pileSize.toLowerCase().contains("tiny")){
+ return "gregtech" + ":" + "materialicons/SHINY/dustTiny";
+ }
+ return "gregtech" + ":" + "materialicons/SHINY/dust";
+ }
+
protected final int sRadiation;
@Override
public void onUpdate(ItemStack iStack, World world, Entity entityHolding, int p_77663_4_, boolean p_77663_5_) {
@@ -98,7 +112,7 @@ public class BaseItemDustUnique extends Item{
}
super.addInformation(stack, aPlayer, list, bool);
}
-
+
static boolean containsSubScript(String s){
if (s.contains(MaterialUtils.superscript("1"))) return true;
if (s.contains(MaterialUtils.superscript("2"))) return true;
diff --git a/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java b/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java
index dad3cf320b..6cdb426fa9 100644
--- a/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java
+++ b/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java
@@ -43,7 +43,7 @@ public class MultiPickaxeBase extends StaballoyPickaxe{
this.setTextureName(CORE.MODID + ":" + "itemPickaxe");
this.FACING_HORIZONTAL=true;
this.setMaxStackSize(1);
- this.setMaxDamage(materialDurability);
+ this.setMaxDamage(materialDurability*3);
this.colour = colour;
this.materialName = material.name();
this.setCreativeTab(AddToCreativeTab.tabTools);
diff --git a/src/Java/gtPlusPlus/core/lib/CORE.java b/src/Java/gtPlusPlus/core/lib/CORE.java
index f4d70b79c8..dddae0c89c 100644
--- a/src/Java/gtPlusPlus/core/lib/CORE.java
+++ b/src/Java/gtPlusPlus/core/lib/CORE.java
@@ -124,7 +124,9 @@ public class CORE {
public static boolean enableMultiblock_NuclearFuelRefinery = true;
public static boolean enableMultiblock_TreeFarmer = true;
+ //Visuals
public static boolean enableTreeFarmerParticles = true;
+ public static boolean useGregtechTextures = true;
}
diff --git a/src/Java/gtPlusPlus/core/util/item/ItemUtils.java b/src/Java/gtPlusPlus/core/util/item/ItemUtils.java
index 03d512d359..2ce6d5bb66 100644
--- a/src/Java/gtPlusPlus/core/util/item/ItemUtils.java
+++ b/src/Java/gtPlusPlus/core/util/item/ItemUtils.java
@@ -307,7 +307,7 @@ public class ItemUtils {
Utils.LOG_WARNING("Generating a Multi-Pick out of "+material.name());
short[] rgb;
rgb = material.getRGBA();
- int dur = customMaterial.getMaxUses();
+ int dur = customMaterial.getMaxUses()*3;
Utils.LOG_WARNING("Determined durability for "+material.name()+" is "+dur);
if (GT_Durability){
dur = material.mDurability*100;
diff --git a/src/Java/gtPlusPlus/core/util/recipe/RecipeUtils.java b/src/Java/gtPlusPlus/core/util/recipe/RecipeUtils.java
index 036e542a29..fe4399a579 100644
--- a/src/Java/gtPlusPlus/core/util/recipe/RecipeUtils.java
+++ b/src/Java/gtPlusPlus/core/util/recipe/RecipeUtils.java
@@ -36,7 +36,7 @@ public class RecipeUtils {
return false;
}
- Utils.LOG_INFO("Trying to add a recipe for "+resultItem.toString());
+ //Utils.LOG_INFO("Trying to add a recipe for "+resultItem.toString());
String a,b,c,d,e,f,g,h,i;
if (slot_1 == null){ a = " ";} else { a = "1";validSlots.add('1');validSlots.add(slot_1);}
Utils.LOG_WARNING(a);
@@ -110,7 +110,7 @@ public class RecipeUtils {
try {
GameRegistry.addRecipe(new ShapedOreRecipe(resultItem.copy(), (Object[]) validSlots.toArray()));
- Utils.LOG_INFO("Success! Added a recipe for "+resultItem.getDisplayName());
+ //Utils.LOG_INFO("Success! Added a recipe for "+resultItem.getDisplayName());
if (!COMPAT_HANDLER.areInitItemsLoaded){
RegistrationHandler.recipesSuccess++;
}