chore: bump dependencies
ci/woodpecker/push/jfmod Pipeline failed Details

This commit is contained in:
Johannes Frohnmeyer 2023-08-14 18:14:30 +02:00
parent 63a04b2e8f
commit 660bf172e8
Signed by: Johannes
GPG Key ID: E76429612C2929F4
6 changed files with 34 additions and 34 deletions

View File

@ -1,16 +1,31 @@
import io.gitlab.jfronny.scripts.*
plugins {
id("jfmod") version "1.3-SNAPSHOT"
id("jfmod") version "1.5-SNAPSHOT"
}
allprojects { group = "io.gitlab.jfronny" }
base.archivesName = "better-whitelist"
val fabricVersion = "0.87.0+1.20.1"
val muscriptVersion = "1.4-SNAPSHOT"
jfMod {
minecraftVersion = "1.20.1"
yarn("build.10")
loaderVersion = "0.14.22"
libJfVersion = "3.12.1"
modrinth {
projectId = "better-whitelist"
requiredDependencies.addAll("fabric-api", "libjf")
}
}
dependencies {
modImplementation(fabricApi.module("fabric-networking-api-v1", prop("fabric_version")))
modImplementation(fabricApi.module("fabric-command-api-v2", prop("fabric_version")))
include(modImplementation("io.gitlab.jfronny:muscript:${prop("muscript_version")}")!!)
modImplementation("io.gitlab.jfronny.libjf:libjf-base:${prop("libjf_version")}")
modImplementation(fabricApi.module("fabric-networking-api-v1", fabricVersion))
modImplementation(fabricApi.module("fabric-command-api-v2", fabricVersion))
include(modImplementation("io.gitlab.jfronny:muscript:$muscriptVersion")!!)
modImplementation("io.gitlab.jfronny.libjf:libjf-base:${jfMod.libJfVersion.get()}")
// Dev env
modLocalRuntime("io.gitlab.jfronny.libjf:libjf-devutil:${prop("libjf_version")}")
modLocalRuntime("com.terraformersmc:modmenu:${prop("modmenu_version")}")
modLocalRuntime("io.gitlab.jfronny.libjf:libjf-devutil:${jfMod.libJfVersion.get()}")
modLocalRuntime("com.terraformersmc:modmenu:7.2.1")
}

View File

@ -1,15 +0,0 @@
# https://fabricmc.net/develop/
minecraft_version=1.20
yarn_mappings=build.1
loader_version=0.14.21
maven_group=io.gitlab.jfronny
archives_base_name=better-whitelist
modrinth_id=better-whitelist
modrinth_required_dependencies=libjf, fabric-api
libjf_version=3.8.0
fabric_version=0.83.0+1.20
modmenu_version=7.0.1
muscript_version=1.3-SNAPSHOT

View File

@ -43,7 +43,7 @@ public class BetterWhitelistClient implements ClientModInitializer {
BetterWhitelist.LOG.info("Received challenge: " + scriptSource);
DCallable script = Parser.parse(scriptSource).asDynamicExpr().get(fork).asCallable();
int paramSize = buf.readInt();
List<Dynamic<?>> params = new LinkedList<>();
List<Dynamic> params = new LinkedList<>();
for (int i = 0; i < paramSize; i++) {
params.add(Parser.parse(buf.readString()).asDynamicExpr().get(fork));
}

View File

@ -37,7 +37,7 @@ public class BetterWhitelist {
if (args.size() != 1) throw new IllegalArgumentException("Invalid number of arguments for mod: expected 1 but got " + args.size());
return FabricLoader.getInstance()
.getModContainer(args.get(0).asString().getValue())
.<Dynamic<?>>map(BetterWhitelist::wrap)
.<Dynamic>map(BetterWhitelist::wrap)
.orElse(new DNull());
}).set("println", args -> {
String s = args.size() == 0 ? "" : args.size() == 1 ? args.get(0).asString().getValue() : args.toString();
@ -51,17 +51,17 @@ public class BetterWhitelist {
"id", of(mod.getMetadata().getId()),
"name", of(mod.getMetadata().getName()),
"description", of(mod.getMetadata().getDescription()),
"authors", of(mod.getMetadata().getAuthors().stream().<Dynamic<?>>map(s -> of(s.getName())).toList()),
"contributors", of(mod.getMetadata().getContributors().stream().<Dynamic<?>>map(s -> of(s.getName())).toList()),
"authors", of(mod.getMetadata().getAuthors().stream().map(s -> of(s.getName())).toList()),
"contributors", of(mod.getMetadata().getContributors().stream().map(s -> of(s.getName())).toList()),
"version", of(mod.getMetadata().getVersion().getFriendlyString()),
"environment", of(switch (mod.getMetadata().getEnvironment()) {
case CLIENT -> "client";
case SERVER -> "server";
case UNIVERSAL -> "*";
}),
"license", of(mod.getMetadata().getLicense().stream().<Dynamic<?>>map(DFinal::of).toList()),
"license", of(mod.getMetadata().getLicense().stream().map(DFinal::of).toList()),
"contact", of(mod.getMetadata().getContact().asMap().entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, a -> of(a.getValue())))),
"depends", of(mod.getMetadata().getDependencies().stream().filter(v -> v.getKind() == ModDependency.Kind.DEPENDS).<Dynamic<?>>map(s -> of(s.getModId())).toList())
"depends", of(mod.getMetadata().getDependencies().stream().filter(v -> v.getKind() == ModDependency.Kind.DEPENDS).map(s -> of(s.getModId())).toList())
));
}
}

View File

@ -6,7 +6,7 @@ import net.fabricmc.fabric.api.networking.v1.PacketSender;
class Challenge {
public final ManualFuture<?> challengeCompleted = new ManualFuture<>();
public final ManualFuture<Dynamic<?>> response = new ManualFuture<>();
public final ManualFuture<Dynamic> response = new ManualFuture<>();
public final GameProfile profile;
public PacketSender sender;

View File

@ -16,7 +16,7 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
public class ServerScope {
public static Dynamic<?> run(Script script, Challenge challenge) {
public static Dynamic run(Script script, Challenge challenge) {
try {
return script.run(fork(challenge));
} catch (LocationalException le) {
@ -33,12 +33,12 @@ public class ServerScope {
if (!args.get(0).asBool().getValue()) throw new AssertFail(args.size() > 1 ? args.get(1).asString().getValue() : "Failed Whitelist Check");
return new DNull();
}).set("challenge", args -> {
if (args.size() == 0) throw new IllegalArgumentException("Invalid number of arguments for challenge: expected 1 or more but got 0");
if (args.isEmpty()) throw new IllegalArgumentException("Invalid number of arguments for challenge: expected 1 or more but got 0");
PacketByteBuf buf = PacketByteBufs.create();
String challengeString = Dynamic.serialize(args.get(0).asCallable());
BetterWhitelist.LOG.info("Sending challenge to " + challenge.profile.getName() + ": " + challengeString);
buf.writeString(challengeString);
List<Dynamic<?>> params = args.getValue().subList(1, args.size());
List<? extends Dynamic> params = args.getValue().subList(1, args.size());
buf.writeInt(params.size());
params.forEach(p -> buf.writeString(Dynamic.serialize(p)));
challenge.response.reset();