mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-09 07:15:11 -04:00
fixed picking of blocks (creative mode)
This commit is contained in:
parent
dff6cfa22b
commit
6f18353116
@ -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
|
||||
|
@ -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
|
||||
|
@ -1,6 +0,0 @@
|
||||
package li.cil.oc.server
|
||||
|
||||
import li.cil.oc.common.{Proxy => CommonProxy}
|
||||
|
||||
class Proxy extends CommonProxy {
|
||||
}
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user