chore: update to 1.20.5
This commit is contained in:
parent
25e99adc33
commit
449a54bc64
|
@ -1,16 +1,16 @@
|
|||
plugins {
|
||||
id("jfmod") version "1.5-SNAPSHOT"
|
||||
id("jfmod") version "1.6-SNAPSHOT"
|
||||
}
|
||||
|
||||
allprojects { group = "io.gitlab.jfronny" }
|
||||
base.archivesName = "dynres"
|
||||
|
||||
val fabricVersion = "0.91.1+1.20.4"
|
||||
jfMod {
|
||||
minecraftVersion = "1.20.4"
|
||||
minecraftVersion = "1.20.5"
|
||||
yarn("build.1")
|
||||
loaderVersion = "0.15.0"
|
||||
libJfVersion = "3.14.1"
|
||||
loaderVersion = "0.15.10"
|
||||
libJfVersion = "3.15.4"
|
||||
fabricApiVersion = "0.97.6+1.20.5"
|
||||
|
||||
modrinth {
|
||||
projectId = "dynres"
|
||||
|
@ -26,9 +26,13 @@ jfMod {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
modImplementation("io.gitlab.jfronny.libjf:libjf-web-v1:${jfMod.libJfVersion.get()}")
|
||||
modImplementation("io.gitlab.jfronny.libjf:libjf-config-core-v2:${jfMod.libJfVersion.get()}")
|
||||
modImplementation("io.gitlab.jfronny.libjf:libjf-web-v1")
|
||||
modImplementation("io.gitlab.jfronny.libjf:libjf-config-core-v2")
|
||||
|
||||
// Dev env
|
||||
modLocalRuntime("com.terraformersmc:modmenu:9.0.0-pre.1")
|
||||
modLocalRuntime("com.terraformersmc:modmenu:10.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")
|
||||
}
|
||||
|
|
|
@ -20,14 +20,14 @@ public abstract class ClientCommonNetworkHandlerMixin {
|
|||
|
||||
@Inject(at = @At("HEAD"), method = "onResourcePackSend(Lnet/minecraft/network/packet/s2c/common/ResourcePackSendS2CPacket;)V")
|
||||
public void logResourcePackStatus(ResourcePackSendS2CPacket status, CallbackInfo info) {
|
||||
DynRes.LOGGER.info("[RECEIVE] ResourcePackUrl=" + status.url());
|
||||
DynRes.LOGGER.info("[RECEIVE] ResourcePackHash=" + status.hash());
|
||||
DynRes.LOGGER.info("[RECEIVE] ResourcePackUrl={0}", status.url());
|
||||
DynRes.LOGGER.info("[RECEIVE] ResourcePackHash={0}", status.hash());
|
||||
}
|
||||
|
||||
@Redirect(method = "onResourcePackSend(Lnet/minecraft/network/packet/s2c/common/ResourcePackSendS2CPacket;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientCommonNetworkHandler;getParsedResourcePackUrl(Ljava/lang/String;)Ljava/net/URL;"))
|
||||
public URL logResourcePackStatus(String url) {
|
||||
URL res = getParsedResourcePackUrl(url);
|
||||
DynRes.LOGGER.info("[CHECK] ResourcePackUrlValid=" + (res != null));
|
||||
DynRes.LOGGER.info("[CHECK] ResourcePackUrlValid={0}", res != null);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||
public class ServerInfoMixin {
|
||||
@Inject(at = @At("RETURN"), method = "getResourcePackPolicy()Lnet/minecraft/client/network/ServerInfo$ResourcePackPolicy;")
|
||||
public void getResPackState(CallbackInfoReturnable<ServerInfo.ResourcePackPolicy> info) {
|
||||
DynRes.LOGGER.info("[RECEIVE] ResourcePackStatus=" + info.getReturnValue());
|
||||
DynRes.LOGGER.info("[RECEIVE] ResourcePackStatus={0}", info.getReturnValue());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
package io.gitlab.jfronny.dynres;
|
||||
|
||||
import io.gitlab.jfronny.commons.logger.SystemLoggerPlus;
|
||||
import io.gitlab.jfronny.libjf.web.api.v1.*;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
public class DynRes implements WebEntrypoint {
|
||||
public static final Logger LOGGER = LoggerFactory.getLogger("DynRes");
|
||||
public static final SystemLoggerPlus LOGGER = SystemLoggerPlus.forName("DynRes");
|
||||
public static Path packFile;
|
||||
public static String packUrl = "";
|
||||
|
||||
|
@ -30,9 +29,9 @@ public class DynRes implements WebEntrypoint {
|
|||
if (FabricLoader.getInstance().getEnvironmentType() == EnvType.SERVER && packFile != null) {
|
||||
try {
|
||||
packUrl = api.registerFile(PathSegment.of("resources.zip"), packFile, !Cfg.hashResources);
|
||||
LOGGER.info("Initialized DynRes at " + packUrl);
|
||||
LOGGER.info("Initialized DynRes at {0}", packUrl);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
LOGGER.error("Could not register DynRes resource pack", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ public abstract class ServerPropertiesHandlerMixin {
|
|||
result.append(Integer.toString((b & 0xff) + 0x100, 16).substring(1));
|
||||
}
|
||||
sha1 = result.toString();
|
||||
DynRes.LOGGER.info("Set hash to " + sha1);
|
||||
DynRes.LOGGER.info("Set hash to {0}", sha1);
|
||||
} catch (IOException | NoSuchAlgorithmException e) {
|
||||
DynRes.LOGGER.error("Failed to get hash, continuing with empty", e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue