Remove unnecessary recreation of identifiers in VillagerTypeHelper.register ()

This commit is contained in:
Syst3ms 2024-02-18 14:01:07 +01:00 committed by modmuss50
parent e761c6698e
commit c0751a9cc4

View file

@ -56,7 +56,7 @@ public final class VillagerTypeHelper {
*/
public static VillagerType register(Identifier id) {
Objects.requireNonNull(id, "Id of villager type cannot be null");
return Registry.register(Registries.VILLAGER_TYPE, new Identifier(id.toString()), new VillagerType(id.toString()));
return Registry.register(Registries.VILLAGER_TYPE, id, new VillagerType(id.toString()));
}
/**