diff --git a/build.gradle b/build.gradle index eefdd83..db37c05 100644 --- a/build.gradle +++ b/build.gradle @@ -29,6 +29,9 @@ minecraft { runs { client { workingDirectory project.file('run') + args "--tweakClass", "org.spongepowered.asm.launch.MixinTweaker", + "--mixin", "mixins.misca.json", + "--username", "msifeed" // Recommended logging data for a userdev environment property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' @@ -38,6 +41,9 @@ minecraft { } server { + args "--tweakClass", "org.spongepowered.asm.launch.MixinTweaker", + "--mixin", "mixins.misca.json" + // Recommended logging data for a userdev environment property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' @@ -75,11 +81,21 @@ mixin { add sourceSets.main, "misca.refmap.json" } -sourceSets { - main { - resources { - srcDir 'resources' - } +processResources { + // this will ensure that this task is redone when the versions change. + inputs.property "version", project.mod_version + + // replace stuff in mcmod.info, nothing else + from(sourceSets.main.resources.srcDirs) { + include 'mcmod.info' + + // replace version and mcversion + expand 'version':project.mod_version + } + + // copy everything else except the mcmod.info + from(sourceSets.main.resources.srcDirs) { + exclude 'mcmod.info' } } diff --git a/gradle.properties b/gradle.properties index cea4a80..bc64c9c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,4 +3,4 @@ org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false -mod_version=neutral-2.6.4 \ No newline at end of file +mod_version=neutral-2.6.5 \ No newline at end of file diff --git a/run/config/misca/shared.json b/run/config/misca/shared.json index d8804f8..64bec02 100644 --- a/run/config/misca/shared.json +++ b/run/config/misca/shared.json @@ -3,6 +3,7 @@ "wikiUrlBase": "https://wiki.ariadna.su/w/", "offtopRange": 15, "rollRange": 15, + "trimCommandSlash": true, "speechRanges": [ 2, 5, diff --git a/src/main/java/msifeed/misca/charsheet/CharSkill.java b/src/main/java/msifeed/misca/charsheet/CharSkill.java index a33f7b0..ec1cef8 100644 --- a/src/main/java/msifeed/misca/charsheet/CharSkill.java +++ b/src/main/java/msifeed/misca/charsheet/CharSkill.java @@ -9,17 +9,8 @@ import net.minecraft.util.text.translation.I18n; public enum CharSkill { - psychology, - management, - thievery, - survival, - hardworking, - biology, - engineering, - sorcery, - research, - blacksmith, - magic; + thievery + ; public static final IAttribute MOD = new RangedAttribute(null, Misca.MODID + ".skillMod", 0, -5, 5); diff --git a/src/main/java/msifeed/misca/chatex/ChatexConfig.java b/src/main/java/msifeed/misca/chatex/ChatexConfig.java index f252e3e..dc6eeed 100644 --- a/src/main/java/msifeed/misca/chatex/ChatexConfig.java +++ b/src/main/java/msifeed/misca/chatex/ChatexConfig.java @@ -6,7 +6,7 @@ public class ChatexConfig { public String wikiUrlBase = "https://wiki.ariadna.su/w/"; public int offtopRange = 15; public int rollRange = 15; - + public boolean trimCommandSlash = true; public int[] speechRanges = {2, 5, 15, 30, 60}; public int getSpeechRange(String text) { diff --git a/src/main/java/msifeed/misca/chatex/client/gui/ChatexScreen.java b/src/main/java/msifeed/misca/chatex/client/gui/ChatexScreen.java index 6e514e9..8753fed 100644 --- a/src/main/java/msifeed/misca/chatex/client/gui/ChatexScreen.java +++ b/src/main/java/msifeed/misca/chatex/client/gui/ChatexScreen.java @@ -175,6 +175,9 @@ private void commitMessage() { } private void sendCommand(String msg) { + if (Misca.getSharedConfig().chat.trimCommandSlash) + msg = msg.substring(1); + msg = net.minecraftforge.event.ForgeEventFactory.onClientSendMessage(msg); if (msg.isEmpty()) return; if (ClientCommandHandler.instance.executeCommand(mc.player, msg) != 0) return;