Skip to content

Commit

Permalink
remove custom argument type
Browse files Browse the repository at this point in the history
  • Loading branch information
tristankechlo committed Oct 17, 2024
1 parent ab13ecd commit 1f21578
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 91 deletions.
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### Version 1.20.1 - 2.1.3

- remove custom argument type, which caused some incompatibilities with other mods

### Version 1.20.1 - 2.1.1

- fix potential render error that would make snail-shells invisible with some shaders
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import groovy.json.JsonOutput
import groovy.json.JsonSlurper

plugins {
id 'fabric-loom' version '1.6-SNAPSHOT' apply(false)
id 'fabric-loom' version '1.8-SNAPSHOT' apply(false)
id 'net.minecraftforge.gradle' version '[6.0,6.2)' apply(false)
id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT' apply(false)
id("org.spongepowered.mixin") version "0.7-SNAPSHOT" apply(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@ public final class LivingThingsCommand {

public static void register(CommandDispatcher<CommandSourceStack> dispatcher) {
LiteralArgumentBuilder<CommandSourceStack> command = literal(LivingThings.MOD_ID)
.then(argument("type", ProjectLinksArgumentType.get()).executes(LivingThingsCommand::execute));
.then(literal("github").executes((context) -> display(context, ProjectLinks.GITHUB)))
.then(literal("issue").executes((context) -> display(context, ProjectLinks.GITHUB_ISSUES)))
.then(literal("wiki").executes((context) -> display(context, ProjectLinks.GITHUB_WIKI)))
.then(literal("discord").executes((context) -> display(context, ProjectLinks.DISCORD)))
.then(literal("curseforge").executes((context) -> display(context, ProjectLinks.CURSEFORGE)))
.then(literal("modrinth").executes((context) -> display(context, ProjectLinks.MODRINTH)));
dispatcher.register(command);
LivingThings.LOGGER.info("Command '/{}' registered", LivingThings.MOD_ID);
}

private static int execute(CommandContext<CommandSourceStack> context) {
ProjectLinks type = context.getArgument("type", ProjectLinks.class);
private static int display(CommandContext<CommandSourceStack> context, ProjectLinks type) {
CommandSourceStack source = context.getSource();
Component link = clickableLink(type.getUrl());
Component message = Component.literal(type.getMessage()).withStyle(ChatFormatting.WHITE).append(link);
Expand Down

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion common/src/main/resources/livingthings.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"compatibilityLevel": "JAVA_17",
"minVersion": "0.8",
"mixins": [
"ArgumentTypesMixin",
"PlayerMixin",
"SpawnPlacementsInvoker",
"entity.MobAccessor",
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ forge_loader_range=[47,)

# Fabric
fabric_version=0.92.2+1.20.1
fabric_loader_version=0.15.11
fabric_loader_version=0.16.5
fabric_loader_min=0.14
fabric_range_min_inclusive=1.20.1
fabric_range_max_exclusive=1.20.2
Expand All @@ -22,7 +22,7 @@ fabric_range_max_exclusive=1.20.2
mod_name=LivingThings
mod_author=Buecher_wurm
mod_id=livingthings
mod_version=2.1.1
mod_version=2.1.3

# Other Mods
modmenu_version=7.2.2
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 1f21578

Please sign in to comment.