Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
56fb795157 | |||
4b831cb6a1 | |||
cada2e99cd | |||
e6aab9cd19 | |||
8409042838 |
|
@ -1,15 +1,16 @@
|
||||||
plugins {
|
plugins {
|
||||||
id("jfmod") version "1.5-SNAPSHOT"
|
id("jfmod") version "1.6-SNAPSHOT"
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects { group = "io.gitlab.jfronny" }
|
allprojects { group = "io.gitlab.jfronny" }
|
||||||
base.archivesName = "quickmath"
|
base.archivesName = "quickmath"
|
||||||
|
|
||||||
jfMod {
|
jfMod {
|
||||||
minecraftVersion = "1.20.1"
|
minecraftVersion = "1.21"
|
||||||
yarn("build.10")
|
yarn("build.1")
|
||||||
loaderVersion = "0.14.22"
|
loaderVersion = "0.15.11"
|
||||||
libJfVersion = "3.12.5"
|
libJfVersion = "3.16.0"
|
||||||
|
fabricApiVersion = "0.100.1+1.21"
|
||||||
|
|
||||||
modrinth {
|
modrinth {
|
||||||
projectId = "quickmath"
|
projectId = "quickmath"
|
||||||
|
@ -24,11 +25,15 @@ jfMod {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
modImplementation("io.gitlab.jfronny.libjf:libjf-config-core-v1:${jfMod.libJfVersion.get()}")
|
modImplementation("io.gitlab.jfronny.libjf:libjf-config-core-v2")
|
||||||
modImplementation("io.gitlab.jfronny.libjf:libjf-unsafe-v0:${jfMod.libJfVersion.get()}")
|
modImplementation("io.gitlab.jfronny.libjf:libjf-unsafe-v0")
|
||||||
|
|
||||||
// Dev env
|
// Dev env
|
||||||
modLocalRuntime("io.gitlab.jfronny.libjf:libjf-config-ui-tiny-v1:${jfMod.libJfVersion.get()}")
|
modLocalRuntime("io.gitlab.jfronny.libjf:libjf-config-ui-tiny")
|
||||||
modLocalRuntime("io.gitlab.jfronny.libjf:libjf-devutil:${jfMod.libJfVersion.get()}")
|
modLocalRuntime("io.gitlab.jfronny.libjf:libjf-devutil")
|
||||||
modLocalRuntime("com.terraformersmc:modmenu:7.2.2")
|
modLocalRuntime("com.terraformersmc:modmenu:11.0.0-beta.1")
|
||||||
|
// for modmenu
|
||||||
|
modLocalRuntime("net.fabricmc.fabric-api:fabric-resource-loader-v0")
|
||||||
|
modLocalRuntime("net.fabricmc.fabric-api:fabric-screen-api-v1")
|
||||||
|
modLocalRuntime("net.fabricmc.fabric-api:fabric-key-binding-api-v1")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package io.gitlab.jfronny.quickmath;
|
package io.gitlab.jfronny.quickmath;
|
||||||
|
|
||||||
import io.gitlab.jfronny.libjf.config.api.v1.Entry;
|
import io.gitlab.jfronny.libjf.config.api.v2.Entry;
|
||||||
import io.gitlab.jfronny.libjf.config.api.v1.JfConfig;
|
import io.gitlab.jfronny.libjf.config.api.v2.JfConfig;
|
||||||
import io.gitlab.jfronny.libjf.config.api.v1.dsl.ConfigBuilder;
|
import io.gitlab.jfronny.libjf.config.api.v2.dsl.ConfigBuilder;
|
||||||
|
import io.gitlab.jfronny.libjf.config.api.v2.dsl.Migration;
|
||||||
|
|
||||||
@JfConfig(tweaker = Cfg.Migrations.class)
|
@JfConfig(tweaker = Cfg.Migrations.class)
|
||||||
public class Cfg {
|
public class Cfg {
|
||||||
|
@ -34,11 +35,11 @@ public class Cfg {
|
||||||
|
|
||||||
public static class Migrations {
|
public static class Migrations {
|
||||||
public static ConfigBuilder<?> tweak(ConfigBuilder<?> builder) {
|
public static ConfigBuilder<?> tweak(ConfigBuilder<?> builder) {
|
||||||
return builder.addMigration("corruptGenericMath2", reader -> {
|
return builder.addMigration("corruptGenericMath2", Migration.of(reader -> {
|
||||||
if (reader.nextBoolean()) corruptGenericMath = CorruptionLevel2.FULL;
|
if (reader.nextBoolean()) corruptGenericMath = CorruptionLevel2.FULL;
|
||||||
}).addMigration("corruptTrigonometry2", reader -> {
|
})).addMigration("corruptTrigonometry2", Migration.of(reader -> {
|
||||||
if (!reader.nextBoolean()) corruptTrigonometry = CorruptionLevel2.MAJOR;
|
if (!reader.nextBoolean()) corruptTrigonometry = CorruptionLevel2.MAJOR;
|
||||||
});
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package io.gitlab.jfronny.quickmath;
|
package io.gitlab.jfronny.quickmath;
|
||||||
|
|
||||||
import io.gitlab.jfronny.commons.log.*;
|
import io.gitlab.jfronny.commons.logger.SystemLoggerPlus;
|
||||||
import net.fabricmc.api.*;
|
import net.fabricmc.api.*;
|
||||||
|
|
||||||
public class ModMain implements ModInitializer {
|
public class ModMain implements ModInitializer {
|
||||||
public static final Logger LOGGER = Logger.forName("quickmäth");
|
public static final SystemLoggerPlus LOGGER = SystemLoggerPlus.forName("quickmäth");
|
||||||
@Override
|
@Override
|
||||||
public void onInitialize() {
|
public void onInitialize() {
|
||||||
LOGGER.info("QuickMäth initialized, but why are you using this?");
|
LOGGER.info("QuickMäth initialized, but why are you using this?");
|
||||||
|
|
|
@ -12,11 +12,19 @@ public abstract class MathHelperMixin {
|
||||||
@Shadow public static int floor(double value) { return 0; }
|
@Shadow public static int floor(double value) { return 0; }
|
||||||
@Shadow public static double nextDouble(Random random, double min, double max) { return 0; }
|
@Shadow public static double nextDouble(Random random, double min, double max) { return 0; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author JFronny
|
||||||
|
* @reason Reduce precision
|
||||||
|
*/
|
||||||
@Overwrite
|
@Overwrite
|
||||||
public static long lfloor(double d) {
|
public static long lfloor(double d) {
|
||||||
return (long) (Math.floor(d / 4) * 4);
|
return (long) (Math.floor(d / 4) * 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author JFronny
|
||||||
|
* @reason Introduce variation
|
||||||
|
*/
|
||||||
@Overwrite
|
@Overwrite
|
||||||
public static double absMax(double d, double e) {
|
public static double absMax(double d, double e) {
|
||||||
if (d > 0.0D) {
|
if (d > 0.0D) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user