Shift wrenching turbine now causes it to face you
This commit is contained in:
parent
e75ed07b77
commit
4a9c97f3b0
2 changed files with 26 additions and 0 deletions
|
@ -1,11 +1,13 @@
|
|||
package resonantinduction.mechanical.turbine;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.render.RIBlockRenderingHandler;
|
||||
import calclavia.lib.prefab.turbine.BlockTurbine;
|
||||
import calclavia.lib.prefab.turbine.TileTurbine;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -25,6 +27,18 @@ public class BlockWaterTurbine extends BlockTurbine
|
|||
return RIBlockRenderingHandler.ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onSneakUseWrench(World world, int x, int y, int z, EntityPlayer par5EntityPlayer, int side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
||||
|
||||
if (tileEntity instanceof TileTurbine)
|
||||
if (!world.isRemote && !((TileTurbine) tileEntity).getMultiBlock().isConstructed())
|
||||
world.setBlockMetadataWithNotify(x, y, z, side, 3);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World var1)
|
||||
{
|
||||
|
|
|
@ -61,6 +61,18 @@ public class BlockWindTurbine extends BlockTurbine
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onSneakUseWrench(World world, int x, int y, int z, EntityPlayer par5EntityPlayer, int side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
||||
|
||||
if (tileEntity instanceof TileTurbine)
|
||||
if (!world.isRemote && !((TileTurbine) tileEntity).getMultiBlock().isConstructed())
|
||||
world.setBlockMetadataWithNotify(x, y, z, side, 3);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public int getRenderType()
|
||||
|
|
Loading…
Add table
Reference in a new issue