public BlockChunkloader() { super( Material.IRON ); ForgeChunkManager.setForcedChunkLoadingCallback( AppEng.instance(), this ); }
@SubscribeEvent public static void onPreInit(EnderIOLifecycleEvent.PreInit event) { // must register something, but the code that read that back is null-safe---in which case tickets are silently discarded on world load. Which is perfect of // the teleport tickets ForgeChunkManager.setForcedChunkLoadingCallback(EnderIO.instance, null); }
@EventHandler public void postInit(FMLPostInitializationEvent event) { proxy.postInit(event); airStateIndex = Block.getStateId(Blocks.AIR.getDefaultState()); BlockPhysicsRegistration.registerCustomBlockMasses(); BlockPhysicsRegistration.registerVanillaBlockForces(); BlockPhysicsRegistration.registerBlocksToNotPhysicise(); ForgeChunkManager.setForcedChunkLoadingCallback(INSTANCE, new VWChunkLoadingCallback()); //// We're stealing these tickets bois!//// try { Field ticketConstraintsField = ForgeChunkManager.class.getDeclaredField("ticketConstraints"); Field chunkConstraintsField = ForgeChunkManager.class.getDeclaredField("chunkConstraints"); ticketConstraintsField.setAccessible(true); chunkConstraintsField.setAccessible(true); Object ticketConstraints = ticketConstraintsField.get(null); Object chunkConstraints = chunkConstraintsField.get(null); Map<String, Integer> ticketsMap = (Map<String, Integer>) ticketConstraints; Map<String, Integer> chunksMap = (Map<String, Integer>) chunkConstraints; ticketsMap.put(MODID, Integer.MAX_VALUE); chunksMap.put(MODID, Integer.MAX_VALUE); } catch (Throwable e) { e.printStackTrace(); System.err.println("DAMMIT LEX!"); } addons.forEach(m -> m.doPostInit(event)); }
@EventHandler public void postInit(FMLPostInitializationEvent event) { CapabilityNullHandlerRegistry.registerNullHandlers(); ExtraTileDataProviderRegistry.registerExtraTileDataProviders(); ForgeChunkManager.setForcedChunkLoadingCallback(instance, new ChunkLoadingMachines()); proxy.postInit(event); }
public void preInit() { FTBUtilitiesConfig.sync(); if (FTBUtilitiesConfig.ranks.enabled) { PermissionAPI.setPermissionHandler(FTBUtilitiesPermissionHandler.INSTANCE); } FTBUtilitiesNetHandler.init(); if (!ForgeChunkManager.getConfig().hasCategory(FTBUtilities.MOD_ID)) { ForgeChunkManager.getConfig().get(FTBUtilities.MOD_ID, "maximumChunksPerTicket", 1000000).setMinValue(0); ForgeChunkManager.getConfig().get(FTBUtilities.MOD_ID, "maximumTicketCount", 1000000).setMinValue(0); ForgeChunkManager.getConfig().save(); } ForgeChunkManager.setForcedChunkLoadingCallback(FTBUtilities.INST, FTBUtilitiesLoadedChunkManager.INSTANCE); new CustomPermissionPrefixesRegistryEvent(CUSTOM_PERM_PREFIX_REGISTRY::add).post(); }
MinecraftForge.EVENT_BUS.register(new WarehouseDebugger()); ForgeChunkManager.setForcedChunkLoadingCallback(this, AWChunkLoader.INSTANCE);