Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

Commit

Permalink
fix commands and other stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
msifd committed Apr 25, 2022
1 parent 0229060 commit 37f9d6b
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 18 deletions.
26 changes: 21 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'

Expand Down Expand Up @@ -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'
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=neutral-2.6.4
mod_version=neutral-2.6.5
1 change: 1 addition & 0 deletions run/config/misca/shared.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"wikiUrlBase": "https://wiki.ariadna.su/w/",
"offtopRange": 15,
"rollRange": 15,
"trimCommandSlash": true,
"speechRanges": [
2,
5,
Expand Down
13 changes: 2 additions & 11 deletions src/main/java/msifeed/misca/charsheet/CharSkill.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/msifeed/misca/chatex/ChatexConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 37f9d6b

Please sign in to comment.