mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Fix getting entity data serializer id crashing due to improper port to new registry system (#8678)
This commit is contained in:
1 parent
9b144f4541
commit
ade2b8cc80
1 file changed
-1
@@ -1107,7 +1107,6 @@ public class ForgeHooks
|
||||
int id = vanilla.getId(serializer);
|
||||
if (id < 0)
|
||||
{
|
||||
id = ((ForgeRegistry<EntityDataSerializer<?>>) ForgeRegistries.DATA_SERIALIZERS).getID(serializer);
|
||||
// ForgeRegistries.DATA_SERIALIZERS is a deferred register now, so if this method is called too early, the registry will be null
|
||||
ForgeRegistry<EntityDataSerializer<?>> registry = (ForgeRegistry<EntityDataSerializer<?>>) ForgeRegistries.DATA_SERIALIZERS.get();
|
||||
if (registry != null)
|
||||
|
||||
Reference in new issue
Block a user