TechReborn/src/main/java/techreborn/blocks/BlockComputerCube.java

26 lines
765 B
Java
Raw Normal View History

package techreborn.blocks;
import net.minecraft.block.material.Material;
2015-11-18 20:51:41 +01:00
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import techreborn.Core;
import techreborn.client.GuiHandler;
public class BlockComputerCube extends BlockMachineBase {
public BlockComputerCube(Material material) {
super(material);
2015-11-23 20:19:18 +01:00
setUnlocalizedName("techreborn.computercube");
}
2015-11-18 20:51:41 +01:00
@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.pdaID, world, x,
y, z);
return true;
}
}