Skip to content

Commit fe10fa8

Browse files
authored
Reset base to upstream 0.8.2 (#6)
* update bs * Reset to 0.8.2 upstream * spotless * Change base name to match upstream case
1 parent 21c6834 commit fe10fa8

38 files changed

+405
-482
lines changed

gradle.properties

+7-6
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ channel = stable
3333
mappingsVersion = 12
3434

3535
# Defines other MCP mappings for dependency deobfuscation.
36-
remoteMappings = https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
36+
remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
3737

3838
# Select a default username for testing your mod. You can always override this per-run by running
3939
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
@@ -61,6 +61,9 @@ gradleTokenModId =
6161
# [DEPRECATED] Mod name replacement token.
6262
gradleTokenModName =
6363

64+
# [DEPRECATED] Mod Group replacement token.
65+
gradleTokenGroupName =
66+
6467
# [DEPRECATED]
6568
# Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java
6669
# public static final String VERSION = "GRADLETOKEN_VERSION";
@@ -114,7 +117,7 @@ minimizeShadowedDependencies = true
114117
# If disabled, won't rename the shadowed classes.
115118
relocateShadowedDependencies = true
116119

117-
# Adds the GTNH maven, CurseMaven, IC2/Player maven, and some more well-known 1.7.10 repositories.
120+
# Adds the GTNH maven, CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
118121
includeWellKnownRepositories = true
119122

120123
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
@@ -123,7 +126,7 @@ includeWellKnownRepositories = true
123126
usesMavenPublishing = true
124127

125128
# Maven repository to publish the mod to.
126-
# mavenPublishUrl = https://nexus.gtnewhorizons.com/repository/releases/
129+
# mavenPublishUrl = https\://nexus.gtnewhorizons.com/repository/releases/
127130

128131
# Publishing to Modrinth requires you to set the MODRINTH_TOKEN environment variable to your current Modrinth API token.
129132
#
@@ -156,7 +159,7 @@ curseForgeRelations =
156159

157160
# Optional parameter to customize the produced artifacts. Use this to preserve artifact naming when migrating older
158161
# projects. New projects should not use this parameter.
159-
# customArchiveBaseName =
162+
customArchiveBaseName = ClimateControl
160163

161164
# Optional parameter to have the build automatically fail if an illegal version is used.
162165
# This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'.
@@ -187,5 +190,3 @@ curseForgeRelations =
187190
# This is meant to be set in $HOME/.gradle/gradle.properties.
188191
# ideaCheckSpotlessOnBuild = true
189192

190-
# Non-GTNH properties
191-
gradleTokenGroupName =

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pluginManagement {
1717
}
1818

1919
plugins {
20-
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.8'
20+
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.22'
2121
}
2222

2323

src/main/java/climateControl/DimensionManager.java

+3-5
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class DimensionManager {
6161

6262
public static Logger logger = new Zeno410Logger("DimensionManager").logger();
6363

64-
private Accessor<GenLayerRiverMix, GenLayerPack> riverMixBiome = new Accessor<GenLayerRiverMix, GenLayerPack>(
64+
private Accessor<GenLayerRiverMix, GenLayerPack> riverMixBiome = new Accessor<>(
6565
"field_75910_b",
6666
"biomePatternGeneratorChain");
6767

@@ -402,14 +402,12 @@ public void onWorldLoad(World world) {
402402
// lock manually
403403
LockGenLayers biomeLocker = new LockGenLayers();
404404
WorldChunkManager chunkGenerator = world.getWorldChunkManager();
405-
Accessor<WorldChunkManager, GenLayer> worldGenLayer = new Accessor<WorldChunkManager, GenLayer>(
406-
"field_76944_d",
407-
"genBiomes");
405+
Accessor<WorldChunkManager, GenLayer> worldGenLayer = new Accessor<>("field_76944_d", "genBiomes");
408406
GenLayer toLock = worldGenLayer.get(chunkGenerator);
409407
if (toLock instanceof GenLayerRiverMixWrapper) {
410408
toLock = original;
411409
}
412-
Accessor<GenLayerRiverMix, GenLayer> riverMixBiome = new Accessor<GenLayerRiverMix, GenLayer>(
410+
Accessor<GenLayerRiverMix, GenLayer> riverMixBiome = new Accessor<>(
413411
"field_75910_b",
414412
"biomePatternGeneratorChain");
415413
toLock = riverMixBiome.get((GenLayerRiverMix) toLock);

src/main/java/climateControl/GenLayerUpdater.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515
public class GenLayerUpdater {
1616

17-
public static final Accessor<WorldChunkManager, GenLayer> accessGenLayer = new Accessor<WorldChunkManager, GenLayer>(
17+
public static final Accessor<WorldChunkManager, GenLayer> accessGenLayer = new Accessor<>(
1818
"field_76944_d",
1919
"genBiomes");
2020

src/main/java/climateControl/LockGenLayer.java

+2-6
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,9 @@ public class LockGenLayer extends SavedNumberedItems<PlaneLocated<Integer>> {
2626

2727
public static Logger logger = new Zeno410Logger("LockedBiomes").logger();
2828

29-
private static Accessor<GenLayerPack, GenLayerPack> genLayerPackParent = new Accessor<GenLayerPack, GenLayerPack>(
30-
"field_75909_a",
31-
"parent");
29+
private static Accessor<GenLayerPack, GenLayerPack> genLayerPackParent = new Accessor<>("field_75909_a", "parent");
3230

33-
private static Accessor<GenLayer, GenLayer> genLayerParent = new Accessor<GenLayer, GenLayer>(
34-
"field_75909_a",
35-
"parent");
31+
private static Accessor<GenLayer, GenLayer> genLayerParent = new Accessor<>("field_75909_a", "parent");
3632

3733
private final Filter<GenLayer> targetLayerDetector;
3834
private final String targetName;

src/main/java/climateControl/api/ClimateControlSettings.java

+38-6
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ public class ClimateControlSettings extends Settings {
7171
private static final String zSpawnOffsetName = "zSpawnOffset";
7272
private static final String mountainsChains = "Mountains in Mountain Chains";
7373
private static final String frozenIcecapName = "Frozen Icecaps";
74+
private static final String landExpansionRoundsName = "Land Expansion Rounds";
75+
private static final String forceIceMountainsName = "Ice Mountains in Mountain Chains";
76+
private static final String forceMoutainMesasName = "Mesas in Mountain Chains";
77+
private static final String mesaMesaBordersName = "Mesas for mesa borders";
7478

7579
private final String subDirectoryName = "climateControl";
7680

@@ -92,6 +96,12 @@ public class ClimateControlSettings extends Settings {
9296
public final Mutable<Boolean> mountainChains = climateZoneCategory
9397
.booleanSetting(mountainsChains, false, "Place mountains in chains");
9498

99+
public final Mutable<Boolean> forceIceMountains = climateZoneCategory
100+
.booleanSetting(forceIceMountainsName, true, "Use Ice Mountains instead of Ice Plains in mountain chain areas");
101+
102+
public final Mutable<Boolean> MesaMountains = climateZoneCategory
103+
.booleanSetting(this.forceMoutainMesasName, true, "Use Mesas as mountains in mountain chain areas");
104+
95105
public final Mutable<Integer> bandedClimateWidth = climateZoneCategory.intSetting(
96106
bandedClimateWidthName,
97107
-1,
@@ -190,6 +200,11 @@ public class ClimateControlSettings extends Settings {
190200
public final Mutable<Integer> rescueSearchLimit = climateControlCategory
191201
.intSetting(rescueLimitName, -1, "Maximum Number of Rescue attempts. Negative numbers mean no limit");
192202

203+
public final Mutable<Boolean> mesaMesaBorders = climateControlCategory.booleanSetting(
204+
mesaMesaBordersName,
205+
false,
206+
"Use red sand mesa for mesa borders. False uses desert like vanilla");
207+
193208
public boolean cachingOn() {
194209
return true;
195210
}// {return cacheSize.value()> 0;}
@@ -225,22 +240,27 @@ public int cacheSize() {
225240
+ "SeparateLandmasses = false makes a continental world");
226241

227242
public final Mutable<Integer> largeContinentFrequency = oceanControlCategory
228-
.intSetting(largeContinentFrequencyName, 0, "frequency of large continent seeds, about 8000x16000");
243+
.intSetting(largeContinentFrequencyName, 40, "frequency of large continent seeds, about 8000x16000");
229244
public final Mutable<Integer> mediumContinentFrequency = oceanControlCategory
230-
.intSetting(mediumContinentFrequencyName, 60, "frequency of medium continent seeds, about 4000x8000");
245+
.intSetting(mediumContinentFrequencyName, 100, "frequency of medium continent seeds, about 4000x8000");
231246
public final Mutable<Integer> smallContinentFrequency = oceanControlCategory
232-
.intSetting(smallContinentFrequencyName, 120, "frequency of small continent seeds, about 2000x4000");
247+
.intSetting(smallContinentFrequencyName, 60, "frequency of small continent seeds, about 2000x4000");
233248
public final Mutable<Integer> largeIslandFrequency = oceanControlCategory
234-
.intSetting(largeIslandFrequencyName, 60, "frequency of large island seeds, about 500x1000");
249+
.intSetting(largeIslandFrequencyName, 30, "frequency of large island seeds, about 500x1000");
235250
public final Mutable<Integer> mediumIslandFrequency = oceanControlCategory.intSetting(
236251
mediumIslandFrequencyName,
237-
30,
252+
15,
238253
"frequency of medium island seeds, about 250x500, but they tend to break up into archipelagos");
239254
public final Mutable<Boolean> separateLandmasses = oceanControlCategory.booleanSetting(
240255
separateLandmassesName,
241256
true,
242257
"True mostly stops landmasses merging." + "With default settings you will get an oceanic world if true and "
243258
+ "a continental world if false");
259+
public final Mutable<Integer> landExpansionRounds = oceanControlCategory.intSetting(
260+
landExpansionRoundsName,
261+
1,
262+
"Rounds of continent and large island expansion in oceanic worlds (with separateLandmasses off). "
263+
+ "More makes continents larger and oceans narrower. Default is 1.");
244264

245265
private OceanBiomeSettings oceanBiomeSettings = new OceanBiomeSettings();
246266

@@ -298,7 +318,19 @@ public boolean doHalf() {
298318
return halfSize.value() && !quarterSize.value();
299319
}
300320

321+
private boolean vanillaMountainsForced;
322+
301323
public ArrayList<BiomeSettings> biomeSettings() {
324+
// force in ice mountains as a biome for mountains chains
325+
// this is hacky but the best quick solution
326+
if (!vanillaMountainsForced) {
327+
vanillaMountainsForced = true;
328+
if (this.mountainChains.value()) {
329+
if (this.forceIceMountains.value()) {
330+
vanillaBiomeSettings.forceIceMountains();
331+
}
332+
}
333+
}
302334
ArrayList<BiomeSettings> result = new ArrayList<BiomeSettings>();
303335
result.add(oceanBiomeSettings);
304336
if (this.vanillaBiomesOn.value()) result.add(vanillaBiomeSettings);
@@ -381,7 +413,7 @@ public void readFrom(Configuration source) {
381413
}
382414
partitioners = new ArrayList<DistributionPartitioner>();
383415
if (mountainChains.value()) {
384-
this.partitioners.add(new MountainFormer());
416+
this.partitioners.add(new MountainFormer(this.MesaMountains.value()));
385417
}
386418
}
387419

src/main/java/climateControl/biomeSettings/EBPackage.java

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
package climateControl.biomeSettings;
23

34
import climateControl.api.BiomePackage;

src/main/java/climateControl/biomeSettings/VanillaBiomeSettings.java

+9-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public class VanillaBiomeSettings extends BiomeSettings { // biome incidences. N
3939
public static final String extremeHillsName = "Extreme Hills";
4040
public static final String forestName = "Forest";
4141
public static final String icePlainsName = "Ice Plains";
42+
public static final String iceMountainsName = "Ice Mountains";
4243
public static final String jungleName = "Jungle";
4344
public static final String megaTaigaName = "Mega Taiga";
4445
public static final String mesaPlateauName = "Mesa Plateau";
@@ -66,7 +67,7 @@ public class VanillaBiomeSettings extends BiomeSettings { // biome incidences. N
6667
Element savanna = new Element(savannaName, 35, 20, true, Climate.HOT.name);
6768
Element swampland = new Element(swamplandName, 6, 10, Climate.WARM.name);
6869
Element taiga = new Element(taigaName, 5, 10, Climate.COOL.name);
69-
ID iceMountains = new ID("Ice Mountains", 13);
70+
Element iceMountains = new Element(iceMountainsName, 13, 0, Climate.SNOWY.name);
7071
ID mushroomIsland = new ID("Mushroom Island", 14);
7172
ID desertHills = new ID("Desert Hills", 17);
7273
ID forestHills = new ID("Forest Hills", 18);
@@ -159,4 +160,11 @@ public void stripIDsFrom(Configuration config) {
159160
// no action
160161
}
161162

163+
public void forceIceMountains() {
164+
if (iceMountains.biomeIncidences()
165+
.value() < 10) {
166+
iceMountains.biomeIncidences()
167+
.set(10);
168+
}
169+
}
162170
}

src/main/java/climateControl/customGenLayer/GenLayerAddBiome.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
package climateControl.customGenLayer;
33

44
import net.minecraft.world.gen.layer.GenLayer;
5-
import net.minecraft.world.gen.layer.IntCache;
65

76
import climateControl.genLayerPack.GenLayerPack;
87

@@ -28,7 +27,7 @@ public int[] getInts(int par1, int par2, int par3, int par4) {
2827
int k1 = par3 + 2;
2928
int l1 = par4 + 2;
3029
int[] aint = this.parent.getInts(i1, j1, k1, l1);
31-
int[] aint1 = IntCache.getIntCache(par3 * par4);
30+
int[] aint1 = new int[(par3 * par4)];
3231
taste(aint, k1 * l1);
3332
poison(aint1, par3 * par4);
3433

src/main/java/climateControl/customGenLayer/GenLayerAddLand.java

+8-11
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
package climateControl.customGenLayer;
33

44
import net.minecraft.world.gen.layer.GenLayer;
5-
6-
import climateControl.utils.IntPad;
5+
import net.minecraft.world.gen.layer.IntCache;
76

87
/**
98
* This is GenLayerAddIsland except that it doesn't automatically extend frozen
@@ -15,13 +14,10 @@
1514
public class GenLayerAddLand extends GenLayerNeighborTesting {
1615

1716
private final boolean separate;
18-
private final GenLayer realParent;
19-
private IntPad output = new IntPad();
2017

2118
public GenLayerAddLand(long par1, GenLayer par3GenLayer, boolean separate) {
2219
super(par1);
2320
this.parent = par3GenLayer;
24-
realParent = par3GenLayer;
2521
this.separate = separate;
2622
}
2723

@@ -35,13 +31,14 @@ public int[] getInts(int par1, int par2, int par3, int par4) {
3531
int k1 = par3 + 2;
3632
int l1 = par4 + 2;
3733
int[] aint = this.parent.getInts(i1, j1, k1, l1);
38-
int[] aint1 = output.pad(par3 * par4);
39-
poison(aint1, par3 * par4);
40-
try {
41-
taste(aint, k1 * l1);
42-
} catch (Exception e) {
43-
throw new RuntimeException(realParent.toString());
34+
taste(aint, k1 * l1);
35+
int[] aint1 = IntCache.getIntCache(par3 * par4);
36+
// intcache can be released inappropriately
37+
while (aint1 == aint) {
38+
aint1 = IntCache.getIntCache(par3 * par4);
4439
}
40+
poison(aint1, par3 * par4);
41+
taste(aint, k1 * l1);
4542

4643
for (int i2 = 0; i2 < par4; i2++) {
4744
for (int j2 = 0; j2 < par3; j2++) {

src/main/java/climateControl/customGenLayer/GenLayerBandedClimate.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import net.minecraft.world.biome.BiomeGenBase;
55
import net.minecraft.world.gen.layer.GenLayer;
6-
import net.minecraft.world.gen.layer.IntCache;
76

87
import climateControl.api.ClimateControlSettings;
98
import climateControl.api.IslandClimateMaker;
@@ -43,7 +42,7 @@ public GenLayerBandedClimate(long par1, GenLayer par3GenLayer, ClimateControlSet
4342
*/
4443
public int[] getInts(int par1, int par2, int par3, int par4) {
4544
int[] aint = this.parent.getInts(par1, par2, par3, par4);
46-
int[] aint1 = IntCache.getIntCache(par3 * par4);
45+
int[] aint1 = new int[par3 * par4];
4746

4847
for (int i1 = 0; i1 < par4; ++i1) {
4948
for (int j1 = 0; j1 < par3; ++j1) {

src/main/java/climateControl/customGenLayer/GenLayerBreakMergers.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public int[] getInts(int par1, int par2, int par3, int par4) {
5656
}
5757

5858
boolean tooDifferent(int compare, int result) {
59-
if (!isOceanic(compare) && !isOceanic(result) && ((compare < result - 2) || (compare > result + 2)))
59+
if (!isOceanic(compare) && !isOceanic(result) && ((compare < result - 3) || (compare > result + 3)))
6060
return true;
6161
return false;
6262
}

0 commit comments

Comments
 (0)