From 6d38db4d682f4da7e4c1aaf42761c90888b9edc9 Mon Sep 17 00:00:00 2001 From: Calclavia Date: Mon, 13 Jan 2014 18:51:19 +0800 Subject: [PATCH] Added tank texture --- build.gradle | 8 ++++---- build.properties | 5 ++++- .../mechanical/fluid/tank/BlockTank.java | 18 ++++++++++++++++-- .../mechanical/fluid/tank/RenderTank.java | 15 ++++++++------- .../textures/blocks/tank.png | Bin 0 -> 808 bytes 5 files changed, 32 insertions(+), 14 deletions(-) create mode 100644 src/main/resources/assets/resonantinduction/textures/blocks/tank.png diff --git a/build.gradle b/build.gradle index f7758ec99..a9c8feef4 100644 --- a/build.gradle +++ b/build.gradle @@ -76,8 +76,8 @@ repositories { } } dependencies { - compile 'universalelectricity:Universal-Electricity:3.0.+:dev' - compile 'calclaviacore:calclavia-core:1.1.+:dev' - compile name: 'CodeChickenLib', version: "1.6.4-1.0.0.49", ext: 'jar' - compile name: 'ForgeMultipart', version: "1.6.4-1.0.0.233", ext: 'jar' + compile group: 'universalelectricity', name: 'Universal-Electricity', version: "${config.version.universalelectricity}", classifier: "dev" + compile group: 'calclaviacore', name: 'calclavia-core', version: "${config.version.calclaviacore}", classifier: "dev" + compile name: 'CodeChickenLib', version: "${config.version.minecraft}-${config.version.cclib}", ext: 'jar' + compile name: 'ForgeMultipart', version: "${config.version.minecraft}-${config.version.fmp}", ext: 'jar' } diff --git a/build.properties b/build.properties index a6bef0ef5..0a0b22896 100644 --- a/build.properties +++ b/build.properties @@ -2,7 +2,10 @@ dir.development=./ dir.mcp=${dir.development}forge/mcp version.minecraft=1.6.4 version.forge=9.11.1.964 -version.universalelectricity=3.0.0 +version.universalelectricity=3.0.+ +version.calclaviacore=1.1.+ +version.cclib=1.0.0.50 +version.fmp=1.0.0.235 version.mod.major=0 version.mod.minor=3 version.mod.revis=0 \ No newline at end of file diff --git a/src/main/java/resonantinduction/mechanical/fluid/tank/BlockTank.java b/src/main/java/resonantinduction/mechanical/fluid/tank/BlockTank.java index d545cf62f..16d1ad345 100644 --- a/src/main/java/resonantinduction/mechanical/fluid/tank/BlockTank.java +++ b/src/main/java/resonantinduction/mechanical/fluid/tank/BlockTank.java @@ -8,6 +8,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import resonantinduction.mechanical.fluid.pipe.FluidContainerMaterial; import resonantinduction.mechanical.fluid.pipe.ItemBlockFluidContainer; @@ -37,18 +38,31 @@ public class BlockTank extends BlockFluidNetwork return false; } + @Override + public int getRenderBlockPass() + { + return 1; + } + + @Override + public boolean shouldSideBeRendered(IBlockAccess blockAccess, int x, int y, int z, int side) + { + int checkBlockID = blockAccess.getBlockId(x, y, z); + return checkBlockID == this.blockID ? false : super.shouldSideBeRendered(blockAccess, x, y, z, side); + } + @Override @SideOnly(Side.CLIENT) public boolean renderAsNormalBlock() { - return false; + return true; } @Override @SideOnly(Side.CLIENT) public int getRenderType() { - return MechanicalBlockRenderingHandler.ID; + return 0; } @Override diff --git a/src/main/java/resonantinduction/mechanical/fluid/tank/RenderTank.java b/src/main/java/resonantinduction/mechanical/fluid/tank/RenderTank.java index 91b805c97..3bd66759b 100644 --- a/src/main/java/resonantinduction/mechanical/fluid/tank/RenderTank.java +++ b/src/main/java/resonantinduction/mechanical/fluid/tank/RenderTank.java @@ -33,14 +33,8 @@ public class RenderTank extends TileEntitySpecialRenderer public void renderTank(TileEntity tileEntity, double x, double y, double z, int meta, FluidStack liquid) { - byte renderSides = 0; - if (tileEntity instanceof TileTank) - { - renderSides = ((TileTank) tileEntity).renderSides; - } if (liquid != null && liquid.amount > 100) { - int[] displayList = RenderFluidHelper.getFluidDisplayLists(liquid, tileEntity.worldObj, false); GL11.glPushMatrix(); @@ -61,6 +55,13 @@ public class RenderTank extends TileEntitySpecialRenderer GL11.glPopMatrix(); } + /* + byte renderSides = 0; + if (tileEntity instanceof TileTank) + { + renderSides = ((TileTank) tileEntity).renderSides; + } + boolean bot = TileTank.canRenderSide(renderSides, ForgeDirection.UP); boolean top = TileTank.canRenderSide(renderSides, ForgeDirection.DOWN); boolean north = TileTank.canRenderSide(renderSides, ForgeDirection.NORTH); @@ -106,7 +107,7 @@ public class RenderTank extends TileEntitySpecialRenderer model.render(0.0625F, left, right, top, bot); GL11.glPopMatrix(); } - } + }*/ } diff --git a/src/main/resources/assets/resonantinduction/textures/blocks/tank.png b/src/main/resources/assets/resonantinduction/textures/blocks/tank.png new file mode 100644 index 0000000000000000000000000000000000000000..2ed6850b48dc95ffaa00652dcde21f96327d48f0 GIT binary patch literal 808 zcmV+@1K0eCP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qRNAp5A0007)Nkl zh6sTK2(gm4fFAS)-uOv9W4URLMXHTSr7BE%a8(s2*S>KaLuIX2%Yja(<9fZGJoWoz zGI8B*w*Yp49gIdJm*=^g&*y^KZ07p?zO2FCZnxcVI23peez6l*1l(>ncRruxc{-is zdA(lcz0B@`4O}jlH=BpG`LPH}6*WNDQUYumW6%Yb%p)e9QflB?gnohDU1(PxdM=4aOpaeNU>Xsy z&SLjlqc)G29DhbP3J3t!nI6YdUW-Re$pHP>9D#=2fv)P9h)Q132TT#xK}x}Cyzq!A zt(afKNCq@0s!xIkdBl`k5D-vR^*Wt)E@TI9yg~pq5coe3tNNIT+B{;)Euawg`#l0| znsoJA$2jxrKjINn1kjJ4MHt$d9@{zA`)4wbm|Otqgz5+ig$mk%z2hFqJYvc%;0R0& z_?>Cg6=7|qycYq1YZ!8-cbFm~$fFaAfJURC1=uvkpbIRSM+VBSq1|0*R~~vUiAPLn z#m#2ZUqijXI*Z+JjoLf}$Uh8Q0XL=kW1Y~$?m$;{OhhG*B3!LjF5^Qn zA|Qm6g41~65p%s>|NAuiA0MY8fV=2Ft34Krg*@rio6W{;x7z}&r+S$`9*=If+sPQa m<^%u9&O0AK+7G-u&)r|^pEL