Fix formatting
This commit is contained in:
@@ -16,11 +16,13 @@ import net.minecraft.world.gen.settings.StructureSeparationSettings;
|
||||
import appeng.worldgen.meteorite.MeteoriteStructure;
|
||||
|
||||
/**
|
||||
* This Mixin will add the structure placement configuration for the meteorite structure
|
||||
* to the static final immutable map that contains them. There is currently no
|
||||
* Forge hook for this, and registering them during the registry event is already too late.
|
||||
* This Mixin will add the structure placement configuration for the meteorite
|
||||
* structure to the static final immutable map that contains them. There is
|
||||
* currently no Forge hook for this, and registering them during the registry
|
||||
* event is already too late.
|
||||
* <p>
|
||||
* If this is not done, Meteorites spawn every chunk, since that is the default for missing entries.
|
||||
* If this is not done, Meteorites spawn every chunk, since that is the default
|
||||
* for missing entries.
|
||||
*/
|
||||
@Mixin(DimensionStructuresSettings.class)
|
||||
public class DimensionStructuresSettingsMixin {
|
||||
@@ -31,8 +33,7 @@ public class DimensionStructuresSettingsMixin {
|
||||
|
||||
@Inject(method = "<clinit>", at = @At("TAIL"))
|
||||
private static void addMeteoriteSpreadConfig(CallbackInfo ci) {
|
||||
field_236191_b_ = ImmutableMap.<Structure<?>, StructureSeparationSettings>builder()
|
||||
.putAll(field_236191_b_)
|
||||
field_236191_b_ = ImmutableMap.<Structure<?>, StructureSeparationSettings>builder().putAll(field_236191_b_)
|
||||
.put(MeteoriteStructure.INSTANCE, new StructureSeparationSettings(32, 8, 124895654)).build();
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ public class DimensionTypeMixin {
|
||||
private static void addRegistryDefaults(IDynamicRegistries.Impl registryTracker, CallbackInfoReturnable<?> cir) {
|
||||
|
||||
registryTracker.func_239774_a_(SpatialDimensionManager.STORAGE_DIMENSION_TYPE,
|
||||
new DimensionType(OptionalLong.of(12000), false, false, false, false, false, false, true, false,
|
||||
false, 256, BlockTags.INFINIBURN_OVERWORLD.getName(), 1.0f));
|
||||
new DimensionType(OptionalLong.of(12000), false, false, false, false, false, false, true, false, false,
|
||||
256, BlockTags.INFINIBURN_OVERWORLD.getName(), 1.0f));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ public class MinecraftServerMixin implements DynamicDimensions {
|
||||
private SaveFormat.LevelSave anvilConverterForAnvilFile;
|
||||
|
||||
public ServerWorld addWorld(RegistryKey<World> worldId, RegistryKey<DimensionType> dimensionTypeId,
|
||||
ChunkGenerator chunkGenerator) {
|
||||
ChunkGenerator chunkGenerator) {
|
||||
Preconditions.checkArgument(!worlds.containsKey(worldId), "World with id %s already exists.",
|
||||
worldId.func_240901_a_());
|
||||
|
||||
@@ -84,9 +84,9 @@ public class MinecraftServerMixin implements DynamicDimensions {
|
||||
MinecraftServer self = (MinecraftServer) (Object) this;
|
||||
DerivedWorldInfo unmodifiableLevelProperties = new DerivedWorldInfo(this.field_240768_i_,
|
||||
serverWorldProperties);
|
||||
ServerWorld world = new ServerWorld(self, this.backgroundExecutor, this.anvilConverterForAnvilFile, unmodifiableLevelProperties,
|
||||
worldId, dimensionTypeId, dimensionType, worldGenerationProgressListener, chunkGenerator, false, seed,
|
||||
ImmutableList.of(), false);
|
||||
ServerWorld world = new ServerWorld(self, this.backgroundExecutor, this.anvilConverterForAnvilFile,
|
||||
unmodifiableLevelProperties, worldId, dimensionTypeId, dimensionType, worldGenerationProgressListener,
|
||||
chunkGenerator, false, seed, ImmutableList.of(), false);
|
||||
worldBorder.addListener(new IBorderListener.Impl(world.getWorldBorder()));
|
||||
this.worlds.put(worldId, world);
|
||||
|
||||
@@ -96,7 +96,8 @@ public class MinecraftServerMixin implements DynamicDimensions {
|
||||
generatorOptions.func_236224_e_().func_239662_d_(dimOptKey); // Otherwise it wont be saved
|
||||
// Ensure the save properties are saved, or the world will potentially be lost
|
||||
// on restart
|
||||
this.anvilConverterForAnvilFile.func_237288_a_(this.field_240767_f_, this.field_240768_i_, self.getPlayerList().getHostPlayerData());
|
||||
this.anvilConverterForAnvilFile.func_237288_a_(this.field_240767_f_, this.field_240768_i_,
|
||||
self.getPlayerList().getHostPlayerData());
|
||||
|
||||
return world;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user