Don't sync recipe serialisers (#4156)

* Don't sync recipe serialisers

* Suppress error

* Actually fix...
This commit is contained in:
modmuss 2024-10-11 15:02:55 +01:00 committed by GitHub
parent e618fefd93
commit 90e7264282
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

@ -140,10 +140,6 @@ public class FabricRegistryInit implements ModInitializer {
// Does not seem to be serialised, only queried by id. Not synced
RegistryAttributeHolder.get(Registries.RECIPE_TYPE);
// Synced by id
RegistryAttributeHolder.get(Registries.RECIPE_SERIALIZER)
.addAttribute(RegistryAttribute.SYNCED);
// Synced by rawID in 24w03a+
RegistryAttributeHolder.get(Registries.ATTRIBUTE)
.addAttribute(RegistryAttribute.SYNCED);

View file

@ -147,6 +147,11 @@ public class RegistrySyncTest implements ModInitializer {
return;
}
if (registry.getValue().equals(Identifier.of("recipe_serializer"))) {
// Recipe serializers are not synced, as there is an unused codec left over.
return;
}
if (!RegistryAttributeHolder.get(registry).hasAttribute(RegistryAttribute.SYNCED)) {
throw new IllegalStateException("Registry " + registry.getValue() + " is not marked as SYNCED!");
}