From 72a7a2a4c30a8a6104261168217f9a71df062931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Fri, 30 Jun 2017 23:18:44 +0200 Subject: [PATCH] Added a new texture for the Item Distributor --- misc/vector/item_distributor.svg | 231 ++++++++++++++++++ .../java/gregtech/api/enums/Textures.java | 2 +- .../GT_MetaTileEntity_ItemDistributor.java | 22 +- .../iconsets/AUTOMATION_ITEMDISTRIBUTOR.png | Bin 0 -> 441 bytes 4 files changed, 253 insertions(+), 2 deletions(-) create mode 100644 misc/vector/item_distributor.svg create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/AUTOMATION_ITEMDISTRIBUTOR.png diff --git a/misc/vector/item_distributor.svg b/misc/vector/item_distributor.svg new file mode 100644 index 00000000..a8aeac2e --- /dev/null +++ b/misc/vector/item_distributor.svg @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index e83fecf8..d70f1023 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -18,7 +18,7 @@ public class Textures { , RENDERING_ERROR, PIPE_RESTRICTOR, INSULATION_FULL, INSULATION_TINY, INSULATION_SMALL, INSULATION_MEDIUM, INSULATION_MEDIUM_PLUS, INSULATION_LARGE, INSULATION_HUGE, CFOAM_FRESH, CFOAM_HARDENED, SOLARPANEL, SOLARPANEL_8V, SOLARPANEL_LV, SOLARPANEL_MV, SOLARPANEL_HV, SOLARPANEL_EV, SOLARPANEL_IV, SOLARPANEL_LuV, SOLARPANEL_ZPM, SOLARPANEL_UV, VENT_NORMAL, VENT_ADVANCED, COVER_WOOD_PLATE, ARROW_UP, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, AUTOMATION_FILTER, AUTOMATION_TYPEFILTER, - AUTOMATION_CHESTBUFFER, AUTOMATION_SUPERBUFFER, AUTOMATION_REGULATOR, CONCRETE_LIGHT_STONE, CONCRETE_LIGHT_COBBLE, CONCRETE_LIGHT_COBBLE_MOSSY, + AUTOMATION_CHESTBUFFER, AUTOMATION_SUPERBUFFER, AUTOMATION_REGULATOR, AUTOMATION_ITEMDISTRIBUTOR, CONCRETE_LIGHT_STONE, CONCRETE_LIGHT_COBBLE, CONCRETE_LIGHT_COBBLE_MOSSY, CONCRETE_LIGHT_BRICKS, CONCRETE_LIGHT_BRICKS_CRACKED, CONCRETE_LIGHT_BRICKS_MOSSY, CONCRETE_LIGHT_BRICKS_CHISELED, CONCRETE_LIGHT_SMOOTH, CONCRETE_DARK_STONE, CONCRETE_DARK_COBBLE, CONCRETE_DARK_COBBLE_MOSSY, CONCRETE_DARK_BRICKS, CONCRETE_DARK_BRICKS_CRACKED, CONCRETE_DARK_BRICKS_MOSSY, CONCRETE_DARK_BRICKS_CHISELED, CONCRETE_DARK_SMOOTH, GRANITE_BLACK_STONE, GRANITE_BLACK_COBBLE, GRANITE_BLACK_COBBLE_MOSSY, GRANITE_BLACK_BRICKS, GRANITE_BLACK_BRICKS_CRACKED, GRANITE_BLACK_BRICKS_MOSSY, diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java index 1628a15c..69c0a765 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java @@ -41,9 +41,29 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer } public ITexture getOverlayIcon() { - return new GT_RenderedTexture(Textures.BlockIcons.AUTOMATION_CHESTBUFFER); + return new GT_RenderedTexture(Textures.BlockIcons.AUTOMATION_ITEMDISTRIBUTOR); } + @Override + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + ITexture[][][] returnTextures = new ITexture[2][17][]; + ITexture baseIcon = getOverlayIcon(), pipeIcon = new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT); + for (int i = 0; i < 17; i++) { + returnTextures[0][i] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i], baseIcon}; + returnTextures[1][i] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][i], pipeIcon, baseIcon}; + } + return returnTextures; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return mTextures[0][aColorIndex + 1]; + } else { + return mTextures[1][aColorIndex + 1]; + } + } + public boolean isValidSlot(int aIndex) { return aIndex < this.mInventory.length - 1; } diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/AUTOMATION_ITEMDISTRIBUTOR.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/AUTOMATION_ITEMDISTRIBUTOR.png new file mode 100644 index 0000000000000000000000000000000000000000..a4de52714992f8f94be8e09ea8c19d94f5423f7a GIT binary patch literal 441 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf2?- zI1pz1ag+ZikRe&(8c`CQpH@mmtT}V`<;yx0|TR(r;B5V zMeoueTW@AZf!f#cA0I3HV!srlE##uC=&>Q7qktvn%^DWhBm6wm7+qIC<`NZQ@l4E4 z)XsSMf5%+O?$Yyj_sYopm^HVy*x360U55WHObs7DZrgAz;Z&lZd6~uB>gQ>{7BVpC zw?_+=)!oRgjJcIx_5JnNO2!6FhJ;hzi+2JAxF&!5G|SiivcvC_6Ou38*ijjtH?K}w zgQ4Qq>yFhsi!Hy|l^MP=Yl(1By0Pxruujnzyb=O;6j*SkR59oDv`W7C%9pO{+ f?N@AOMeZMlaIyDE4d1VU!kod=)z4*}Q$iB}(gnFo literal 0 HcmV?d00001