Some tweaks on horizontal water turbines
This commit is contained in:
parent
97064eab72
commit
efd7eab534
2 changed files with 11 additions and 3 deletions
|
@ -192,8 +192,8 @@ public class RenderMultimeter implements ISimpleItemRenderer
|
||||||
if (information.size() <= 0)
|
if (information.size() <= 0)
|
||||||
information.add("No information");
|
information.add("No information");
|
||||||
|
|
||||||
float displacement = 0.7f / information.size();
|
float displacement = 0.72f / information.size();
|
||||||
float maxScale = (float) (part.getNetwork().size.x + part.getNetwork().size.z) * 0.005f;
|
float maxScale = (float) (part.getNetwork().size.x + part.getNetwork().size.z) * 0.004f;
|
||||||
GL11.glTranslatef(0, 0, -displacement * (information.size() / 2f));
|
GL11.glTranslatef(0, 0, -displacement * (information.size() / 2f));
|
||||||
|
|
||||||
for (int i = 0; i < information.size(); i++)
|
for (int i = 0; i < information.size(); i++)
|
||||||
|
|
|
@ -21,6 +21,8 @@ import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||||
*/
|
*/
|
||||||
public class TileWaterTurbine extends TileMechanicalTurbine
|
public class TileWaterTurbine extends TileMechanicalTurbine
|
||||||
{
|
{
|
||||||
|
public int powerTicks = 0;
|
||||||
|
|
||||||
public TileWaterTurbine()
|
public TileWaterTurbine()
|
||||||
{
|
{
|
||||||
maxPower = 200;
|
maxPower = 200;
|
||||||
|
@ -47,11 +49,17 @@ public class TileWaterTurbine extends TileMechanicalTurbine
|
||||||
*/
|
*/
|
||||||
if (getDirection().offsetY != 0)
|
if (getDirection().offsetY != 0)
|
||||||
{
|
{
|
||||||
|
if (powerTicks > 0)
|
||||||
|
{
|
||||||
|
getMultiBlock().get().power += getWaterPower();
|
||||||
|
powerTicks--;
|
||||||
|
}
|
||||||
|
|
||||||
int blockIDAbove = worldObj.getBlockId(xCoord, yCoord + 1, zCoord);
|
int blockIDAbove = worldObj.getBlockId(xCoord, yCoord + 1, zCoord);
|
||||||
|
|
||||||
if (blockIDAbove == Block.waterStill.blockID && worldObj.isAirBlock(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.setBlockToAir(xCoord, yCoord + 1, zCoord);
|
||||||
worldObj.setBlock(xCoord, yCoord - 1, zCoord, Block.waterStill.blockID);
|
worldObj.setBlock(xCoord, yCoord - 1, zCoord, Block.waterStill.blockID);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue