pushing stuff to grid storage
This commit is contained in:
@@ -2,10 +2,12 @@ package storagecraft.block;
|
||||
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import storagecraft.SC;
|
||||
import storagecraft.tile.TileGrid;
|
||||
|
||||
public class BlockGrid extends BlockSC implements ITileEntityProvider {
|
||||
@@ -22,6 +24,15 @@ public class BlockGrid extends BlockSC implements ITileEntityProvider {
|
||||
return new TileGrid();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if (!world.isRemote) {
|
||||
player.openGui(SC.INSTANCE, SC.GUI.GRID, world, x, y, z);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister register) {
|
||||
iconConnected = register.registerIcon("storagecraft:gridConnected");
|
||||
|
||||
Reference in New Issue
Block a user