Increase max allowed EEPROM label length.

This commit is contained in:
Florian Nücke 2015-05-14 22:21:40 +02:00
parent 39cf701c0f
commit f73418f231
2 changed files with 2 additions and 2 deletions

View File

@ -146,7 +146,7 @@ object Items extends ItemAPI {
override def registerEEPROM(name: String, code: Array[Byte], data: Array[Byte], readonly: Boolean): ItemStack = { override def registerEEPROM(name: String, code: Array[Byte], data: Array[Byte], readonly: Boolean): ItemStack = {
val nbt = new NBTTagCompound() val nbt = new NBTTagCompound()
if (name != null) { if (name != null) {
nbt.setString(Settings.namespace + "label", name.trim.take(16)) nbt.setString(Settings.namespace + "label", name.trim.take(24))
} }
if (code != null) { if (code != null) {
nbt.setByteArray(Settings.namespace + "eeprom", code.take(Settings.get.eepromSize)) nbt.setByteArray(Settings.namespace + "eeprom", code.take(Settings.get.eepromSize))

View File

@ -54,7 +54,7 @@ class EEPROM extends prefab.ManagedEnvironment {
if (readonly) { if (readonly) {
return result(Unit, "storage is readonly") return result(Unit, "storage is readonly")
} }
label = args.optString(0, "EEPROM").trim.take(16) label = args.optString(0, "EEPROM").trim.take(24)
if (label.length == 0) label = "EEPROM" if (label.length == 0) label = "EEPROM"
result(label) result(label)
} }