pushing stuff to grid storage

This commit is contained in:
Raoul Van den Berge
2015-12-12 00:04:29 +01:00
parent c271f0f5c5
commit feac88c17f
12 changed files with 385 additions and 48 deletions

View File

@@ -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");