Open
Description
Both of these types have the following implementations of canSerializeIn
:
@Override
public boolean canSerializeIn(HolderOwner<T> holderOwner) {
return this.registryLookup.canSerializeIn(holderOwner);
}
This is fine for data objects, as the registryLookup
will be the holderOwner
. However, for built-in objects, the holderOwner
is the built-in registry.
Since RegistryLookup
has this implementation of canSerializeIn
:
default boolean canSerializeIn(HolderOwner<T> owner) {
return owner == this;
}
It fails, and the holder set codec refuses to supply the object. These types need to retain the value of RegistryOps#owner(ResourceKey)
to properly implement canSerializeIn
.