geforkt von Mirrors/FastAsyncWorldEdit
Compile fixes
Dieser Commit ist enthalten in:
Ursprung
98bd93c752
Commit
3e718e2e0b
@ -85,40 +85,6 @@ public final class BrushCache {
|
||||
brushCache.remove(getKey(item));
|
||||
CompoundTag display = (CompoundTag) map.get("display");
|
||||
Map<String, Tag> displayMap;
|
||||
if (tool != null) {
|
||||
String json = tool.toString(gson);
|
||||
map.put("weBrushJson", new StringTag(json));
|
||||
if (display == null) {
|
||||
map.put("display", new CompoundTag(displayMap = new HashMap<>()));
|
||||
} else {
|
||||
displayMap = ReflectionUtils.getMap(display.getValue());
|
||||
}
|
||||
displayMap.put("Lore", FaweCache.IMP.asTag(json.split("\\r?\\n")));
|
||||
String primary = (String) tool.getPrimary().getSettings().get(BrushSettings.SettingType.BRUSH);
|
||||
String secondary = (String) tool.getSecondary().getSettings().get(BrushSettings.SettingType.BRUSH);
|
||||
if (primary == null) primary = secondary;
|
||||
if (secondary == null) secondary = primary;
|
||||
if (primary != null) {
|
||||
String name = primary == secondary ? primary.split(" ")[0] : primary.split(" ")[0] + " / " + secondary.split(" ")[0];
|
||||
displayMap.put("Name", new StringTag("{\"text\":\"" + name + "\"}"));
|
||||
}
|
||||
} else if (map.containsKey("weBrushJson")) {
|
||||
map.remove("weBrushJson");
|
||||
if (display != null) {
|
||||
displayMap = ReflectionUtils.getMap(display.getValue());
|
||||
displayMap.remove("Lore");
|
||||
displayMap.remove("Name");
|
||||
if (displayMap.isEmpty()) {
|
||||
map.remove("display");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return tool;
|
||||
}
|
||||
item.setNbtData(nbt);
|
||||
if (tool != null) {
|
||||
brushCache.put(getKey(item), tool);
|
||||
}
|
||||
return tool;
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren