aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJordan Byrne <draknyte1@hotmail.com>2018-05-15 19:12:19 +1000
committerJordan Byrne <draknyte1@hotmail.com>2018-05-15 19:12:19 +1000
commitc7b39a04db6f567b1fe62d03abafbe5a77026721 (patch)
treecc7afb926bf9cbea3d164322de741e4198d85506 /src
parent9205c63146f96d7cc3280d05102de830ee3cd7f6 (diff)
downloadGT5-Unofficial-c7b39a04db6f567b1fe62d03abafbe5a77026721.tar.gz
GT5-Unofficial-c7b39a04db6f567b1fe62d03abafbe5a77026721.tar.bz2
GT5-Unofficial-c7b39a04db6f567b1fe62d03abafbe5a77026721.zip
+ Added new textures for the GT Shelves.
$ Fixed a bug during ore recipe generation. $ Fixed all GT Shelves using incorrect textures.
Diffstat (limited to 'src')
-rw-r--r--src/Java/gtPlusPlus/core/block/base/BasicBlock.java2
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java172
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java163
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java47
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java39
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java55
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java36
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java23
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCryogenicFreezer.java9
-rw-r--r--src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf.pngbin0 -> 822 bytes
-rw-r--r--src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_cans.pngbin0 -> 822 bytes
-rw-r--r--src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_paper.pngbin0 -> 822 bytes
-rw-r--r--src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_bottom.pngbin0 -> 822 bytes
-rw-r--r--src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side.pngbin0 -> 822 bytes
-rw-r--r--src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side_cabinet.pngbin0 -> 822 bytes
-rw-r--r--src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_top.pngbin0 -> 822 bytes
19 files changed, 427 insertions, 128 deletions
diff --git a/src/Java/gtPlusPlus/core/block/base/BasicBlock.java b/src/Java/gtPlusPlus/core/block/base/BasicBlock.java
index f2edf65740..34da346ff2 100644
--- a/src/Java/gtPlusPlus/core/block/base/BasicBlock.java
+++ b/src/Java/gtPlusPlus/core/block/base/BasicBlock.java
@@ -25,7 +25,7 @@ public class BasicBlock extends BlockContainer {
super(material);
this.setBlockName(Utils.sanitizeString(unlocalizedName));
- if (type != BlockTypes.ORE) {
+ if (type != BlockTypes.ORE && !unlocalizedName.toLowerCase().contains("ore")) {
this.setBlockTextureName(CORE.MODID + ":" + unlocalizedName);
}
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java
index 0cb36d4859..5f3969310b 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java
@@ -286,12 +286,12 @@ public class RECIPES_Machines {
//Buffer Core
RecipeUtils.addShapedGregtechRecipe(
CI.component_Plate[1], cableTier1, CI.component_Plate[1],
- CI.circuitPrimitive, "plateStaballloy", CI.circuitPrimitive,
+ "circuitPrimitive", "plateStaballloy", "circuitPrimitive",
CI.component_Plate[1], cableTier1, CI.component_Plate[1],
RECIPE_BufferCore_ULV);
RecipeUtils.addShapedGregtechRecipe(
CI.component_Plate[2], cableTier2, CI.component_Plate[2],
- CI.circuitTier1, IC2MFE, CI.circuitTier1,
+ CI.circuitTier1, CI.machineHull_HV, CI.circuitTier1,
CI.component_Plate[2], cableTier2, CI.component_Plate[2],
RECIPE_BufferCore_LV);
RecipeUtils.addShapedGregtechRecipe(
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
index fd46c6d0eb..30af8908df 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
@@ -10,10 +10,16 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.objects.GT_RenderedTexture;
import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.api.objects.data.AutoMap;
import gtPlusPlus.core.lib.CORE;
public class TexturesGtBlock {
+ private static AutoMap<Runnable> mCustomiconMap = new AutoMap<Runnable>();
+
+ static {
+
+ }
//public static ITexture[] CASING_BLOCKS_GTPP = new ITexture[256];
@@ -27,6 +33,7 @@ public class TexturesGtBlock {
public CustomIcon(final String aIconName) {
this.mIconName = aIconName;
+ mCustomiconMap.put(this);
Logger.WARNING("Constructing a Custom Texture. " + this.mIconName);
GregTech_API.sGTBlockIconload.add(this);
}
@@ -53,12 +60,47 @@ public class TexturesGtBlock {
}
}
+
+ public static class VanillaIcon implements IIconContainer, Runnable {
+ protected IIcon mIcon;
+ protected String mIconName;
+
+ public VanillaIcon(final String aIconName) {
+ this.mIconName = aIconName;
+ mCustomiconMap.put(this);
+ Logger.WARNING("Constructing a Custom Texture. " + this.mIconName);
+ GregTech_API.sGTBlockIconload.add(this);
+ }
+
+ @Override
+ public IIcon getIcon() {
+ return this.mIcon;
+ }
+
+ @Override
+ public IIcon getOverlayIcon() {
+ return null;
+ }
+
+ @Override
+ public void run() {
+ this.mIcon = GregTech_API.sBlockIcons.registerIcon("minecraft" + ":" + this.mIconName);
+ }
+
+ @Override
+ public ResourceLocation getTextureFile() {
+ return TextureMap.locationBlocksTexture;
+ }
+ }
/*
* Add Some Custom Textures below.
* I am not sure whether or not I need to declare them as such, but better to be safe than sorry.
* Right?
*/
+
+ //Vanilla Textures
+ public static final VanillaIcon VanillaIcon_OakPlanks = new VanillaIcon("planks_oak");
@@ -70,8 +112,68 @@ public class TexturesGtBlock {
public static final CustomIcon OVERLAY_ENERGY_OUT_BUFFER = new CustomIcon("iconsets/OVERLAY_ENERGY_OUT_BUFFER");
public static final CustomIcon OVERLAY_ENERGY_OUT_MULTI_BUFFER = new CustomIcon("iconsets/OVERLAY_ENERGY_OUT_MULTI_BUFFER");
+ //Wooden Shelf and Compartment Overlays
+ public static final CustomIcon OVERLAY_WOODEN_SHELF_FRONT = new CustomIcon("TileEntities/Compartment/wood_shelf");
+ public static final CustomIcon OVERLAY_WOODEN_SHELF_CANS_FRONT = new CustomIcon("TileEntities/Compartment/wood_shelf_cans");
+ public static final CustomIcon OVERLAY_WOODEN_SHELF_PAPER_FRONT = new CustomIcon("TileEntities/Compartment/wood_shelf_paper");
+ public static final CustomIcon OVERLAY_CABINET_1 = new CustomIcon("TileEntities/Compartment/0");
+ public static final CustomIcon OVERLAY_CABINET_2 = new CustomIcon("TileEntities/Compartment/1");
+ public static final CustomIcon OVERLAY_CABINET_3 = new CustomIcon("TileEntities/Compartment/2");
+ public static final CustomIcon OVERLAY_CABINET_4 = new CustomIcon("TileEntities/Compartment/3");
+ public static final CustomIcon OVERLAY_CABINET_5 = new CustomIcon("TileEntities/Compartment/4");
+ public static final CustomIcon OVERLAY_CABINET_6 = new CustomIcon("TileEntities/Compartment/5");
+ public static final CustomIcon OVERLAY_CABINET_7 = new CustomIcon("TileEntities/Compartment/6");
+ public static final CustomIcon OVERLAY_CABINET_8 = new CustomIcon("TileEntities/Compartment/7");
+ public static final CustomIcon OVERLAY_CABINET_9 = new CustomIcon("TileEntities/Compartment/8");
+ public static final CustomIcon OVERLAY_CABINET_10 = new CustomIcon("TileEntities/Compartment/9");
+ public static final CustomIcon OVERLAY_CABINET_11 = new CustomIcon("TileEntities/Compartment/10");
+ public static final CustomIcon OVERLAY_CABINET_12 = new CustomIcon("TileEntities/Compartment/11");
+ public static final CustomIcon OVERLAY_CABINET_13 = new CustomIcon("TileEntities/Compartment/12");
+ public static final CustomIcon OVERLAY_CABINET_14 = new CustomIcon("TileEntities/Compartment/13");
+ public static final CustomIcon OVERLAY_CABINET_15 = new CustomIcon("TileEntities/Compartment/14");
+ public static final CustomIcon OVERLAY_CABINET_16 = new CustomIcon("TileEntities/Compartment/15");
+ public static final CustomIcon OVERLAY_COMPARTMENT_1 = new CustomIcon("TileEntities/Compartment/16");
+ public static final CustomIcon OVERLAY_COMPARTMENT_2 = new CustomIcon("TileEntities/Compartment/17");
+ public static final CustomIcon OVERLAY_COMPARTMENT_3 = new CustomIcon("TileEntities/Compartment/18");
+ public static final CustomIcon OVERLAY_COMPARTMENT_4 = new CustomIcon("TileEntities/Compartment/19");
+ public static final CustomIcon OVERLAY_COMPARTMENT_5 = new CustomIcon("TileEntities/Compartment/20");
+ public static final CustomIcon OVERLAY_COMPARTMENT_6 = new CustomIcon("TileEntities/Compartment/21");
+ public static final CustomIcon OVERLAY_COMPARTMENT_7 = new CustomIcon("TileEntities/Compartment/22");
+ public static final CustomIcon OVERLAY_COMPARTMENT_8 = new CustomIcon("TileEntities/Compartment/23");
+ public static final CustomIcon OVERLAY_COMPARTMENT_9 = new CustomIcon("TileEntities/Compartment/24");
+ public static final CustomIcon OVERLAY_COMPARTMENT_10 = new CustomIcon("TileEntities/Compartment/25");
+ public static final CustomIcon OVERLAY_COMPARTMENT_11 = new CustomIcon("TileEntities/Compartment/26");
+ public static final CustomIcon OVERLAY_COMPARTMENT_12 = new CustomIcon("TileEntities/Compartment/27");
+ public static final CustomIcon OVERLAY_COMPARTMENT_13 = new CustomIcon("TileEntities/Compartment/28");
+ public static final CustomIcon OVERLAY_COMPARTMENT_14 = new CustomIcon("TileEntities/Compartment/29");
+ public static final CustomIcon OVERLAY_COMPARTMENT_15 = new CustomIcon("TileEntities/Compartment/30");
+ public static final CustomIcon OVERLAY_COMPARTMENT_16 = new CustomIcon("TileEntities/Compartment/31");
+
+
//Overlay Arrays
- public static ITexture[] OVERLAYS_ENERGY_OUT_MULTI_BUFFER= new ITexture[]{
+ public static ITexture[] OVERLAYS_ENERGY_OUT_BUFFER = new ITexture[]{
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER,
+ new short[]{220, 220, 220, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER,
+ new short[]{220, 220, 220, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER,
+ new short[]{255, 100, 0, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER,
+ new short[]{255, 255, 30, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER,
+ new short[]{128, 128, 128, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER,
+ new short[]{240, 240, 245, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER,
+ new short[]{240, 240, 245, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER,
+ new short[]{240, 240, 245, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER,
+ new short[]{240, 240, 245, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER,
+ new short[]{240, 240, 245, 0})};
+
+ public static ITexture[] OVERLAYS_ENERGY_OUT_MULTI_BUFFER = new ITexture[]{
new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER,
new short[]{220, 220, 220, 0}),
new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER,
@@ -93,6 +195,74 @@ public class TexturesGtBlock {
new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER,
new short[]{240, 240, 245, 0})};
+ public static ITexture[] OVERLAYS_CABINET_FRONT = new ITexture[]{
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_1,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_2,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_3,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_4,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_5,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_6,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_7,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_8,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_9,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_10,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_11,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_12,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_13,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_14,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_15,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_16,
+ new short[]{255, 255, 255, 0}),};
+
+ public static ITexture[] OVERLAYS_COMPARTMENT_FRONT = new ITexture[]{
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_1,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_2,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_3,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_4,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_5,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_6,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_7,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_8,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_9,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_10,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_11,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_12,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_13,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_14,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_15,
+ new short[]{255, 255, 255, 0}),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_16,
+ new short[]{255, 255, 255, 0}),};
+
//Controllers
private static final CustomIcon Internal_Casing_Fusion_Simple_Front = new CustomIcon("TileEntities/MACHINE_CASING_FUSION_FRONT");
public static final CustomIcon Casing_Fusion_Simple_Front = Internal_Casing_Fusion_Simple_Front;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java
index 46cb903e0b..d557cbaa7d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java
@@ -5,8 +5,6 @@ import static gregtech.api.enums.GT_Values.V;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
-import org.apache.commons.lang3.reflect.FieldUtils;
-
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
@@ -24,7 +22,6 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
-import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon;
import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GregtechMetaEnergyBuffer;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java
index 8d2dec0715..8f13c05227 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java
@@ -268,7 +268,7 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
double fDam = Math.floor(Math.abs(MathUtils.randFloat(1f, 2f) - MathUtils.randFloat(1f, 2f)) * (1f + 2f - 1f) + 1f);
damageValue -= fDam;
- Logger.INFO("Trying to do "+damageValue+" damage to the rotor. ["+fDam+"]");
+ //Logger.INFO("Trying to do "+damageValue+" damage to the rotor. ["+fDam+"]");
/*Materials M1 = GT_MetaGenerated_Tool.getPrimaryMaterial(this.mInventory[this.SLOT_ROTOR]);
Materials M2 = GT_MetaGenerated_Tool.getSecondaryMaterial(this.mInventory[this.SLOT_ROTOR]);
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java
index 57eeba7025..6a35805a0c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java
@@ -10,14 +10,23 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric;
+import gregtech.api.objects.GT_ItemStack;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.minecraft.PlayerUtils;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon;
public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
public byte mType = 0;
+ public static GT_RenderedTexture texBottom = new GT_RenderedTexture(new CustomIcon("TileEntities/gt4/machine_bottom"));
+ public static GT_RenderedTexture texTop = new GT_RenderedTexture(new CustomIcon("TileEntities/gt4/machine_top"));
+ public static GT_RenderedTexture texSide = new GT_RenderedTexture(new CustomIcon("TileEntities/gt4/machine_side"));
+ public static GT_RenderedTexture texSideCabinet = new GT_RenderedTexture(new CustomIcon("TileEntities/gt4/machine_side_cabinet"));
+
public GT4Entity_Shelf(final int aID, final String aName, final String aNameRegional, final String aDescription) {
super(aID, aName, aNameRegional, 0, aDescription);
}
@@ -61,8 +70,8 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
}
@Override
- public boolean isOutputFacing(byte aSide) {
- return false;
+ public boolean isOutputFacing(final byte aSide) {
+ return aSide != this.getBaseMetaTileEntity().getFrontFacing();
}
@Override
@@ -70,13 +79,15 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
return false;
}
- public void onRightclick(EntityPlayer aPlayer) {
+ @Override
+ public boolean onRightclick(IGregTechTileEntity aTile, EntityPlayer aPlayer) {
ItemStack tStack = aPlayer.inventory.getStackInSlot(aPlayer.inventory.currentItem);
if (tStack == null) {
if ((this.mInventory[0] != null) && (this.mInventory[0].stackSize > 0)) {
aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, this.mInventory[0]);
getBaseMetaTileEntity().setInventorySlotContents(0, null);
this.mType = 0;
+ PlayerUtils.messagePlayer(aPlayer, "Set type to "+this.mType+".");
}
}
else if (this.mInventory[0] == null) {
@@ -84,11 +95,13 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, null);
getBaseMetaTileEntity().setInventorySlotContents(0, tStack);
this.mType = 1;
+ PlayerUtils.messagePlayer(aPlayer, "Set type to "+this.mType+".");
}
else if (OrePrefixes.book.contains(tStack)) {
aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, null);
getBaseMetaTileEntity().setInventorySlotContents(0, tStack);
this.mType = 2;
+ PlayerUtils.messagePlayer(aPlayer, "Set type to "+this.mType+".");
}
else if ((ItemList.IC2_Food_Can_Filled.isStackEqual(tStack, true, true))
|| (ItemList.IC2_Food_Can_Spoiled.isStackEqual(tStack, true, true))
@@ -96,11 +109,14 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, null);
getBaseMetaTileEntity().setInventorySlotContents(0, tStack);
this.mType = 3;
+ PlayerUtils.messagePlayer(aPlayer, "Set type to "+this.mType+".");
}
}
+ return super.onRightclick(aTile, aPlayer);
}
- public void onLeftclick(EntityPlayer aPlayer) {
+ @Override
+ public void onLeftclick(IGregTechTileEntity aTile,EntityPlayer aPlayer) {
if ((this.mInventory[0] != null) && (this.mInventory[0].stackSize > 0)) {
ItemStack tOutput = GT_Utility.copy(new Object[] { this.mInventory[0] });
if (!aPlayer.isSneaking()) {
@@ -117,8 +133,10 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
getBaseMetaTileEntity().getWorld().spawnEntityInWorld(tEntity);
if (this.mInventory[0] == null) {
this.mType = 0;
+ PlayerUtils.messagePlayer(aPlayer, "Set type to "+this.mType+".");
}
}
+ super.onLeftclick(aTile, aPlayer);
}
@Override
@@ -146,10 +164,6 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
return this.mType;
}
- public boolean allowCoverOnSide(byte aSide, int aCoverID) {
- return aSide != getBaseMetaTileEntity().getFrontFacing();
- }
-
@Override
public String[] getDescription() {
return new String[] { "Decorative Item Storage", CORE.GT_Tooltip };
@@ -170,25 +184,128 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
return false;
}
+ /*@Override
+ public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
+ final ITexture[][][] rTextures = new ITexture[10][17][];
+ for (byte i = -1; i < 16; ++i) {
+ rTextures[0][i + 1] = this.getFront(i);
+ rTextures[1][i + 1] = this.getBack(i);
+ rTextures[2][i + 1] = this.getBottom(i);
+ rTextures[3][i + 1] = this.getTop(i);
+ rTextures[4][i + 1] = this.getSides(i);
+ rTextures[5][i + 1] = this.getFrontActive(i);
+ rTextures[6][i + 1] = this.getBackActive(i);
+ rTextures[7][i + 1] = this.getBottomActive(i);
+ rTextures[8][i + 1] = this.getTopActive(i);
+ rTextures[9][i + 1] = this.getSidesActive(i);
+ }
+ return rTextures;
+ }*/
+
@Override
- public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aConnections, final byte aColorIndex, final boolean aConnected, final boolean aRedstone) {
- return this.mTextures[Math.min(2, aSide)][aColorIndex + 1];
+ public ITexture[][][] getTextureSet(ITexture[] aTextures) {
+ ITexture[][][] rTextures = new ITexture[7][17][];
+ for (byte i = -1; i < 16; i = (byte) (i + 1)) {
+ ITexture[] tmp0 = {this.getBottom((byte) 0)[0]};
+ rTextures[0][(i + 1)] = tmp0;
+ ITexture[] tmp1 = { this.getTop((byte) 0)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)};
+ rTextures[1][(i + 1)] = tmp1;
+ ITexture[] tmp2 = { this.getSides((byte) 0)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)};
+ rTextures[2][(i + 1)] = tmp2;
+ ITexture[] tmp4 = {this.getSides((byte) 0)[0], new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT)};
+ rTextures[3][(i + 1)] = tmp4;
+ ITexture[] tmp5 = {this.getSides((byte) 0)[0], getFront((byte) 0)[0]};
+ rTextures[4][(i + 1)] = tmp5;
+ ITexture[] tmp6 = {this.getSides((byte) 0)[0], getFront((byte) 1)[0]};
+ rTextures[5][(i + 1)] = tmp6;
+ ITexture[] tmp7 = {this.getSides((byte) 0)[0], getFront((byte) 3)[0]};
+ rTextures[6][(i + 1)] = tmp7;
+ }
+ return rTextures;
}
@Override
- public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
- final ITexture[][][] rTextures = new ITexture[3][17][];
- for (byte i = -1; i < 16; ++i) {
- final ITexture[] tmp0 = { new GT_RenderedTexture(Textures.BlockIcons.COVER_WOOD_PLATE,
- Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
- rTextures[0][i + 1] = tmp0;
- final ITexture[] tmp2 = { new GT_RenderedTexture(Textures.BlockIcons.COVER_WOOD_PLATE,
- Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
- rTextures[1][i + 1] = tmp2;
- final ITexture[] tmp3 = { new GT_RenderedTexture(Textures.BlockIcons.COVER_WOOD_PLATE,
- Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
- rTextures[2][i + 1] = tmp3;
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity,
+ final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive,
+ final boolean aRedstone) {
+ /*return this.mTextures[aSide == aFacing ? 0 : 1][aColorIndex + 1];*/
+
+ int modeMod = 0;
+
+ ITexture[] tmp = this.mTextures[(aSide >= 2) ? ((aSide != aFacing) ? 2 : ((byte) this.mType == 0 ? 4 : this.mType == 1 ? 5 : this.mType == 3 ? 6 : 0)) : aSide][aColorIndex + 1];
+ if (aSide != aFacing && tmp.length == 2) {
+ tmp = new ITexture[]{tmp[0]};
}
- return rTextures;
+ return tmp;
+ }
+
+ @Override
+ public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) {
+ return aSide != getBaseMetaTileEntity().getFrontFacing();
}
+
+ private static GT_RenderedTexture x1 = new GT_RenderedTexture(TexturesGtBlock.OVERLAY_WOODEN_SHELF_FRONT);
+ private static GT_RenderedTexture x2 = new GT_RenderedTexture(TexturesGtBlock.OVERLAY_WOODEN_SHELF_PAPER_FRONT);
+ private static GT_RenderedTexture x3 = new GT_RenderedTexture(TexturesGtBlock.OVERLAY_WOODEN_SHELF_CANS_FRONT);
+
+ public ITexture[] getFront(final byte aColor) {
+ GT_RenderedTexture x;
+ if (aColor == 0) {
+ x = x1;
+ }
+ else if (aColor == 1) {
+ x = x2;
+ }
+ else if (aColor == 3) {
+ x = x3;
+ }
+ else {
+ x = x1;
+ }
+ return new ITexture[]{x};
+ }
+
+ public ITexture[] getBack(final byte aColor) {
+ return new ITexture[]{ new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)};
+ }
+
+ public ITexture[] getBottom(final byte aColor) {
+ return new ITexture[]{ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Acacia_Log)};
+ }
+
+ public ITexture[] getTop(final byte aColor) {
+ return new ITexture[]{ new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)};
+ }
+
+ public ITexture[] getSides(final byte aColor) {
+ return new ITexture[]{ new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)};
+ }
+
+ public ITexture[] getFrontActive(final byte aColor) {
+ return this.getFront(aColor);
+ }
+
+ public ITexture[] getBackActive(final byte aColor) {
+ return this.getBack(aColor);
+ }
+
+ public ITexture[] getBottomActive(final byte aColor) {
+ return this.getBottom(aColor);
+ }
+
+ public ITexture[] getTopActive(final byte aColor) {
+ return this.getTop(aColor);
+ }
+
+ public ITexture[] getSidesActive(final byte aColor) {
+ return this.getSides(aColor);
+ }
+
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ // TODO Auto-generated method stub
+ super.onPostTick(aBaseMetaTileEntity, aTick);
+ }
+
+
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java
index 540fb17aa2..42155aa137 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java
@@ -14,13 +14,17 @@ import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.objects.GT_ItemStack;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.minecraft.PlayerUtils;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
public class GT4Entity_Shelf_Compartment extends GT4Entity_Shelf {
- public static IIcon[] sIconList = new IIcon['?'];
+ public static IIcon[] sIconList = new IIcon[32];
+
public GT4Entity_Shelf_Compartment(final int aID, final String aName, final String aNameRegional, final String aDescription) {
super(aID, aName, aNameRegional, aDescription);
@@ -36,7 +40,7 @@ public class GT4Entity_Shelf_Compartment extends GT4Entity_Shelf {
}
@Override
- public boolean allowCoverOnSide(byte aSide, int aCoverID) {
+ public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) {
return aSide != getBaseMetaTileEntity().getFrontFacing();
}
@@ -44,23 +48,26 @@ public class GT4Entity_Shelf_Compartment extends GT4Entity_Shelf {
public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
if (aSide == getBaseMetaTileEntity().getFrontFacing()) {
this.mType = ((byte) ((this.mType + 1) % 16));
+ PlayerUtils.messagePlayer(aPlayer, "Set type to "+this.mType+".");
}
}
- public IIcon getTextureIcon(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) {
- return aSide == aFacing ? sIconList[this.mType] : null;
- }
-
+ /*
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister aBlockIconRegister) {
for (int i = 0; i < 32; i++) {
sIconList[i] = aBlockIconRegister.registerIcon(CORE.MODID + ":" + "TileEntities/Compartment/" + i);
}
- }
+ }*/
@Override
- public void onLeftclick(EntityPlayer aPlayer) {
+ public ITexture[] getFront(final byte aColor) {
+ return new ITexture[]{TexturesGtBlock.OVERLAYS_COMPARTMENT_FRONT[this.mType < 16 ? this.mType : 0]};
+ }
+
+ @Override
+ public void onLeftclick(IGregTechTileEntity aTile,EntityPlayer aPlayer) {
if ((this.mInventory[0] != null) && (this.mInventory[0].stackSize > 0)) {
ItemStack tOutput = GT_Utility.copy(new Object[] { this.mInventory[0] });
if (!aPlayer.isSneaking()) {
@@ -76,10 +83,11 @@ public class GT4Entity_Shelf_Compartment extends GT4Entity_Shelf {
tEntity.motionZ = 0.0D;
getBaseMetaTileEntity().getWorld().spawnEntityInWorld(tEntity);
}
+ super.onLeftclick(aTile, aPlayer);
}
@Override
- public void onRightclick(EntityPlayer aPlayer) {
+ public boolean onRightclick(IGregTechTileEntity aTile, EntityPlayer aPlayer) {
ItemStack tStack = aPlayer.inventory.getStackInSlot(aPlayer.inventory.currentItem);
if (tStack == null) {
if ((this.mInventory[0] != null) && (this.mInventory[0].stackSize > 0)) {
@@ -91,26 +99,11 @@ public class GT4Entity_Shelf_Compartment extends GT4Entity_Shelf {
aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, null);
getBaseMetaTileEntity().setInventorySlotContents(0, tStack);
}
- }
-
- public boolean allowPullStack(int aIndex, byte aSide, ItemStack aStack) {
- return aIndex == 0;
+ return super.onRightclick(aTile, aPlayer);
}
@Override
- public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
- final ITexture[][][] rTextures = new ITexture[3][17][];
- for (byte i = -1; i < 16; ++i) {
- final ITexture[] tmp0 = { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_BOTTOM,
- Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
- rTextures[0][i + 1] = tmp0;
- final ITexture[] tmp2 = { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_TOP,
- Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
- rTextures[1][i + 1] = tmp2;
- final ITexture[] tmp3 = { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_SIDE,
- Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
- rTextures[2][i + 1] = tmp3;
- }
- return rTextures;
+ public boolean allowPullStack(IGregTechTileEntity p0, int p1, byte p2, ItemStack p3) {
+ return p1 == 0;
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java
index 5c08379a9f..93c0343a88 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java
@@ -3,13 +3,13 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
-import gregtech.api.enums.Dyes;
-import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
+
public class GT4Entity_Shelf_Desk extends GT4Entity_Shelf {
public GT4Entity_Shelf_Desk(final int aID, final String aName, final String aNameRegional, final String aDescription) {
@@ -26,7 +26,7 @@ public class GT4Entity_Shelf_Desk extends GT4Entity_Shelf {
}
@Override
- public void onRightclick(EntityPlayer aPlayer) {
+ public boolean onRightclick(IGregTechTileEntity aTile, EntityPlayer aPlayer) {
ItemStack tStack = aPlayer.inventory.getStackInSlot(aPlayer.inventory.currentItem);
if (tStack == null) {
if ((this.mInventory[0] != null) && (this.mInventory[0].stackSize > 0)) {
@@ -39,22 +39,27 @@ public class GT4Entity_Shelf_Desk extends GT4Entity_Shelf {
aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, null);
getBaseMetaTileEntity().setInventorySlotContents(0, tStack);
}
+ return super.onRightclick(aTile, aPlayer);
}
@Override
- public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
- final ITexture[][][] rTextures = new ITexture[3][17][];
- for (byte i = -1; i < 16; ++i) {
- final ITexture[] tmp0 = { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_BOTTOM,
- Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
- rTextures[0][i + 1] = tmp0;
- final ITexture[] tmp2 = { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_TOP,
- Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
- rTextures[1][i + 1] = tmp2;
- final ITexture[] tmp3 = { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_SIDE,
- Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
- rTextures[2][i + 1] = tmp3;
- }
- return rTextures;
+ public ITexture[] getFront(final byte aColor) {
+ return new ITexture[]{TexturesGtBlock.OVERLAYS_CABINET_FRONT[this.mType < 16 ? this.mType : 0]};
+ }
+
+ public ITexture[] getBack(final byte aColor) {
+ return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)};
+ }
+
+ public ITexture[] getBottom(final byte aColor) {
+ return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)};
+ }
+
+ public ITexture[] getTop(final byte aColor) {
+ return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)};
+ }
+
+ public ITexture[] getSides(final byte aColor) {
+ return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)};
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java
index b707df5a2d..6928285fa5 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java
@@ -1,11 +1,14 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving;
-import gregtech.api.enums.Dyes;
-import gregtech.api.enums.Textures;
+import net.minecraft.entity.player.EntityPlayer;
+
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.objects.GT_ItemStack;
+
+import gtPlusPlus.core.util.minecraft.PlayerUtils;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
public class GT4Entity_Shelf_FileCabinet extends GT4Entity_Shelf {
@@ -17,25 +20,43 @@ public class GT4Entity_Shelf_FileCabinet extends GT4Entity_Shelf {
super(mName, mDescriptionArray, mTextures);
}
+
+ @Override
+ public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) {
+ return aSide != getBaseMetaTileEntity().getFrontFacing();
+ }
+
+ @Override
+ public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ if (aSide == getBaseMetaTileEntity().getFrontFacing()) {
+ this.mType = ((byte) ((this.mType + 1) % 16));
+ PlayerUtils.messagePlayer(aPlayer, "Set type to "+this.mType+".");
+ }
+ }
+
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT4Entity_Shelf_FileCabinet(this.mName, this.mDescription, this.mTextures);
}
@Override
- public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
- final ITexture[][][] rTextures = new ITexture[3][17][];
- for (byte i = -1; i < 16; ++i) {
- final ITexture[] tmp0 = { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_BOTTOM,
- Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
- rTextures[0][i + 1] = tmp0;
- final ITexture[] tmp2 = { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_TOP,
- Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
- rTextures[1][i + 1] = tmp2;
- final ITexture[] tmp3 = { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_SIDE,
- Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
- rTextures[2][i + 1] = tmp3;
- }
- return rTextures;
+ public ITexture[] getFront(final byte aColor) {
+ return new ITexture[]{TexturesGtBlock.OVERLAYS_CABINET_FRONT[this.mType < 16 ? this.mType : 0]};
+ }
+
+ public ITexture[] getBack(final byte aColor) {
+ return new ITexture[]{texSide};
+ }
+
+ public ITexture[] getBottom(final byte aColor) {
+ return new ITexture[]{texBottom};
+ }
+
+ public ITexture[] getTop(final byte aColor) {
+ return new ITexture[]{texTop};
+ }
+
+ public ITexture[] getSides(final byte aColor) {
+ return new ITexture[]{texSide};
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java
index b2262cd19b..606496501f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java
@@ -1,11 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving;
-import gregtech.api.enums.Dyes;
-import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.objects.GT_RenderedTexture;
public class GT4Entity_Shelf_Iron extends GT4Entity_Shelf {
@@ -22,20 +19,23 @@ public class GT4Entity_Shelf_Iron extends GT4Entity_Shelf {
return new GT4Entity_Shelf_Iron(this.mName, this.mDescription, this.mTextures);
}
- @Override
- public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
- final ITexture[][][] rTextures = new ITexture[3][17][];
- for (byte i = -1; i < 16; ++i) {
- final ITexture[] tmp0 = { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_BOTTOM,
- Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
- rTextures[0][i + 1] = tmp0;
- final ITexture[] tmp2 = { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_TOP,
- Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
- rTextures[1][i + 1] = tmp2;
- final ITexture[] tmp3 = { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEEL_SIDE,
- Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
- rTextures[2][i + 1] = tmp3;
- }
- return rTextures;
+ public ITexture[] getFront(final byte aColor) {
+ return new ITexture[]{texSideCabinet};
+ }
+
+ public ITexture[] getBack(final byte aColor) {
+ return new ITexture[]{texSide};
+ }
+
+ public ITexture[] getBottom(final byte aColor) {
+ return new ITexture[]{texBottom};
+ }
+
+ public ITexture[] getTop(final byte aColor) {
+ return new ITexture[]{texTop};
+ }
+
+ public ITexture[] getSides(final byte aColor) {
+ return new ITexture[]{texSide};
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java
index 1e252edc29..294e41c6cb 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java
@@ -39,8 +39,8 @@ public class RecipeGen_Ore implements Runnable{
Logger.MATERIALS("[Recipe Generator Debug] ["+material.getLocalizedName()+"]");
final int tVoltageMultiplier = material.getMeltingPointK() >= 2800 ? 120 : 30;
final ItemStack dustStone = ItemUtils.getItemStackOfAmountFromOreDict("dustStone", 1);
- Material bonusA; //Ni
- Material bonusB; //Tin
+ Material bonusA = null; //Ni
+ Material bonusB = null; //Tin
if (material.getComposites().get(0) != null){
bonusA = material.getComposites().get(0).getStackMaterial();
@@ -50,34 +50,33 @@ public class RecipeGen_Ore implements Runnable{
}
boolean allFailed = false;
- if (material.getComposites().size() >= 1 && material.getComposites().get(1) != null){
+ if (material.getComposites().size() >= 2 && material.getComposites().get(1) != null){
bonusB = material.getComposites().get(1).getStackMaterial();
//If Secondary Output has no solid output, try the third (If it exists)
- if (!bonusB.hasSolidForm() && material.getComposites().size() >= 2 && material.getComposites().get(2) != null) {
+ if (!bonusB.hasSolidForm() && material.getComposites().size() >= 3 && material.getComposites().get(2) != null) {
bonusB = material.getComposites().get(2).getStackMaterial();
//If Third Output has no solid output, try the Fourth (If it exists)
- if (!bonusB.hasSolidForm() && material.getComposites().size() >= 3 && material.getComposites().get(3) != null) {
+ if (!bonusB.hasSolidForm() && material.getComposites().size() >= 4 && material.getComposites().get(3) != null) {
bonusB = material.getComposites().get(3).getStackMaterial();
//If Fourth Output has no solid output, try the Fifth (If it exists)
- if (!bonusB.hasSolidForm() && material.getComposites().size() >= 4 && material.getComposites().get(4) != null) {
+ if (!bonusB.hasSolidForm() && material.getComposites().size() >= 5 && material.getComposites().get(4) != null) {
bonusB = material.getComposites().get(4).getStackMaterial();
//If Fifth Output has no solid output, default out to Chrome.
- if (!bonusB.hasSolidForm() && material.getComposites().size() >= 4 && material.getComposites().get(4) != null) {
+ if (!bonusB.hasSolidForm()) {
allFailed = true;
- bonusB = null;
+ bonusB = ELEMENT.getInstance().PLATINUM;
}
}
}
}
}
else {
- allFailed = true;
- bonusB = null;
+ allFailed = true;
}
//Default out if it's made of fluids or some shit.
- if (allFailed) {
- bonusB = ELEMENT.getInstance().CHROMIUM;
+ if (allFailed || bonusB == null) {
+ bonusB = ELEMENT.getInstance().PLATINUM;
}
AutoMap<Pair<Integer, Material>> componentMap = new AutoMap<Pair<Integer, Material>>();
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCryogenicFreezer.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCryogenicFreezer.java
index 07ec16c422..213b6f0ccb 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCryogenicFreezer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCryogenicFreezer.java
@@ -16,14 +16,11 @@ public class GregtechIndustrialCryogenicFreezer {
}
private static void run1() {
- // Gregtech 4 Multiblock Auto-Crafter
Logger.INFO("Gregtech 5 Content | Registering Advanced GT Multiblock replacements.");
- GregtechItemList.Machine_Adv_BlastFurnace.set(new GregtechMetaTileEntity_Adv_EBF(963, "multimachine.adv.blastfurnace", "[Factory Grade] Advanced Blast Furnace").getStackForm(1L));
- GregtechItemList.Machine_Adv_ImplosionCompressor.set(new GregtechMetaTileEntity_Adv_Implosion(964, "multimachine.adv.implosioncompressor", "[Factory Grade] Advanced Implosion Compressor").getStackForm(1L));
- GregtechItemList.Industrial_Cryogenic_Freezer.set(new GregtechMetaTileEntity_IndustrialVacuumFreezer(910, "industrialfreezer.controller.tier.single", "Advanced Cryogenic Freezer").getStackForm(1L));
+ GregtechItemList.Machine_Adv_BlastFurnace.set(new GregtechMetaTileEntity_Adv_EBF(963, "multimachine.adv.blastfurnace", "[Factory Grade] Adv. EBF").getStackForm(1L));
+ GregtechItemList.Machine_Adv_ImplosionCompressor.set(new GregtechMetaTileEntity_Adv_Implosion(964, "multimachine.adv.implosioncompressor", "[Factory Grade] Adv. Implosion Compressor").getStackForm(1L));
+ GregtechItemList.Industrial_Cryogenic_Freezer.set(new GregtechMetaTileEntity_IndustrialVacuumFreezer(910, "multimachine.adv.industrialfreezer", "[Factory Grade] Cryogenic Freezer").getStackForm(1L));
GregtechItemList.FusionComputer_UV2.set(new GregtechMetaTileEntity_Adv_Fusion_MK4(965, "fusioncomputer.tier.09", "FusionTek MK IV").getStackForm(1L));
-
-
}
}
diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf.png
new file mode 100644
index 0000000000..7a3700a854
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_cans.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_cans.png
new file mode 100644
index 0000000000..672a513513
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_cans.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_paper.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_paper.png
new file mode 100644
index 0000000000..e0ec5ef95a
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/blocks/TileEntities/Compartment/wood_shelf_paper.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_bottom.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_bottom.png
new file mode 100644
index 0000000000..ba45c43891
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_bottom.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side.png
new file mode 100644
index 0000000000..9fd8c3be81
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side_cabinet.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side_cabinet.png
new file mode 100644
index 0000000000..6f1e9c0664
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_side_cabinet.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_top.png b/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_top.png
new file mode 100644
index 0000000000..815ad92daf
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_top.png
Binary files differ