TypeSerializationLibrary typeSerializationLibrary = new TypeSerializationLibrary(library.getSerializationLibrary());
typeSerializationLibrary.add(EntityRef.class, new NetEntityRefTypeHandler(this, blockEntityRegistry));
// TODO: Add network override types here (that use id lookup tables)
eventSerializer = new EventSerializer(library.getEventLibrary(), typeSerializationLibrary);
entitySerializer = new NetworkEntitySerializer(newEntityManager, entityManager.getComponentLibrary(), typeSerializationLibrary);
entitySerializer.setComponentSerializeCheck(new NetComponentSerializeCheck());
if (mode == NetworkMode.CLIENT) {
entityManager.setEntityRefStrategy(new NetworkClientRefStrategy(this));
applySerializationTables();