removed version dependent isSaveEnabled flag
Nobody seems to know why it exists in the first place and to me it does not make sense.
This commit is contained in:
parent
60d94a5a5f
commit
2eb047f01f
@ -80,7 +80,7 @@ public class WorldBuilder {
|
|||||||
MovablePlayerList movablePlayerList = new MovablePlayerList(
|
MovablePlayerList movablePlayerList = new MovablePlayerList(
|
||||||
playerInformationCache,
|
playerInformationCache,
|
||||||
saveDirectory,
|
saveDirectory,
|
||||||
versionFeatures.isSaveEnabled(),
|
true,
|
||||||
WorldPlayerType.from(saveDirectory, levelDat));
|
WorldPlayerType.from(saveDirectory, levelDat));
|
||||||
return create(
|
return create(
|
||||||
minecraftInterface,
|
minecraftInterface,
|
||||||
|
@ -28,7 +28,6 @@ public enum DefaultVersionFeatures {
|
|||||||
// @formatter:off
|
// @formatter:off
|
||||||
return new VersionFeatures(
|
return new VersionFeatures(
|
||||||
INSTANCE.enabledLayers.getValue(version),
|
INSTANCE.enabledLayers.getValue(version),
|
||||||
INSTANCE.isSaveEnabled.getValue(version),
|
|
||||||
INSTANCE.validBiomesForStructure_Spawn.getValue(version),
|
INSTANCE.validBiomesForStructure_Spawn.getValue(version),
|
||||||
INSTANCE.validBiomesAtMiddleOfChunk_Stronghold.getValue(version),
|
INSTANCE.validBiomesAtMiddleOfChunk_Stronghold.getValue(version),
|
||||||
INSTANCE.strongholdProducerFactory.getValue(version),
|
INSTANCE.strongholdProducerFactory.getValue(version),
|
||||||
@ -43,7 +42,6 @@ public enum DefaultVersionFeatures {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private final VersionFeature<List<Integer>> enabledLayers;
|
private final VersionFeature<List<Integer>> enabledLayers;
|
||||||
private final VersionFeature<Boolean> isSaveEnabled;
|
|
||||||
private final VersionFeature<List<Biome>> validBiomesForStructure_Spawn;
|
private final VersionFeature<List<Biome>> validBiomesForStructure_Spawn;
|
||||||
private final VersionFeature<List<Biome>> validBiomesAtMiddleOfChunk_Stronghold;
|
private final VersionFeature<List<Biome>> validBiomesAtMiddleOfChunk_Stronghold;
|
||||||
private final VersionFeature<TriFunction<Long, BiomeDataOracle, List<Biome>, StrongholdProducer_Base>> strongholdProducerFactory;
|
private final VersionFeature<TriFunction<Long, BiomeDataOracle, List<Biome>, StrongholdProducer_Base>> strongholdProducerFactory;
|
||||||
@ -77,16 +75,6 @@ public enum DefaultVersionFeatures {
|
|||||||
LayerIds.END_ISLANDS,
|
LayerIds.END_ISLANDS,
|
||||||
LayerIds.END_CITY
|
LayerIds.END_CITY
|
||||||
).construct();
|
).construct();
|
||||||
this.isSaveEnabled = VersionFeature.<Boolean> builder()
|
|
||||||
.init(
|
|
||||||
true
|
|
||||||
).exact(RecognisedVersion._12w21a,
|
|
||||||
false
|
|
||||||
).exact(RecognisedVersion._12w21b,
|
|
||||||
false
|
|
||||||
).exact(RecognisedVersion._12w22a,
|
|
||||||
false
|
|
||||||
).construct();
|
|
||||||
this.validBiomesForStructure_Spawn = VersionFeature.<Biome> listBuilder()
|
this.validBiomesForStructure_Spawn = VersionFeature.<Biome> listBuilder()
|
||||||
.init(
|
.init(
|
||||||
Biome.forest,
|
Biome.forest,
|
||||||
|
@ -13,7 +13,6 @@ import amidst.mojangapi.world.oracle.BiomeDataOracle;
|
|||||||
@Immutable
|
@Immutable
|
||||||
public class VersionFeatures {
|
public class VersionFeatures {
|
||||||
private final List<Integer> enabledLayers;
|
private final List<Integer> enabledLayers;
|
||||||
private final boolean isSaveEnabled;
|
|
||||||
private final List<Biome> validBiomesForStructure_Spawn;
|
private final List<Biome> validBiomesForStructure_Spawn;
|
||||||
private final List<Biome> validBiomesAtMiddleOfChunk_Stronghold;
|
private final List<Biome> validBiomesAtMiddleOfChunk_Stronghold;
|
||||||
private final TriFunction<Long, BiomeDataOracle, List<Biome>, StrongholdProducer_Base> strongholdProducerFactory;
|
private final TriFunction<Long, BiomeDataOracle, List<Biome>, StrongholdProducer_Base> strongholdProducerFactory;
|
||||||
@ -26,7 +25,6 @@ public class VersionFeatures {
|
|||||||
|
|
||||||
public VersionFeatures(
|
public VersionFeatures(
|
||||||
List<Integer> enabledLayers,
|
List<Integer> enabledLayers,
|
||||||
boolean isSaveEnabled,
|
|
||||||
List<Biome> validBiomesForStructure_Spawn,
|
List<Biome> validBiomesForStructure_Spawn,
|
||||||
List<Biome> validBiomesAtMiddleOfChunk_Stronghold,
|
List<Biome> validBiomesAtMiddleOfChunk_Stronghold,
|
||||||
TriFunction<Long, BiomeDataOracle, List<Biome>, StrongholdProducer_Base> strongholdProducerFactory,
|
TriFunction<Long, BiomeDataOracle, List<Biome>, StrongholdProducer_Base> strongholdProducerFactory,
|
||||||
@ -37,7 +35,6 @@ public class VersionFeatures {
|
|||||||
List<Biome> validBiomesAtMiddleOfChunk_OceanMonument,
|
List<Biome> validBiomesAtMiddleOfChunk_OceanMonument,
|
||||||
List<Biome> validBiomesForStructure_OceanMonument) {
|
List<Biome> validBiomesForStructure_OceanMonument) {
|
||||||
this.enabledLayers = enabledLayers;
|
this.enabledLayers = enabledLayers;
|
||||||
this.isSaveEnabled = isSaveEnabled;
|
|
||||||
this.validBiomesForStructure_Spawn = validBiomesForStructure_Spawn;
|
this.validBiomesForStructure_Spawn = validBiomesForStructure_Spawn;
|
||||||
this.validBiomesAtMiddleOfChunk_Stronghold = validBiomesAtMiddleOfChunk_Stronghold;
|
this.validBiomesAtMiddleOfChunk_Stronghold = validBiomesAtMiddleOfChunk_Stronghold;
|
||||||
this.strongholdProducerFactory = strongholdProducerFactory;
|
this.strongholdProducerFactory = strongholdProducerFactory;
|
||||||
@ -53,16 +50,6 @@ public class VersionFeatures {
|
|||||||
return enabledLayers.contains(layerId);
|
return enabledLayers.contains(layerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* TODO: @skiphs why does it depend on the loaded minecraft version whether
|
|
||||||
* we can save player locations or not? we do not use the minecraft jar file
|
|
||||||
* to save player locations and it does not depend on the jar file which
|
|
||||||
* worlds can be loaded.
|
|
||||||
*/
|
|
||||||
public boolean isSaveEnabled() {
|
|
||||||
return isSaveEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<Biome> getValidBiomesForStructure_Spawn() {
|
public List<Biome> getValidBiomesForStructure_Spawn() {
|
||||||
return validBiomesForStructure_Spawn;
|
return validBiomesForStructure_Spawn;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user