Skip to content

Commit 037e655

Browse files
committed
add civmc versions
1 parent b7f4a42 commit 037e655

File tree

5 files changed

+44
-10
lines changed

5 files changed

+44
-10
lines changed

civmc

Whitespace-only changes.

common/src/main/java/sh/okx/civmodern/common/radar/Radar.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
import com.mojang.blaze3d.vertex.VertexFormat.Mode;
1111
import com.mojang.math.Matrix4f;
1212
import com.mojang.math.Vector3f;
13+
import java.io.IOException;
14+
import java.io.InputStream;
15+
import java.net.URL;
1316
import java.util.Collections;
1417
import java.util.HashSet;
1518
import java.util.Random;
@@ -48,6 +51,17 @@
4851

4952
public class Radar {
5053

54+
private static boolean hideY;
55+
56+
static {
57+
URL resource = Radar.class.getResource("/civmc");
58+
if (resource != null) {
59+
hideY = true;
60+
} else {
61+
hideY = false;
62+
}
63+
}
64+
5165
private final EventBus eventBus;
5266
private final ColourProvider colourProvider;
5367
private final CivMapConfig config;
@@ -79,7 +93,7 @@ public void onClientTick(ClientTickEvent event) {
7993
}
8094

8195
private boolean hideY() {
82-
return false;
96+
return hideY;
8397
}
8498

8599
public void onWorldTickPing(ClientTickEvent event) {

fabric/build.gradle

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,26 @@ publishing {
7676
}
7777
}
7878

79+
import net.fabricmc.loom.task.RemapJarTask
80+
81+
task remapCivMc(type: RemapJarTask) {
82+
inputFile.set shadowJar.archiveFile
83+
dependsOn shadowJar
84+
classifier "civmc-fabric"
85+
from sourceSets.main.output
86+
from '../civmc'
87+
}
88+
7989
task cleanJar(type: Delete) {
8090
delete fileTree('../dist') {
81-
include "*-fabric.jar"
91+
include "*-forge*.jar"
8292
}
8393
}
8494

8595
task copyJar(type: Copy) {
86-
from remapJar
96+
dependsOn cleanJar
97+
from remapJar, remapCivMc
8798
into '../dist'
8899
}
89100

90-
build.dependsOn copyJar
91-
copyJar.dependsOn cleanJar
101+
build.dependsOn copyJar

forge/build.gradle

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,26 @@ publishing {
8484
}
8585
}
8686

87+
import net.fabricmc.loom.task.RemapJarTask
88+
89+
task remapCivMc(type: RemapJarTask) {
90+
inputFile.set shadowJar.archiveFile
91+
dependsOn shadowJar
92+
classifier "civmc-forge"
93+
from sourceSets.main.output
94+
from '../civmc'
95+
}
96+
8797
task cleanJar(type: Delete) {
8898
delete fileTree('../dist') {
89-
include "*-forge.jar"
99+
include "*-forge*.jar"
90100
}
91101
}
92102

93103
task copyJar(type: Copy) {
94-
from remapJar
104+
dependsOn cleanJar
105+
from remapJar, remapCivMc
95106
into '../dist'
96107
}
97108

98-
build.dependsOn copyJar
99-
copyJar.dependsOn cleanJar
109+
build.dependsOn copyJar

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ minecraft_version=1.18.2
44
enabled_platforms=fabric,forge
55

66
archives_base_name=civmodern
7-
mod_version=1.5
7+
mod_version=1.5.1
88
maven_group=sh.okx.civmodern
99

1010
architectury_version=4.2.50

0 commit comments

Comments
 (0)