Skip to content

Commit e4e3409

Browse files
committed
1.20 forge port
1 parent 8d7ba75 commit e4e3409

19 files changed

Lines changed: 59 additions & 5 deletions

build.gradle

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ def syncEclipseRunClasspaths = tasks.register('syncEclipseRunClasspaths') {
468468
}
469469

470470
int changedLaunches = 0
471+
int changedTestExclusions = 0
471472
if (eclipseLaunchDir.isDirectory()) {
472473
File eclipseClasses = file('bin/main').canonicalFile
473474
String modClasses = "${mod_id}%%${eclipseClasses.absolutePath}"
@@ -485,6 +486,27 @@ def syncEclipseRunClasspaths = tasks.register('syncEclipseRunClasspaths') {
485486
/<mapEntry key="MOD_CLASSES" value="[^"]*"\/>/) {
486487
"<mapEntry key=\"MOD_CLASSES\" value=\"${modClasses}\"/>"
487488
}
489+
String excludeTestKey = 'org.eclipse.jdt.launching.ATTR_EXCLUDE_TEST_CODE'
490+
String excludeTestAttribute =
491+
"<booleanAttribute key=\"${excludeTestKey}\" value=\"true\"/>"
492+
String beforeTestExclusion = synced
493+
if (synced.contains("key=\"${excludeTestKey}\"")) {
494+
synced = synced.replaceFirst(
495+
/<booleanAttribute key="org\.eclipse\.jdt\.launching\.ATTR_EXCLUDE_TEST_CODE" value="[^"]*"\/>/,
496+
excludeTestAttribute)
497+
} else {
498+
int launchHeaderEnd = synced.indexOf('\n', synced.indexOf('<launchConfiguration'))
499+
if (launchHeaderEnd < 0) {
500+
throw new GradleException("Malformed Eclipse Java launch configuration: ${launchFile}")
501+
}
502+
String lineSeparator = synced.contains('\r\n') ? '\r\n' : '\n'
503+
synced = "${synced.substring(0, launchHeaderEnd + 1)}" +
504+
" ${excludeTestAttribute}${lineSeparator}" +
505+
synced.substring(launchHeaderEnd + 1)
506+
}
507+
if (beforeTestExclusion != synced) {
508+
changedTestExclusions++
509+
}
488510
if (original != synced) {
489511
launchFile.setText(synced, 'UTF-8')
490512
changedLaunches++
@@ -510,7 +532,7 @@ def syncEclipseRunClasspaths = tasks.register('syncEclipseRunClasspaths') {
510532
changedLaunchGroups++
511533
}
512534
}
513-
logger.lifecycle("Eclipse runtime paths aligned with ${eclipseCache} (${stableClasspaths.size()} Forge classpaths, ${changedProjectClasspath} project classpath, ${changedResourceExclusions} metadata exclusion, ${changedPrepareLaunches} prepare launches, ${changedLaunches} slim launches, ${changedLaunchGroups} direct project launches updated)")
535+
logger.lifecycle("Eclipse runtime paths aligned with ${eclipseCache} (${stableClasspaths.size()} Forge classpaths, ${changedProjectClasspath} project classpath, ${changedResourceExclusions} metadata exclusion, ${changedPrepareLaunches} prepare launches, ${changedLaunches} slim launches, ${changedTestExclusions} test exclusions, ${changedLaunchGroups} direct project launches updated)")
514536
}
515537
}
516538

src/main/java/zone/moddev/mc/orespawn/client/OreSpawnWorldCreationTab.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ private void buildTerrainControls(int firstRow) {
125125
value -> formationContinuity = value), firstRow + 3, 0, terrainControls);
126126
add(fluidEditorButton(COLUMN_WIDTH), firstRow + 3, 1, terrainControls);
127127

128-
add(button(Component.translatable("button.orespawn.materials"), COLUMN_WIDTH,
129-
this::openMaterials, "guide.orespawn.rocks.2"), firstRow + 4, 0, terrainControls);
128+
add(button(Component.translatable("button.orespawn.manage_strata"), COLUMN_WIDTH,
129+
this::openMaterials, "tooltip.orespawn.manage_strata"), firstRow + 4, 0, terrainControls);
130130
add(button(Component.translatable("button.orespawn.biomes_world_materials"),
131131
COLUMN_WIDTH, this::openBiomeWorldMaterials, "guide.orespawn.biomes.1"),
132132
firstRow + 4, 1, terrainControls);

src/main/java/zone/moddev/mc/orespawn/client/OreSpawnWorldSettingsScreen.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ columnWidth, BUTTON_HEIGHT, fluidEditorLabel(), button -> openFluidDeposits()),
151151
rowIndex++;
152152
addRenderableWidget(OreSpawnScreenLayout.explain(OreSpawnScreenLayout.button(
153153
this, font, left, top + (row * rowIndex),
154-
columnWidth, BUTTON_HEIGHT, Component.translatable("button.orespawn.materials"),
155-
button -> openMaterials()), "guide.orespawn.rocks.2"));
154+
columnWidth, BUTTON_HEIGHT, Component.translatable("button.orespawn.manage_strata"),
155+
button -> openMaterials()), "tooltip.orespawn.manage_strata"));
156156
addRenderableWidget(OreSpawnScreenLayout.explain(OreSpawnScreenLayout.button(
157157
this, font, right, top + (row * rowIndex++),
158158
columnWidth, BUTTON_HEIGHT,

src/main/resources/assets/orespawn/lang/de_au.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
"button.orespawn.previous": "Zurück",
3232
"button.orespawn.next": "Als nächstes",
3333
"button.orespawn.materials": "Steine und Erze...",
34+
"button.orespawn.manage_strata": "Gesteinsschichten verwalten...",
35+
"tooltip.orespawn.manage_strata": "Gesteinsschichten sind bereits aktiviert. Öffnen Sie die aktuellen Gesteins- und Erzlisten, um sie zu bearbeiten.",
3436
"button.orespawn.geomes": "Geome & Biome...",
3537
"button.orespawn.formation_details": "Benutzerdefinierte Formen...",
3638
"button.orespawn.cyano_details": "Cyano-Einstellungen...",

src/main/resources/assets/orespawn/lang/de_de.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
"button.orespawn.previous": "Zurück",
3232
"button.orespawn.next": "Als nächstes",
3333
"button.orespawn.materials": "Steine und Erze...",
34+
"button.orespawn.manage_strata": "Gesteinsschichten verwalten...",
35+
"tooltip.orespawn.manage_strata": "Gesteinsschichten sind bereits aktiviert. Öffnen Sie die aktuellen Gesteins- und Erzlisten, um sie zu bearbeiten.",
3436
"button.orespawn.geomes": "Geome & Biome...",
3537
"button.orespawn.formation_details": "Benutzerdefinierte Formen...",
3638
"button.orespawn.cyano_details": "Cyano-Einstellungen...",

src/main/resources/assets/orespawn/lang/en_ca.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
"button.orespawn.previous": "Previous",
3232
"button.orespawn.next": "Next",
3333
"button.orespawn.materials": "Rocks & Ores...",
34+
"button.orespawn.manage_strata": "Manage Rock Strata...",
35+
"tooltip.orespawn.manage_strata": "Rock strata are already enabled. Open the current rock and ore lists to edit them.",
3436
"button.orespawn.geomes": "Geomes & Biomes...",
3537
"button.orespawn.formation_details": "Custom Shapes...",
3638
"button.orespawn.cyano_details": "Cyano Settings...",

src/main/resources/assets/orespawn/lang/en_en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
"button.orespawn.previous": "Previous",
3232
"button.orespawn.next": "Next",
3333
"button.orespawn.materials": "Rocks & Ores...",
34+
"button.orespawn.manage_strata": "Manage Rock Strata...",
35+
"tooltip.orespawn.manage_strata": "Rock strata are already enabled. Open the current rock and ore lists to edit them.",
3436
"button.orespawn.geomes": "Geomes & Biomes...",
3537
"button.orespawn.formation_details": "Custom Shapes...",
3638
"button.orespawn.cyano_details": "Cyano Settings...",

src/main/resources/assets/orespawn/lang/en_gb.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
"button.orespawn.previous": "Previous",
3232
"button.orespawn.next": "Next",
3333
"button.orespawn.materials": "Rocks & Ores...",
34+
"button.orespawn.manage_strata": "Manage Rock Strata...",
35+
"tooltip.orespawn.manage_strata": "Rock strata are already enabled. Open the current rock and ore lists to edit them.",
3436
"button.orespawn.geomes": "Geomes & Biomes...",
3537
"button.orespawn.formation_details": "Custom Shapes...",
3638
"button.orespawn.cyano_details": "Cyano Settings...",

src/main/resources/assets/orespawn/lang/en_pt.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
"button.orespawn.previous": "Previous",
3232
"button.orespawn.next": "Next",
3333
"button.orespawn.materials": "Rocks & Ores...",
34+
"button.orespawn.manage_strata": "Manage Rock Strata...",
35+
"tooltip.orespawn.manage_strata": "Rock strata are already enabled. Open the current rock and ore lists to edit them.",
3436
"button.orespawn.geomes": "Geomes & Biomes...",
3537
"button.orespawn.formation_details": "Custom Shapes...",
3638
"button.orespawn.cyano_details": "Cyano Settings...",

src/main/resources/assets/orespawn/lang/en_us.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
"button.orespawn.previous": "Previous",
3232
"button.orespawn.next": "Next",
3333
"button.orespawn.materials": "Rocks & Ores...",
34+
"button.orespawn.manage_strata": "Manage Rock Strata...",
35+
"tooltip.orespawn.manage_strata": "Rock strata are already enabled. Open the current rock and ore lists to edit them.",
3436
"button.orespawn.geomes": "Geomes & Biomes...",
3537
"button.orespawn.formation_details": "Custom Shapes...",
3638
"button.orespawn.cyano_details": "Cyano Settings...",

0 commit comments

Comments
 (0)