diff options
author | Léa Gris <lea.gris@noiraude.net> | 2021-03-20 11:27:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-20 11:27:20 +0100 |
commit | e8d3202aba7d8846d4ac514bf7bec8f9a2441c02 (patch) | |
tree | 1e7c9d06d3a0f2ced2f4eadf816f14e6898b7a57 /src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java | |
parent | 596130bdb9061bfc07be8cbfbd9b9b9d54dfdfbb (diff) | |
parent | 3eb38ad6336b6a3f765e6965b0a6794475ceecc6 (diff) | |
download | GT5-Unofficial-e8d3202aba7d8846d4ac514bf7bec8f9a2441c02.tar.gz GT5-Unofficial-e8d3202aba7d8846d4ac514bf7bec8f9a2441c02.tar.bz2 GT5-Unofficial-e8d3202aba7d8846d4ac514bf7bec8f9a2441c02.zip |
Merge pull request #469 from GTNewHorizons/feat_transparent_covers
feat(cover): handles transparent covers
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java')
-rw-r--r-- | src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java index 6025e7eb13..26fee68f2b 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java @@ -784,6 +784,20 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE } @Override + public ITexture[] getTextureCovered(byte aSide) { + ITexture coverTexture = getCoverTexture(aSide); + ITexture[] textureUncovered = getTextureUncovered(aSide); + ITexture[] textureCovered; + if (coverTexture != null) { + textureCovered = Arrays.copyOf(textureUncovered, textureUncovered.length + 1); + textureCovered[textureUncovered.length] = coverTexture; + return textureCovered; + } else { + return textureUncovered; + } + } + + @Override public ITexture[] getTextureUncovered(byte aSide) { if ((mConnections & 64) != 0) return Textures.BlockIcons.FRESHFOAM; if ((mConnections & -128) != 0) return Textures.BlockIcons.HARDENEDFOAMS[mColor]; |