Fixed OC support for String arguments

This commit is contained in:
LemADEC 2016-02-08 03:38:11 +01:00
parent 3aedd45881
commit edfc9bdf0c

View file

@ -144,12 +144,12 @@ public abstract class TileEntityAbstractInterfaced extends TileEntityAbstractBas
if (OC_node != null && OC_node.host() == this) { if (OC_node != null && OC_node.host() == this) {
OC_node.load(tag.getCompoundTag("oc:node")); OC_node.load(tag.getCompoundTag("oc:node"));
} else { } else {
WarpDrive.logger.error("OC node failed to construct or wrong host, ignoring NBT node data read..."); WarpDrive.logger.error(this + " OC node failed to construct or wrong host, ignoring NBT node data read...");
} }
if (OC_fileSystem != null && OC_fileSystem.node() != null) { if (OC_fileSystem != null && OC_fileSystem.node() != null) {
OC_fileSystem.node().load(tag.getCompoundTag("oc:fs")); OC_fileSystem.node().load(tag.getCompoundTag("oc:fs"));
} else { } else if (OC_hasResource) {
WarpDrive.logger.error("OC filesystem failed to construct or wrong node, ignoring NBT filesystem data read..."); WarpDrive.logger.error(this + " OC filesystem failed to construct or wrong node, ignoring NBT filesystem data read...");
} }
} }
} }
@ -182,7 +182,11 @@ public abstract class TileEntityAbstractInterfaced extends TileEntityAbstractBas
Object[] arguments = new Object[args.count()]; Object[] arguments = new Object[args.count()];
int index = 0; int index = 0;
for (Object arg:args) { for (Object arg:args) {
if (args.isString(index)) {
arguments[index] = args.checkString(index);
} else {
arguments[index] = arg; arguments[index] = arg;
}
index++; index++;
} }
return arguments; return arguments;