use of net.runelite.cache.definitions.NpcDefinition in project runelite by runelite.
the class NpcManager method dump.
public void dump(File out) throws IOException {
out.mkdirs();
for (NpcDefinition def : npcs) {
NpcExporter exporter = new NpcExporter(def);
File targ = new File(out, def.id + ".json");
exporter.exportTo(targ);
}
}
use of net.runelite.cache.definitions.NpcDefinition in project runelite by runelite.
the class NpcManager method java.
public void java(File java) throws IOException {
System.setProperty("line.separator", "\n");
java.mkdirs();
File targ = new File(java, "NpcID.java");
try (PrintWriter fw = new PrintWriter(targ)) {
fw.println("/* This file is automatically generated. Do not edit. */");
fw.println("package net.runelite.api;");
fw.println("");
fw.println("public final class NpcID");
fw.println("{");
for (NpcDefinition def : npcs) {
if (def.name.equalsIgnoreCase("NULL")) {
continue;
}
String name = namer.name(def.name, def.id);
if (name == null) {
continue;
}
fw.println(" public static final int " + name + " = " + def.id + ";");
}
fw.println("}");
}
}
Aggregations