Skip to content

Commit

Permalink
add civmc versions
Browse files Browse the repository at this point in the history
  • Loading branch information
okx-code committed Feb 26, 2023
1 parent b7f4a42 commit 037e655
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 10 deletions.
Empty file added civmc
Empty file.
16 changes: 15 additions & 1 deletion common/src/main/java/sh/okx/civmodern/common/radar/Radar.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
import com.mojang.blaze3d.vertex.VertexFormat.Mode;
import com.mojang.math.Matrix4f;
import com.mojang.math.Vector3f;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Collections;
import java.util.HashSet;
import java.util.Random;
Expand Down Expand Up @@ -48,6 +51,17 @@

public class Radar {

private static boolean hideY;

static {
URL resource = Radar.class.getResource("/civmc");
if (resource != null) {
hideY = true;
} else {
hideY = false;
}
}

private final EventBus eventBus;
private final ColourProvider colourProvider;
private final CivMapConfig config;
Expand Down Expand Up @@ -79,7 +93,7 @@ public void onClientTick(ClientTickEvent event) {
}

private boolean hideY() {
return false;
return hideY;
}

public void onWorldTickPing(ClientTickEvent event) {
Expand Down
18 changes: 14 additions & 4 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,26 @@ publishing {
}
}

import net.fabricmc.loom.task.RemapJarTask

task remapCivMc(type: RemapJarTask) {
inputFile.set shadowJar.archiveFile
dependsOn shadowJar
classifier "civmc-fabric"
from sourceSets.main.output
from '../civmc'
}

task cleanJar(type: Delete) {
delete fileTree('../dist') {
include "*-fabric.jar"
include "*-forge*.jar"
}
}

task copyJar(type: Copy) {
from remapJar
dependsOn cleanJar
from remapJar, remapCivMc
into '../dist'
}

build.dependsOn copyJar
copyJar.dependsOn cleanJar
build.dependsOn copyJar
18 changes: 14 additions & 4 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,26 @@ publishing {
}
}

import net.fabricmc.loom.task.RemapJarTask

task remapCivMc(type: RemapJarTask) {
inputFile.set shadowJar.archiveFile
dependsOn shadowJar
classifier "civmc-forge"
from sourceSets.main.output
from '../civmc'
}

task cleanJar(type: Delete) {
delete fileTree('../dist') {
include "*-forge.jar"
include "*-forge*.jar"
}
}

task copyJar(type: Copy) {
from remapJar
dependsOn cleanJar
from remapJar, remapCivMc
into '../dist'
}

build.dependsOn copyJar
copyJar.dependsOn cleanJar
build.dependsOn copyJar
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ minecraft_version=1.18.2
enabled_platforms=fabric,forge

archives_base_name=civmodern
mod_version=1.5
mod_version=1.5.1
maven_group=sh.okx.civmodern

architectury_version=4.2.50
Expand Down

0 comments on commit 037e655

Please sign in to comment.