Further updated the justfile for creating backups and patches
parent
2f9239bc28
commit
8921671f23
21
justfile
21
justfile
|
@ -6,9 +6,19 @@ modVersion := "1.4.0"
|
||||||
setup:
|
setup:
|
||||||
./cleanup.sh
|
./cleanup.sh
|
||||||
./decompile.sh
|
./decompile.sh
|
||||||
|
just create-bakups
|
||||||
|
|
||||||
[working-directory: './src/minecraft/net/minecraft/src/']
|
[working-directory: './src/minecraft/net/minecraft/src/']
|
||||||
apply-patch:
|
create-bakups:
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
(for file in $(fd --no-ignore ".java"); do
|
||||||
|
[ -e "$file" ] || continue
|
||||||
|
bak="$file.bak"
|
||||||
|
cp "$file" "$bak"
|
||||||
|
done)
|
||||||
|
|
||||||
|
[working-directory: './src/minecraft/net/minecraft/src/']
|
||||||
|
apply-patches:
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
(for file in $(fd --no-ignore ".java.bak"); do
|
(for file in $(fd --no-ignore ".java.bak"); do
|
||||||
core="${file/.bak/}"
|
core="${file/.bak/}"
|
||||||
|
@ -19,10 +29,15 @@ apply-patch:
|
||||||
done)
|
done)
|
||||||
|
|
||||||
[working-directory: './src/minecraft/net/minecraft/src/']
|
[working-directory: './src/minecraft/net/minecraft/src/']
|
||||||
create-patch:
|
create-patches:
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
(for file in $(fd --no-ignore ".java.bak"); do
|
(for file in $(fd --no-ignore ".java.bak"); do
|
||||||
core="${file/.bak/}"
|
core="${file/.bak/}"
|
||||||
|
|
||||||
|
# check to see if the file has been changed
|
||||||
|
check="$(cmp -s $file $core && echo 1 || echo 0)"
|
||||||
|
[ $check -eq 0 ] || continue
|
||||||
|
|
||||||
patch="${core}.patch"
|
patch="${core}.patch"
|
||||||
echo "Creating patch file for $core"
|
echo "Creating patch file for $core"
|
||||||
diff -Nau "$file" "$core" > "$patch" || true
|
diff -Nau "$file" "$core" > "$patch" || true
|
||||||
|
@ -31,7 +46,7 @@ create-patch:
|
||||||
build:
|
build:
|
||||||
# Delete previous builds
|
# Delete previous builds
|
||||||
fd . './builds' -e .zip --exec rm
|
fd . './builds' -e .zip --exec rm
|
||||||
just create-patch
|
just create-patches
|
||||||
./recompile.sh
|
./recompile.sh
|
||||||
./reobfuscate.sh
|
./reobfuscate.sh
|
||||||
(cd ./reobf/minecraft && zip -r "../../builds/${modName}-${modVersion}-modloader.zip" ./*)
|
(cd ./reobf/minecraft && zip -r "../../builds/${modName}-${modVersion}-modloader.zip" ./*)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--- BlockBed.java.bak 2025-04-04 22:37:36.783594000 +0300
|
--- BlockBed.java.bak 2025-04-04 22:37:36.783594000 +0300
|
||||||
+++ BlockBed.java 2025-04-04 23:36:32.041452482 +0300
|
+++ BlockBed.java 2025-04-05 00:03:29.834894265 +0300
|
||||||
@@ -22,6 +22,9 @@
|
@@ -22,6 +22,9 @@
|
||||||
|
|
||||||
public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer)
|
public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--- BlockReed.java.bak 2025-04-04 22:55:28.995768000 +0300
|
--- BlockReed.java.bak 2025-04-04 22:55:28.995768000 +0300
|
||||||
+++ BlockReed.java 2025-04-04 23:43:43.870642705 +0300
|
+++ BlockReed.java 2025-04-05 00:03:29.836894244 +0300
|
||||||
@@ -50,7 +50,7 @@
|
@@ -50,7 +50,7 @@
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -5,11 +5,11 @@ import java.util.logging.Logger;
|
||||||
public class mod_FinalBeta extends BaseMod {
|
public class mod_FinalBeta extends BaseMod {
|
||||||
|
|
||||||
public static final Logger LOGGER = Logger.getLogger("FinalBeta");
|
public static final Logger LOGGER = Logger.getLogger("FinalBeta");
|
||||||
|
|
||||||
public mod_FinalBeta() {
|
public mod_FinalBeta() {
|
||||||
// ModLoader.SetInGameHook(this, true, true);
|
// ModLoader.SetInGameHook(this, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String Version() {
|
public String Version() {
|
||||||
return "1.4.0";
|
return "1.4.0";
|
||||||
|
|
Loading…
Reference in New Issue