mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly Purpur Changes: PurpurMC/Purpur@9b046f36 Updated Upstream (Paper) PurpurMC/Purpur@22bd4186 Updated Upstream (Paper)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
--- a/src/main/java/org/bukkit/entity/AbstractArrow.java
|
||||
+++ b/src/main/java/org/bukkit/entity/AbstractArrow.java
|
||||
@@ -282,4 +_,11 @@
|
||||
@@ -297,4 +_,11 @@
|
||||
*/
|
||||
void setShooter(@Nullable org.bukkit.projectiles.ProjectileSource source, boolean resetPickupStatus);
|
||||
// Paper end - Fix PickupStatus getting reset
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -286,6 +_,7 @@
|
||||
@@ -287,6 +_,7 @@
|
||||
protected final DedicatedPlayerList playerList;
|
||||
private final Map<String, World> worlds = new LinkedHashMap<String, World>();
|
||||
// private final Map<Class<?>, Registry<?>> registries = new HashMap<>(); // Paper - replace with RegistryAccess
|
||||
@@ -8,7 +8,7 @@
|
||||
private YamlConfiguration configuration;
|
||||
private YamlConfiguration commandsConfiguration;
|
||||
private final Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions()));
|
||||
@@ -988,7 +_,7 @@
|
||||
@@ -989,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public List<World> getWorlds() {
|
||||
@@ -17,7 +17,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1536,6 +_,7 @@
|
||||
@@ -1537,6 +_,7 @@
|
||||
this.getLogger().log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
this.worlds.remove(world.getName().toLowerCase(Locale.ROOT));
|
||||
this.console.removeLevel(handle);
|
||||
return true;
|
||||
@@ -1554,6 +_,7 @@
|
||||
@@ -1555,6 +_,7 @@
|
||||
|
||||
@Override
|
||||
public World getWorld(UUID uid) {
|
||||
@@ -33,7 +33,7 @@
|
||||
for (World world : this.worlds.values()) {
|
||||
if (world.getUID().equals(uid)) {
|
||||
return world;
|
||||
@@ -1577,6 +_,7 @@
|
||||
@@ -1578,6 +_,7 @@
|
||||
System.out.println("World " + world.getName() + " is a duplicate of another world and has been prevented from loading. Please delete the uid.dat file from " + world.getName() + "'s world directory if you want to be able to load the duplicate world.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractArrow.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractArrow.java
|
||||
@@ -185,4 +_,11 @@
|
||||
@@ -194,4 +_,11 @@
|
||||
this.getHandle().projectileSource = shooter;
|
||||
}
|
||||
// Paper end - Fix PickupStatus getting reset
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -213,7 +_,7 @@
|
||||
@@ -214,7 +_,7 @@
|
||||
private boolean hasPlayedBefore = false;
|
||||
private final ConversationTracker conversationTracker = new ConversationTracker();
|
||||
private final Set<String> channels = new HashSet<String>();
|
||||
@@ -9,7 +9,7 @@
|
||||
private final Set<UUID> unlistedEntities = new HashSet<>(); // Paper - Add Listing API for Player
|
||||
private static final WeakHashMap<Plugin, WeakReference<Plugin>> pluginWeakReferences = new WeakHashMap<>();
|
||||
private int hash = 0;
|
||||
@@ -2269,8 +_,14 @@
|
||||
@@ -2270,8 +_,14 @@
|
||||
|
||||
@Override
|
||||
public boolean canSee(org.bukkit.entity.Entity entity) {
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
public boolean canSeePlayer(UUID uuid) {
|
||||
org.bukkit.entity.Entity entity = this.getServer().getPlayer(uuid);
|
||||
@@ -3682,4 +_,19 @@
|
||||
@@ -3684,4 +_,19 @@
|
||||
this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundPlayerCombatKillPacket(getEntityId(), io.papermc.paper.adventure.PaperAdventure.asVanilla(message)));
|
||||
}
|
||||
// Purpur end - Death screen API
|
||||
|
||||
@@ -2,7 +2,7 @@ group = org.bxteam.divinemc
|
||||
|
||||
mcVersion=1.21.4
|
||||
version=1.21.4-R0.1-SNAPSHOT
|
||||
purpurRef=e6a1ebd3f6e4cfe93f96dd82ecb3234f0482768a
|
||||
purpurRef=22bd4186ca92f21a01714ba8e6b4823ccc576c81
|
||||
experimental=false
|
||||
|
||||
org.gradle.configuration-cache=true
|
||||
|
||||
84
scripts/rebuildPatches.sh
Executable file
84
scripts/rebuildPatches.sh
Executable file
@@ -0,0 +1,84 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
force_run=false
|
||||
|
||||
if [[ "$1" == "--force" ]]; then
|
||||
force_run=true
|
||||
echo "Force mode enabled. All Gradle tasks will run."
|
||||
fi
|
||||
|
||||
echo "Processing file patches..."
|
||||
|
||||
declare -A gradle_tasks
|
||||
|
||||
process_changes() {
|
||||
local dir="$1"
|
||||
local project="$2"
|
||||
|
||||
if [ ! -d "$dir" ]; then
|
||||
echo "Error: The directory '$dir' does not exist or is not valid."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "$dir"
|
||||
|
||||
if $force_run || ! git diff --quiet || ! git diff --cached --quiet; then
|
||||
echo "Changes detected in $dir (or force mode enabled). Running Gradle fixup and rebuild tasks."
|
||||
gradle_tasks["fixup${project}FilePatches"]="true"
|
||||
gradle_tasks["rebuild${project}FilePatches"]="true"
|
||||
else
|
||||
echo "No changes detected in $dir"
|
||||
fi
|
||||
|
||||
cd - > /dev/null
|
||||
}
|
||||
|
||||
run_gradle_task() {
|
||||
local task="$1"
|
||||
if [ "${gradle_tasks[$task]}" = "true" ]; then
|
||||
echo "Running Gradle task: $task"
|
||||
./gradlew "$task" || echo "Gradle task '$task' failed, continuing..."
|
||||
echo "Gradle task '$task' completed (or failed but continuing)."
|
||||
else
|
||||
echo "Skipping Gradle task '$task' as no changes were detected."
|
||||
fi
|
||||
}
|
||||
|
||||
process_changes "./purpur-server/" "PurpurServer"
|
||||
process_changes "./purpur-api/" "PurpurApi"
|
||||
process_changes "./paper-server/" "PaperServer"
|
||||
process_changes "./paper-api/" "PaperApi"
|
||||
process_changes "./divinemc-server/src/minecraft/java" "Minecraft"
|
||||
|
||||
gradle_rebuild_task=false
|
||||
|
||||
if $force_run || ! git diff --quiet "./divinemc-server/build.gradle.kts" || ! git diff --cached --quiet "./divinemc-server/build.gradle.kts"; then
|
||||
echo "Changes detected in ./divinemc-server/build.gradle.kts"
|
||||
gradle_rebuild_task=true
|
||||
fi
|
||||
|
||||
if $force_run || ! git diff --quiet "./divinemc-api/build.gradle.kts" || ! git diff --cached --quiet "./divinemc-api/build.gradle.kts"; then
|
||||
echo "Changes detected in ./divinemc-api/build.gradle.kts"
|
||||
gradle_rebuild_task=true
|
||||
fi
|
||||
|
||||
if $gradle_rebuild_task; then
|
||||
gradle_tasks["rebuildPurpurSingleFilePatches"]="true"
|
||||
fi
|
||||
|
||||
echo "Running fixup tasks..."
|
||||
run_gradle_task "fixupPurpurApiFilePatches"
|
||||
run_gradle_task "fixupPaperApiFilePatches"
|
||||
run_gradle_task "fixupPurpurServerFilePatches"
|
||||
run_gradle_task "fixupPaperServerFilePatches"
|
||||
run_gradle_task "fixupMinecraftFilePatches"
|
||||
|
||||
echo "Running rebuild tasks..."
|
||||
run_gradle_task "rebuildPurpurApiFilePatches"
|
||||
run_gradle_task "rebuildPaperApiFilePatches"
|
||||
run_gradle_task "rebuildPurpurServerFilePatches"
|
||||
run_gradle_task "rebuildPaperServerFilePatches"
|
||||
run_gradle_task "rebuildMinecraftFilePatches"
|
||||
run_gradle_task "rebuildPurpurSingleFilePatches"
|
||||
Reference in New Issue
Block a user