Cover terrain service NPCs and fix Citizens test imports
This commit is contained in:
parent
dbf4bb25ff
commit
b11145bfbb
1 changed files with 1161 additions and 1125 deletions
|
|
@ -190,7 +190,7 @@ public final class CitizensBridge implements Listener {
|
|||
private void convert(LivingEntity legacy, Object registry) throws ReflectiveOperationException {
|
||||
var marker = keys.stream().sorted(Comparator.comparing(NamespacedKey::toString)).filter(key -> legacy.getPersistentDataContainer().has(key)).findFirst().orElseThrow();
|
||||
String markerValue = legacy.getPersistentDataContainer().has(marker, PersistentDataType.STRING) ? legacy.getPersistentDataContainer().get(marker, PersistentDataType.STRING) : null;
|
||||
boolean unique = marker.toString().equals("dunecore:smuggler");
|
||||
boolean unique = marker.toString().equals("dunecore:smuggler") || marker.toString().equals("dunerealms:spice-seller");
|
||||
String stable = plugin.getName() + ":" + legacy.getWorld().getUID() + ":" + marker + ":" + (unique ? identity(legacy) : markerValue == null ? "1" : markerValue);
|
||||
Object npc = null;
|
||||
for (Object candidate : (Iterable<?>) registry) if (stable.equals(read(candidate, "dr-id"))) { npc = candidate; break; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue

Staff