diff --git a/src/main/java/com/lovetropics/extras/data/poi/Poi.java b/src/main/java/com/lovetropics/extras/data/poi/Poi.java index 4a13acb5..11ab05d8 100644 --- a/src/main/java/com/lovetropics/extras/data/poi/Poi.java +++ b/src/main/java/com/lovetropics/extras/data/poi/Poi.java @@ -20,8 +20,7 @@ public final class Poi { ExtraCodecs.COMPONENT.fieldOf("description").forGetter(Poi::description), ResourceLocation.CODEC.fieldOf("resourceLocation").forGetter(Poi::resourceLocation), GlobalPos.CODEC.fieldOf("blockPos").forGetter(Poi::globalPos), - Codec.BOOL.fieldOf("enabled").forGetter(Poi::enabled), - Codec.list(UUIDUtil.CODEC).fieldOf("faces").forGetter(Poi::faces) + Codec.BOOL.fieldOf("enabled").forGetter(Poi::enabled) ).apply(i, Poi::new)); private final String name; @@ -46,6 +45,20 @@ public Poi( this.faces = new ArrayList<>(faces); } + public Poi( + String name, + Component description, + ResourceLocation resourceLocation, + GlobalPos globalPos, + boolean enabled) { + this.name = name; + this.description = description; + this.resourceLocation = resourceLocation; + this.globalPos = globalPos; + this.enabled = enabled; + this.faces = new ArrayList<>(); + } + //Use only the name for equals&hashCode. Maybe tiny bit risky but dupe handling is free @Override public boolean equals(final Object o) {