Skip to content

Commit

Permalink
Accept client without the mod installed
Browse files Browse the repository at this point in the history
  • Loading branch information
SmylerMC committed May 24, 2020
1 parent c1284db commit 144e088
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ forge_version = 1.12.2-14.23.5.2847
mcp_mappings = stable_39

# Mod stuff
mod_version = 1.0.0-beta2
mod_version = 1.0.0-beta3
mod_group = fr.smyler.terramap
mod_id = terramap
2 changes: 1 addition & 1 deletion src/main/java/fr/smyler/terramap/TerramapMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

@Mod(modid = TerramapMod.MODID, name = TerramapMod.NAME)
@Mod(modid = TerramapMod.MODID, name = TerramapMod.NAME, acceptableRemoteVersions = "*")
public class TerramapMod {

public static final String MODID = "terramap";
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/fr/smyler/terramap/TerramapUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public abstract class TerramapUtils {

private static Random random = new Random();

public static final long EARTH_CIRCUMFERENCE = 40075017;

public static int modulus(int a, int b) {
int mod = a%b;
return mod<0?b+mod:mod ;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/fr/smyler/terramap/gui/GuiTiledMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ private void drawInformation(int mouseX, int mouseY, float partialTicks) {
String lengthstr = "-";
int barwidth = 75;
if(Math.abs(latAtScreenBottom) < 85) {
long EARTH_CIRCUMFERENCE = 40075017;
double circAtLat = EARTH_CIRCUMFERENCE * Math.cos(Math.toRadians(latAtScreenBottom));

double circAtLat = TerramapUtils.EARTH_CIRCUMFERENCE * Math.cos(Math.toRadians(latAtScreenBottom));
double scale = circAtLat / WebMercatorUtils.getMapDimensionInPixel(this.zoomLevel) * barwidth;
String[] units = {"m", "km"};
int j=0;
Expand Down

0 comments on commit 144e088

Please sign in to comment.