fixed picking of blocks (creative mode)

This commit is contained in:
Florian Nücke 2013-10-01 11:02:51 +02:00
parent dff6cfa22b
commit 6f18353116
4 changed files with 18 additions and 8 deletions

View File

@ -31,7 +31,7 @@ object OpenComputers {
@SidedProxy(
clientSide = "li.cil.oc.client.Proxy",
serverSide = "li.cil.oc.server.Proxy")
serverSide = "li.cil.oc.common.Proxy")
var proxy: Proxy = null
@EventHandler

View File

@ -113,6 +113,8 @@ class Delegator(id: Int) extends Block(id, Material.iron) {
super.breakBlock(world, x, y, z, blockId, metadata)
}
override def getDamageValue(world: World, x: Int, y: Int, z: Int) = world.getBlockMetadata(x, y, z)
override def canConnectRedstone(world: IBlockAccess, x: Int, y: Int, z: Int, side: Int) =
subBlock(world, x, y, z) match {
case None => false

View File

@ -1,6 +0,0 @@
package li.cil.oc.server
import li.cil.oc.common.{Proxy => CommonProxy}
class Proxy extends CommonProxy {
}

View File

@ -5,7 +5,7 @@ import li.cil.oc.api.Network
import li.cil.oc.api.network.Message
import net.minecraft.nbt.NBTTagCompound
class FileSystem(val fileSystem: api.FileSystem, val nbt: NBTTagCompound) extends ItemComponent {
class FileSystem(val fileSystem: api.FileSystem) extends ItemComponent {
override def name = "disk"
override protected def receiveFromNeighbor(network: Network, message: Message) = message.data match {
@ -23,4 +23,18 @@ class FileSystem(val fileSystem: api.FileSystem, val nbt: NBTTagCompound) extend
// TODO
private def clean(path: String) = path
override def load(nbt: NBTTagCompound) {
super.load(nbt)
fileSystem.load(nbt.getCompoundTag("fs"))
}
override def save(nbt: NBTTagCompound) {
super.save(nbt)
val fsNbt = new NBTTagCompound()
fileSystem.save(fsNbt)
nbt.setCompoundTag("fs", fsNbt)
}
}