add redstone controls

This commit is contained in:
Raoul Van den Berge
2015-12-18 15:10:38 +01:00
parent 8bf0f66530
commit 2bae408c59
23 changed files with 376 additions and 98 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.StorageCraft;
import storagecraft.tile.TileStorageProxy;
public class BlockStorageProxy extends BlockBase implements ITileEntityProvider {
@@ -21,6 +23,15 @@ public class BlockStorageProxy extends BlockBase implements ITileEntityProvider
return new TileStorageProxy();
}
@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(StorageCraft.INSTANCE, StorageCraft.GUI.STORAGE_PROXY, world, x, y, z);
}
return true;
}
@Override
public void registerBlockIcons(IIconRegister register) {
frontIcon = register.registerIcon("storagecraft:storageProxy");