public void handleClientWorldClosing(WorldClient world) { NetworkManager client = getClientToServerNetworkManager(); // ONLY revert a non-local connection if (client != null && !client.isLocalChannel()) { PersistentRegistryManager.revertToFrozen(); } }
public RegistryData(boolean hasMore, ResourceLocation name, PersistentRegistryManager.GameDataSnapshot.Entry entry) { this.hasMore = hasMore; this.name = name; this.ids = entry.ids; this.substitutions = entry.substitutions; this.dummied = entry.dummied; }
@SuppressWarnings("deprecation") public AetherAPI() { this.iAccessoryRegistry = PersistentRegistryManager.createRegistry(new ResourceLocation("aetherAPI:accessories"), AetherAccessory.class, null, 0, MAX_REGISTRY_ID, false, null, null, null, null); this.iEnchantmentRegistry = PersistentRegistryManager.createRegistry(new ResourceLocation("aetherAPI:enchantments"), AetherEnchantment.class, null, 0, MAX_REGISTRY_ID, false, null, null, null, null); this.iEnchantmentFuelRegistry = PersistentRegistryManager.createRegistry(new ResourceLocation("aetherAPI:enchantment_fuels"), AetherEnchantmentFuel.class, null, 0, MAX_REGISTRY_ID, false, null, null, null, null); this.iFreezableRegistry = PersistentRegistryManager.createRegistry(new ResourceLocation("aetherAPI:freezables"), AetherFreezable.class, null, 0, MAX_REGISTRY_ID, false, null, null, null, null); this.iFreezableFuelRegistry = PersistentRegistryManager.createRegistry(new ResourceLocation("aetherAPI:freezable_fuels"), AetherFreezableFuel.class, null, 0, MAX_REGISTRY_ID, false, null, null, null, null); this.iMoaTypeRegistry = PersistentRegistryManager.createRegistry(new ResourceLocation("aetherAPI:moa_types"), AetherMoaType.class, null, 0, MAX_REGISTRY_ID, false, null, null, null, null); }