aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/item/base
diff options
context:
space:
mode:
authorAlkalus <Draknyte1@hotmail.com>2020-03-30 15:56:40 +0100
committerAlkalus <Draknyte1@hotmail.com>2020-03-30 15:56:40 +0100
commitb5cbe510e959ae0fe8803b5df1031f2752c50e30 (patch)
treeff2ead43d39d4721c3b7f3c10fbf396cb4e7a19c /src/Java/gtPlusPlus/core/item/base
parent7bf528ec566132d6a4ae2726791feedbd5380823 (diff)
downloadGT5-Unofficial-b5cbe510e959ae0fe8803b5df1031f2752c50e30.tar.gz
GT5-Unofficial-b5cbe510e959ae0fe8803b5df1031f2752c50e30.tar.bz2
GT5-Unofficial-b5cbe510e959ae0fe8803b5df1031f2752c50e30.zip
+ Added IsaMill.
+ Added repackaged Sun classes. + Added Milled ores. + Added Milling Balls. $ Disabled Hand-pump pumping from non-GT tile entities. > Maybe did other things, but in a hurry to commit.
Diffstat (limited to 'src/Java/gtPlusPlus/core/item/base')
-rw-r--r--src/Java/gtPlusPlus/core/item/base/ore/BaseItemMilledOre.java25
-rw-r--r--src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java48
2 files changed, 54 insertions, 19 deletions
diff --git a/src/Java/gtPlusPlus/core/item/base/ore/BaseItemMilledOre.java b/src/Java/gtPlusPlus/core/item/base/ore/BaseItemMilledOre.java
new file mode 100644
index 0000000000..4edf4ae75d
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/item/base/ore/BaseItemMilledOre.java
@@ -0,0 +1,25 @@
+package gtPlusPlus.core.item.base.ore;
+
+import gregtech.api.enums.Materials;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.material.Material;
+import gtPlusPlus.core.util.minecraft.MaterialUtils;
+import net.minecraft.item.Item;
+
+public class BaseItemMilledOre extends BaseOreComponent{
+
+ public BaseItemMilledOre(final Material material, int aMaterialEU) {
+ super(material, BaseOreComponent.ComponentTypes.MILLED);
+ CORE.RA.addMillingRecipe(material, aMaterialEU);
+ }
+
+ public static Item generate(Materials aMat, int aMaterialEU) {
+ return generate(MaterialUtils.generateMaterialFromGtENUM(aMat), aMaterialEU);
+ }
+
+ public static Item generate(Material aMat, int aMaterialEU) {
+ return new BaseItemMilledOre(aMat, aMaterialEU);
+ }
+
+
+}
diff --git a/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java b/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java
index c5b7191ddd..24c87c3334 100644
--- a/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java
+++ b/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java
@@ -48,7 +48,6 @@ public class BaseOreComponent extends Item{
this.setCreativeTab(AddToCreativeTab.tabMisc);
this.setUnlocalizedName(this.unlocalName);
this.setMaxStackSize(64);
- //this.setTextureName(this.getCorrectTextures());
this.componentColour = material.getRgbAsHex();
GameRegistry.registerItem(this, this.unlocalName);
registerComponent();
@@ -59,9 +58,9 @@ public class BaseOreComponent extends Item{
//ThaumcraftUtils.addAspectToItem(ItemUtils.getSimpleStack(this), TC_Aspect_Wrapper.generate(TC_Aspects.RADIO.mAspect), componentMaterial.vRadiationLevel);
}
}
-
+
}
-
+
public boolean registerComponent() {
Logger.MATERIALS("Attempting to register "+this.getUnlocalizedName()+".");
if (this.componentMaterial == null) {
@@ -92,7 +91,10 @@ public class BaseOreComponent extends Item{
else if (componentType == ComponentTypes.DUSTPURE) {
aKey = OrePrefixes.dustPure.name();
}
-
+ else if (componentType == ComponentTypes.MILLED) {
+ aKey = "milled";
+ }
+
ItemStack x = aMap.get(aKey);
if (x == null) {
aMap.put(aKey, ItemUtils.getSimpleStack(this));
@@ -107,13 +109,6 @@ public class BaseOreComponent extends Item{
}
}
- public String getCorrectTextures(){
- if (!CORE.ConfigSwitches.useGregtechTextures){
- return CORE.MODID + ":" + "item"+this.componentType.COMPONENT_NAME;
- }
- return "gregtech" + ":" + "materialicons/METALLIC/" + this.componentType.COMPONENT_NAME;
- }
-
/*@Override
public String getItemStackDisplayName(final ItemStack p_77653_1_) {
return (this.componentType.getPrefix()+this.componentMaterial.getLocalizedName()+this.componentType.DISPLAY_NAME);
@@ -181,7 +176,13 @@ public class BaseOreComponent extends Item{
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(final IIconRegister par1IconRegister){
- if (CORE.ConfigSwitches.useGregtechTextures){
+ if (this.componentType == ComponentTypes.MILLED) {
+ this.base = par1IconRegister.registerIcon(CORE.MODID + ":" + "processing/MilledOre/"+this.componentType.getComponent());
+ if (this.componentType.hasOverlay()){
+ this.overlay = par1IconRegister.registerIcon(CORE.MODID + ":" + "processing/MilledOre/"+this.componentType.getComponent()+"_Overlay");
+ }
+ }
+ else if (CORE.ConfigSwitches.useGregtechTextures){
//Logger.MATERIALS(this.componentType.getPrefix()+this.componentMaterial.getLocalizedName()+this.componentType.DISPLAY_NAME+" is using `"+"gregtech" + ":" + "materialicons/METALLIC/" + this.componentType.COMPONENT_NAME+"' as the layer 0 texture path.");
this.base = par1IconRegister.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + this.componentType.COMPONENT_NAME);
if (this.componentType.hasOverlay()){
@@ -199,13 +200,21 @@ public class BaseOreComponent extends Item{
@Override
public int getColorFromItemStack(final ItemStack stack, final int renderPass) {
- if (renderPass == 0 && !CORE.ConfigSwitches.useGregtechTextures){
+ if (this.componentType == ComponentTypes.MILLED) {
+ if (renderPass == 1){
+ return Utils.rgbtoHexValue(230, 230, 230);
+ }
return this.componentColour;
}
- if (renderPass == 1 && CORE.ConfigSwitches.useGregtechTextures){
- return Utils.rgbtoHexValue(230, 230, 230);
- }
- return this.componentColour;
+ else {
+ if (renderPass == 0 && !CORE.ConfigSwitches.useGregtechTextures){
+ return this.componentColour;
+ }
+ if (renderPass == 1 && CORE.ConfigSwitches.useGregtechTextures){
+ return Utils.rgbtoHexValue(230, 230, 230);
+ }
+ return this.componentColour;
+ }
}
@@ -226,7 +235,8 @@ public class BaseOreComponent extends Item{
DUSTPURE("dustPure", "Purified ", " Dust", true),
CRUSHED("crushed", "Crushed ", " Ore", true),
CRUSHEDCENTRIFUGED("crushedCentrifuged", "Centrifuged Crushed "," Ore", true),
- CRUSHEDPURIFIED("crushedPurified", "Purified Crushed ", " Ore", true);
+ CRUSHEDPURIFIED("crushedPurified", "Purified Crushed ", " Ore", true),
+ MILLED("milled", "Milled ", " Ore", true);
private String COMPONENT_NAME;
private String PREFIX;
@@ -252,7 +262,7 @@ public class BaseOreComponent extends Item{
public boolean hasOverlay(){
return this.HAS_OVERLAY;
}
-
+
public String getPrefix(){
return this.PREFIX;
}