Remove unnecessary recreation of identifiers in VillagerTypeHelper.register ()

(cherry picked from commit c0751a9cc4)
This commit is contained in:
Syst3ms 2024-02-18 14:01:07 +01:00 committed by modmuss50
parent 2c869ded7d
commit e2e84a3c66

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()));
}
/**