Merge pull request #284 from toolbox4minecraft/removed-version-dependent-is-save-enabled-flag
removed version dependent isSaveEnabled flagmaster
commit
e81b1d5076
|
@ -80,7 +80,7 @@ public class WorldBuilder {
|
|||
MovablePlayerList movablePlayerList = new MovablePlayerList(
|
||||
playerInformationCache,
|
||||
saveDirectory,
|
||||
versionFeatures.isSaveEnabled(),
|
||||
true,
|
||||
WorldPlayerType.from(saveDirectory, levelDat));
|
||||
return create(
|
||||
minecraftInterface,
|
||||
|
|
|
@ -28,7 +28,6 @@ public enum DefaultVersionFeatures {
|
|||
// @formatter:off
|
||||
return new VersionFeatures(
|
||||
INSTANCE.enabledLayers.getValue(version),
|
||||
INSTANCE.isSaveEnabled.getValue(version),
|
||||
INSTANCE.validBiomesForStructure_Spawn.getValue(version),
|
||||
INSTANCE.validBiomesAtMiddleOfChunk_Stronghold.getValue(version),
|
||||
INSTANCE.strongholdProducerFactory.getValue(version),
|
||||
|
@ -43,7 +42,6 @@ public enum DefaultVersionFeatures {
|
|||
}
|
||||
|
||||
private final VersionFeature<List<Integer>> enabledLayers;
|
||||
private final VersionFeature<Boolean> isSaveEnabled;
|
||||
private final VersionFeature<List<Biome>> validBiomesForStructure_Spawn;
|
||||
private final VersionFeature<List<Biome>> validBiomesAtMiddleOfChunk_Stronghold;
|
||||
private final VersionFeature<TriFunction<Long, BiomeDataOracle, List<Biome>, StrongholdProducer_Base>> strongholdProducerFactory;
|
||||
|
@ -77,16 +75,6 @@ public enum DefaultVersionFeatures {
|
|||
LayerIds.END_ISLANDS,
|
||||
LayerIds.END_CITY
|
||||
).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()
|
||||
.init(
|
||||
Biome.forest,
|
||||
|
|
|
@ -13,7 +13,6 @@ import amidst.mojangapi.world.oracle.BiomeDataOracle;
|
|||
@Immutable
|
||||
public class VersionFeatures {
|
||||
private final List<Integer> enabledLayers;
|
||||
private final boolean isSaveEnabled;
|
||||
private final List<Biome> validBiomesForStructure_Spawn;
|
||||
private final List<Biome> validBiomesAtMiddleOfChunk_Stronghold;
|
||||
private final TriFunction<Long, BiomeDataOracle, List<Biome>, StrongholdProducer_Base> strongholdProducerFactory;
|
||||
|
@ -26,7 +25,6 @@ public class VersionFeatures {
|
|||
|
||||
public VersionFeatures(
|
||||
List<Integer> enabledLayers,
|
||||
boolean isSaveEnabled,
|
||||
List<Biome> validBiomesForStructure_Spawn,
|
||||
List<Biome> validBiomesAtMiddleOfChunk_Stronghold,
|
||||
TriFunction<Long, BiomeDataOracle, List<Biome>, StrongholdProducer_Base> strongholdProducerFactory,
|
||||
|
@ -37,7 +35,6 @@ public class VersionFeatures {
|
|||
List<Biome> validBiomesAtMiddleOfChunk_OceanMonument,
|
||||
List<Biome> validBiomesForStructure_OceanMonument) {
|
||||
this.enabledLayers = enabledLayers;
|
||||
this.isSaveEnabled = isSaveEnabled;
|
||||
this.validBiomesForStructure_Spawn = validBiomesForStructure_Spawn;
|
||||
this.validBiomesAtMiddleOfChunk_Stronghold = validBiomesAtMiddleOfChunk_Stronghold;
|
||||
this.strongholdProducerFactory = strongholdProducerFactory;
|
||||
|
@ -53,16 +50,6 @@ public class VersionFeatures {
|
|||
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() {
|
||||
return validBiomesForStructure_Spawn;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue