2015-05-08 01:39:17 +02:00
|
|
|
package techreborn.blocks.machine;
|
2015-04-13 19:40:13 +02:00
|
|
|
|
|
|
|
import net.minecraft.block.material.Material;
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
|
|
|
import net.minecraft.world.World;
|
|
|
|
import techreborn.Core;
|
2015-05-08 01:39:17 +02:00
|
|
|
import techreborn.blocks.BlockMachineBase;
|
2015-04-13 19:40:13 +02:00
|
|
|
import techreborn.client.GuiHandler;
|
|
|
|
import techreborn.tiles.TileCentrifuge;
|
2015-07-02 20:51:24 +02:00
|
|
|
|
2015-04-28 17:18:32 +02:00
|
|
|
public class BlockCentrifuge extends BlockMachineBase {
|
2015-04-13 19:40:13 +02:00
|
|
|
|
2015-08-09 12:05:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
public BlockCentrifuge() {
|
|
|
|
super(Material.rock);
|
2015-11-23 20:19:18 +01:00
|
|
|
setUnlocalizedName("techreborn.centrifuge");
|
2015-08-09 12:05:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
|
|
|
return new TileCentrifuge();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean onBlockActivated(World world, int x, int y, int z,
|
|
|
|
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
|
|
|
if (!player.isSneaking())
|
|
|
|
player.openGui(Core.INSTANCE, GuiHandler.centrifugeID, world, x, y,
|
|
|
|
z);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-04-13 19:40:13 +02:00
|
|
|
}
|