Skip to content

Commit

Permalink
Fix entity nodes not being applied to the right thing
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEpicBlock committed Sep 10, 2022
1 parent 7399371 commit 21eb385
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/nl/theepicblock/polyconfig/PolyConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void registerPolys(PolyRegistry registry) {

// Apply entity nodes
declarations.entityDeclarations().forEach((identifier, entityEntry) -> {
registry.registerEntityPoly(entityEntry.vanillaReplacement(), (info, entity) -> new CustomEntityWizard<>(info, entity, entityEntry.vanillaReplacement(), entityEntry.name()));
registry.registerEntityPoly(entityEntry.moddedEntity(), (info, entity) -> new CustomEntityWizard<>(info, entity, entityEntry.vanillaReplacement(), entityEntry.name()));
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ private static void processEntity(Identifier moddedId, EntityType<?> moddedEntit
} else {
name = null;
}
resultMap.put(moddedId, new EntityEntry(baseEntity, name, regex));
resultMap.put(moddedId, new EntityEntry(moddedEntity, baseEntity, name, regex));
}

public record EntityEntry(EntityType<?> vanillaReplacement, Text name, boolean regex) {}
public record EntityEntry(EntityType<?> moddedEntity, EntityType<?> vanillaReplacement, Text name, boolean regex) {}
}

0 comments on commit 21eb385

Please sign in to comment.