Search in sources :

Example 1 with DedicatedServerSettings

use of net.minecraft.server.dedicated.DedicatedServerSettings in project SpongeCommon by SpongePowered.

the class MainMixin method impl$cacheBootstrapProperties.

@Redirect(method = "main", at = @At(value = "NEW", target = "net/minecraft/server/dedicated/DedicatedServerSettings"))
private static DedicatedServerSettings impl$cacheBootstrapProperties(final RegistryAccess p_i242100_1_, final Path p_i242100_2_) {
    final DedicatedServerSettings provider = new DedicatedServerSettings(p_i242100_1_, p_i242100_2_);
    final DedicatedServerProperties properties = provider.getProperties();
    BootstrapProperties.init(properties.worldGenSettings, properties.gamemode, properties.difficulty, properties.pvp, properties.hardcore, true, properties.viewDistance, p_i242100_1_);
    return provider;
}
Also used : DedicatedServerSettings(net.minecraft.server.dedicated.DedicatedServerSettings) DedicatedServerProperties(net.minecraft.server.dedicated.DedicatedServerProperties) Redirect(org.spongepowered.asm.mixin.injection.Redirect)

Aggregations

DedicatedServerProperties (net.minecraft.server.dedicated.DedicatedServerProperties)1 DedicatedServerSettings (net.minecraft.server.dedicated.DedicatedServerSettings)1 Redirect (org.spongepowered.asm.mixin.injection.Redirect)1