mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-18 03:36:47 -04:00
Merge 9e4f2649835057e230c6bd5a4fc599b2fd1caca4 into 7d9eac5584e238a890a388a0f697c27c7391caa4
This commit is contained in:
commit
bb38d75cbd
@ -160,14 +160,18 @@ object FileSystem extends api.detail.FileSystemAPI {
|
||||
|
||||
abstract class ItemLabel(val stack: ItemStack) extends Label
|
||||
|
||||
class ReadOnlyLabel(val label: String) extends Label {
|
||||
class ReadOnlyLabel(private var label: String) extends Label {
|
||||
def setLabel(value: String) = throw new IllegalArgumentException("label is read only")
|
||||
|
||||
def getLabel = label
|
||||
|
||||
private final val LabelTag = Settings.namespace + "fs.label"
|
||||
|
||||
override def load(nbt: NBTTagCompound) {}
|
||||
override def load(nbt: NBTTagCompound) {
|
||||
if (nbt.hasKey(LabelTag)) {
|
||||
label = nbt.getString(LabelTag)
|
||||
}
|
||||
}
|
||||
|
||||
override def save(nbt: NBTTagCompound) {
|
||||
if (label != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user