easy way to add it if your server somehow doesnt have examines:
for example item examines:
copy the contents of the item examines dump into a items.json file and place it in your main directory
then add this to ItemDefinition.java
Code:
static class ItemExamine {
public static final ItemExamine[] DEFINITIONS = new ItemExamine[25000];
public static void add(int index, ItemExamine def) {
DEFINITIONS[index] = def;
}
private static Map<Integer, ItemExamine> definitions = new HashMap<>();
public static void load() throws IOException {
System.out.println("Loading item examine info...");
List<ItemExamine> list = new Gson().fromJson(FileUtils.readFileToString(new File("items.json")), new TypeToken<List<ItemExamine>>() {
}.getType());
list.stream().filter(Objects::nonNull).forEach(item -> definitions.put((int) item.id, item));
System.out.println("Loaded " + definitions.size() + " item examine infos.");
}
public static ItemExamine forId(int id) {
return definitions.get(id);
}
public static Map<Integer, ItemExamine> getDefinitions() {
return definitions;
}
private short id;
private String examine;
public short getId() {
return id;
}
public String getName() {
return examine;
}
at end of unpackConfig()
Code:
ItemExamine.load();
add this to the end of forID(int ItemId){ right before the return
Code:
ItemExamine description = ItemExamine.forId(itemId);
if (description != null) {
String examine = description.getName();
itemDef.description = examine;
}