use of org.spongepowered.common.world.SpongeEmptyChunk in project SpongeCommon by SpongePowered.
the class MixinChunkProviderServer method onConstruct.
@Inject(method = "<init>", at = @At("RETURN"))
private void onConstruct(WorldServer worldObjIn, IChunkLoader chunkLoaderIn, IChunkGenerator chunkGeneratorIn, CallbackInfo ci) {
this.EMPTY_CHUNK = new SpongeEmptyChunk(worldObjIn, 0, 0);
SpongeConfig<? extends GeneralConfigBase> spongeConfig = SpongeHooks.getActiveConfig(worldObjIn);
((IMixinWorldServer) worldObjIn).setActiveConfig(spongeConfig);
this.denyChunkRequests = spongeConfig.getConfig().getWorld().getDenyChunkRequests();
this.chunkUnloadDelay = spongeConfig.getConfig().getWorld().getChunkUnloadDelay() * 1000;
this.maxChunkUnloads = spongeConfig.getConfig().getWorld().getMaxChunkUnloads();
}
Aggregations