Some tweaks on horizontal water turbines

This commit is contained in:
Calclavia 2014-02-21 20:46:51 +08:00
parent 97064eab72
commit efd7eab534
2 changed files with 11 additions and 3 deletions

View file

@ -192,8 +192,8 @@ public class RenderMultimeter implements ISimpleItemRenderer
if (information.size() <= 0)
information.add("No information");
float displacement = 0.7f / information.size();
float maxScale = (float) (part.getNetwork().size.x + part.getNetwork().size.z) * 0.005f;
float displacement = 0.72f / information.size();
float maxScale = (float) (part.getNetwork().size.x + part.getNetwork().size.z) * 0.004f;
GL11.glTranslatef(0, 0, -displacement * (information.size() / 2f));
for (int i = 0; i < information.size(); i++)

View file

@ -21,6 +21,8 @@ import cpw.mods.fml.relauncher.ReflectionHelper;
*/
public class TileWaterTurbine extends TileMechanicalTurbine
{
public int powerTicks = 0;
public TileWaterTurbine()
{
maxPower = 200;
@ -47,11 +49,17 @@ public class TileWaterTurbine extends TileMechanicalTurbine
*/
if (getDirection().offsetY != 0)
{
if (powerTicks > 0)
{
getMultiBlock().get().power += getWaterPower();
powerTicks--;
}
int blockIDAbove = worldObj.getBlockId(xCoord, yCoord + 1, zCoord);
if (blockIDAbove == Block.waterStill.blockID && worldObj.isAirBlock(xCoord, yCoord - 1, zCoord))
{
getMultiBlock().get().power += getWaterPower() * 10;
powerTicks = 20;
worldObj.setBlockToAir(xCoord, yCoord + 1, zCoord);
worldObj.setBlock(xCoord, yCoord - 1, zCoord, Block.waterStill.blockID);
}