Compare commits

..

View file

@ -38,25 +38,6 @@
commonDir = ./patches/common; commonDir = ./patches/common;
prefix = if name == "client" then "overrides/" else ""; prefix = if name == "client" then "overrides/" else "";
sideDir = toString ./patches + "/${name}"; sideDir = toString ./patches + "/${name}";
ae-fix =
if name == "server" then
''
# Strip AE2 coremod registration from the jar — bansoukou already provides
# patched classes. The original jar's AE2ELTransformer would add
# readItemStack_ae2el_old to PacketBuffer, but bansoukou's patched
# PacketBuffer already has it, causing Duplicate method name error.
# We keep the jar for mod registration but remove the FMLCorePlugin
# manifest entry so the coremod (and its transformer) doesn't load.
mkdir -p mods/ae2-uel-v0.56.7
cd mods/ae2-uel-v0.56.7
unzip -qo ../ae2-uel-v0.56.7.jar
sed -i '/^FMLCorePlugin:/d' META-INF/MANIFEST.MF
zip -qr ../ae2-uel-v0.56.7.jar .
cd ../..
rm -rf mods/ae2-uel-v0.56.7
''
else
"";
in in
pkgs.runCommand "nomifactory-harder-${name}" pkgs.runCommand "nomifactory-harder-${name}"
{ {
@ -105,11 +86,23 @@
done done
fi fi
${ae-fix} # Strip AE2 coremod registration from the jar — bansoukou already provides
# patched classes. The original jar's AE2ELTransformer would add
# readItemStack_ae2el_old to PacketBuffer, but bansoukou's patched
# PacketBuffer already has it, causing Duplicate method name error.
# We keep the jar for mod registration but remove the FMLCorePlugin
# manifest entry so the coremod (and its transformer) doesn't load.
mkdir -p mods/ae2-uel-v0.56.7
cd mods/ae2-uel-v0.56.7
unzip -qo ../ae2-uel-v0.56.7.jar
sed -i '/^FMLCorePlugin:/d' META-INF/MANIFEST.MF
zip -qr ../ae2-uel-v0.56.7.jar .
cd ../..
rm -rf mods/ae2-uel-v0.56.7
# Inject extra mod jars into the correct directory for this side # Inject extra mod jars into the correct directory for this side
mkdir -p "${modsDir}" mkdir -p "${modsDir name}"
${builtins.concatStringsSep "\n" (map (m: "cp ${m.src} \"${modsDir}/${m.jar}\"") extraMods)} ${builtins.concatStringsSep "\n" (map (m: "cp ${m.src} \"${modsDir name}/${m.jar}\"") extraMods)}
# Repack (zip auto-appends .zip; fix if it does) # Repack (zip auto-appends .zip; fix if it does)
zip -qr "$out" . zip -qr "$out" .
@ -152,8 +145,8 @@
default = self.packages.${system}.server; default = self.packages.${system}.server;
server-oci = pkgs.dockerTools.buildImage { server-oci = pkgs.dockerTools.buildImage {
name = "git.dzuchun.ing/dzu/nomisuffory"; name = "nomifactory-harder-server";
tag = "main"; tag = "latest";
copyToRoot = pkgs.writeShellScriptBin "entrypoint" '' copyToRoot = pkgs.writeShellScriptBin "entrypoint" ''
exec ${launch-server} /srv exec ${launch-server} /srv