fix #309
This commit is contained in:
parent
2878dcb0c1
commit
ef176058ea
1 changed files with 6 additions and 6 deletions
|
@ -232,13 +232,13 @@ public class PatternRegistry {
|
|||
|
||||
/**
|
||||
* Maps angle sigs to resource locations and their preferred start dir so we can look them up in the main registry
|
||||
* Save this on the world in case the random algorithm changes.
|
||||
*/
|
||||
public static class Save extends SavedData {
|
||||
private static final String TAG_OP_ID = "op_id";
|
||||
private static final String TAG_START_DIR = "start_dir";
|
||||
|
||||
// TODO: this is slightly weird that we save it *on* the world
|
||||
// might it be better to recalculate it every time the world loads?
|
||||
// Maps hex signatures to (op ids, canonical start dir)
|
||||
private Map<String, Pair<ResourceLocation, HexDir>> lookup;
|
||||
private boolean missingEntries;
|
||||
|
||||
|
@ -279,7 +279,7 @@ public class PatternRegistry {
|
|||
public CompoundTag save(CompoundTag tag) {
|
||||
this.lookup.forEach((sig, rhs) -> {
|
||||
var entry = new CompoundTag();
|
||||
entry.putString(TAG_OP_ID, sig.toString());
|
||||
entry.putString(TAG_OP_ID, rhs.getFirst().toString());
|
||||
entry.putInt(TAG_START_DIR, rhs.getSecond().ordinal());
|
||||
tag.put(sig, entry);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue