mirror of
https://github.com/ViaVersion/ViaLegacy.git
synced 2024-12-31 18:08:06 +01:00
Removed remap-based-on-color option
This commit is contained in:
parent
d980812b2a
commit
c00850bb25
@ -33,7 +33,6 @@ public class ViaLegacyConfig extends Config implements net.raphimc.vialegacy.pla
|
||||
private boolean legacySkinLoading;
|
||||
private boolean soundEmulation;
|
||||
private boolean oldBiomes;
|
||||
private boolean remapBasedOnColor;
|
||||
private boolean enableB1_7_3Sprinting;
|
||||
private int classicChunkRange;
|
||||
private boolean enableClassicFly;
|
||||
@ -55,7 +54,6 @@ public class ViaLegacyConfig extends Config implements net.raphimc.vialegacy.pla
|
||||
this.legacySkinLoading = this.getBoolean("legacy-skin-loading", false);
|
||||
this.soundEmulation = this.getBoolean("sound-emulation", true);
|
||||
this.oldBiomes = this.getBoolean("old-biomes", true);
|
||||
this.remapBasedOnColor = this.getBoolean("remap-based-on-color", true);
|
||||
this.enableB1_7_3Sprinting = this.getBoolean("enable-b1_7_3-sprinting", false);
|
||||
this.classicChunkRange = this.getInt("classic-chunk-range", 10);
|
||||
this.enableClassicFly = this.getBoolean("enable-classic-fly", false);
|
||||
@ -105,11 +103,6 @@ public class ViaLegacyConfig extends Config implements net.raphimc.vialegacy.pla
|
||||
return this.oldBiomes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRemapBasedOnColor() {
|
||||
return this.remapBasedOnColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean enableB1_7_3Sprinting() {
|
||||
return this.enableB1_7_3Sprinting;
|
||||
|
@ -33,8 +33,6 @@ public interface ViaLegacyConfig extends Config {
|
||||
|
||||
boolean isOldBiomes();
|
||||
|
||||
boolean isRemapBasedOnColor();
|
||||
|
||||
boolean enableB1_7_3Sprinting();
|
||||
|
||||
int getClassicChunkRange();
|
||||
|
@ -17,7 +17,6 @@
|
||||
*/
|
||||
package net.raphimc.vialegacy.protocols.release.protocol1_2_1_3to1_1.biome.beta;
|
||||
|
||||
import net.raphimc.vialegacy.ViaLegacy;
|
||||
import net.raphimc.vialegacy.api.model.ChunkCoord;
|
||||
import net.raphimc.vialegacy.protocols.release.protocol1_2_1_3to1_1.biome.IWorldChunkManager;
|
||||
import net.raphimc.vialegacy.protocols.release.protocol1_2_1_3to1_1.biome.release.NewBiomeGenBase;
|
||||
@ -34,13 +33,10 @@ public class WorldChunkManager_b1_7 implements IWorldChunkManager {
|
||||
public double[] field_4196_c;
|
||||
public OldBiomeGenBase[] field_4195_d;
|
||||
|
||||
private final boolean remapBasedOnColor;
|
||||
|
||||
public WorldChunkManager_b1_7(final long seed) {
|
||||
field_4194_e = new NoiseGeneratorOctaves2(new Random(seed * 9871L), 4);
|
||||
field_4193_f = new NoiseGeneratorOctaves2(new Random(seed * 39811L), 4);
|
||||
field_4192_g = new NoiseGeneratorOctaves2(new Random(seed * 0x84a59L), 2);
|
||||
this.remapBasedOnColor = ViaLegacy.getConfig().isRemapBasedOnColor();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -48,11 +44,7 @@ public class WorldChunkManager_b1_7 implements IWorldChunkManager {
|
||||
final byte[] biomeData = new byte[256];
|
||||
for (int x = 0; x < 16; x++) {
|
||||
for (int z = 0; z < 16; z++) {
|
||||
if (this.remapBasedOnColor) {
|
||||
biomeData[z << 4 | x] = (byte) this.getBiomeGenAt((chunkX * 16) + x, (chunkZ * 16) + z).colorBiomeID;
|
||||
} else {
|
||||
biomeData[z << 4 | x] = (byte) this.getBiomeGenAt((chunkX * 16) + x, (chunkZ * 16) + z).biomeID;
|
||||
}
|
||||
biomeData[z << 4 | x] = (byte) this.getBiomeGenAt((chunkX * 16) + x, (chunkZ * 16) + z).biomeID;
|
||||
}
|
||||
}
|
||||
return biomeData;
|
||||
|
@ -26,8 +26,8 @@ public class NewBiomeGenBase {
|
||||
public static final NewBiomeGenBase desert = new NewBiomeGenBase(2).setTemperatureRainfall(2.0F, 0.0F);
|
||||
public static final NewBiomeGenBase extremeHills = new NewBiomeGenBase(3).setTemperatureRainfall(0.2F, 0.3F);
|
||||
public static final NewBiomeGenBase forest = new NewBiomeGenBase(4).setTemperatureRainfall(0.7F, 0.8F);
|
||||
public static final NewBiomeGenBase taiga = new NewBiomeGenBase(5, 30).setTemperatureRainfall(0.05F, 0.8F);
|
||||
public static final NewBiomeGenBase swampland = new NewBiomeGenBase(6, 1).setTemperatureRainfall(0.8F, 0.9F);
|
||||
public static final NewBiomeGenBase taiga = new NewBiomeGenBase(5).setTemperatureRainfall(0.05F, 0.8F);
|
||||
public static final NewBiomeGenBase swampland = new NewBiomeGenBase(6).setTemperatureRainfall(0.8F, 0.9F);
|
||||
public static final NewBiomeGenBase river = new NewBiomeGenBase(7);
|
||||
public static final NewBiomeGenBase hell = new NewBiomeGenBase(8).setTemperatureRainfall(2.0F, 0.0F);
|
||||
public static final NewBiomeGenBase sky = new NewBiomeGenBase(9);
|
||||
@ -49,23 +49,16 @@ public class NewBiomeGenBase {
|
||||
public static final NewBiomeGenBase mutatedJungleEdge = new NewBiomeGenBase(151); //This is here for the OldWorldChunkManager
|
||||
|
||||
public final int biomeID;
|
||||
public int colorBiomeID;
|
||||
public float temperature;
|
||||
public float rainfall;
|
||||
|
||||
protected NewBiomeGenBase(int i) {
|
||||
biomeID = i;
|
||||
colorBiomeID = i;
|
||||
if (i <= 20) {
|
||||
BIOME_LIST[i] = this;
|
||||
}
|
||||
}
|
||||
|
||||
public NewBiomeGenBase(int i, int colorBiomeID) {
|
||||
this(i);
|
||||
this.colorBiomeID = colorBiomeID;
|
||||
}
|
||||
|
||||
private NewBiomeGenBase setTemperatureRainfall(float f, float f1) {
|
||||
if (f > 0.1F && f < 0.2F) {
|
||||
throw new IllegalArgumentException("Please avoid temperatures in the range 0.1 - 0.2 because of snow");
|
||||
|
@ -18,7 +18,6 @@
|
||||
package net.raphimc.vialegacy.protocols.release.protocol1_2_1_3to1_1.biome.release;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import net.raphimc.vialegacy.ViaLegacy;
|
||||
import net.raphimc.vialegacy.protocols.release.protocol1_2_1_3to1_1.biome.IWorldChunkManager;
|
||||
import net.raphimc.vialegacy.protocols.release.protocol1_2_1_3to1_1.biome.release.genlayer.GenLayer;
|
||||
|
||||
@ -29,12 +28,9 @@ public class WorldChunkManager_r1_1 implements IWorldChunkManager {
|
||||
private GenLayer rainfallLayer;
|
||||
private final BiomeCache biomeCache;
|
||||
|
||||
private final boolean remapBasedOnColor;
|
||||
|
||||
protected WorldChunkManager_r1_1() {
|
||||
IntCache.resetEverything();
|
||||
biomeCache = new BiomeCache(this);
|
||||
this.remapBasedOnColor = ViaLegacy.getConfig().isRemapBasedOnColor();
|
||||
}
|
||||
|
||||
public WorldChunkManager_r1_1(final UserConnection user, final long seed) {
|
||||
@ -50,11 +46,7 @@ public class WorldChunkManager_r1_1 implements IWorldChunkManager {
|
||||
final byte[] biomeData = new byte[256];
|
||||
for (int x = 0; x < 16; x++) {
|
||||
for (int z = 0; z < 16; z++) {
|
||||
if (this.remapBasedOnColor) {
|
||||
biomeData[z << 4 | x] = (byte) this.getBiomeGenAt((chunkX * 16) + x, (chunkZ * 16) + z).colorBiomeID;
|
||||
} else {
|
||||
biomeData[z << 4 | x] = (byte) this.getBiomeGenAt((chunkX * 16) + x, (chunkZ * 16) + z).biomeID;
|
||||
}
|
||||
biomeData[z << 4 | x] = (byte) this.getBiomeGenAt((chunkX * 16) + x, (chunkZ * 16) + z).biomeID;
|
||||
}
|
||||
}
|
||||
return biomeData;
|
||||
|
@ -18,9 +18,6 @@ sound-emulation: true
|
||||
# Calculate <= 1.1 biomes. Requires a lot of extra calculations
|
||||
old-biomes: true
|
||||
#
|
||||
# Remap <= 1.1 biomes based on color
|
||||
remap-based-on-color: true
|
||||
#
|
||||
# Enables sprinting for versions below beta 1.8. !THIS CAN CAUSE ISSUES WITH ANTI-CHEAT PLUGINS!
|
||||
enable-b1_7_3-sprinting: false
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user