Added tank texture

This commit is contained in:
Calclavia 2014-01-13 18:51:19 +08:00
parent c5335008ec
commit 6d38db4d68
5 changed files with 32 additions and 14 deletions

View file

@ -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'
}

View file

@ -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

View file

@ -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

View file

@ -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();
}
}
}*/
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 808 B