mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-27 02:49:19 +00:00
Init 1.21.6
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
name: Build Leaf 1.21.5
|
||||
name: Build Leaf 1.21.6
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "ver/1.21.5" ]
|
||||
branches: [ "ver/1.21.6" ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -93,15 +93,15 @@ jobs:
|
||||
- name: Upload Leaf
|
||||
uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: Leaf 1.21.5
|
||||
path: ./leaf-1.21.5-${{ env.BUILD_NUMBER }}.jar
|
||||
name: Leaf 1.21.6
|
||||
path: ./leaf-1.21.6-${{ env.BUILD_NUMBER }}.jar
|
||||
|
||||
- name: Release Leaf
|
||||
uses: softprops/action-gh-release@v2.2.2 # Temp fix
|
||||
with:
|
||||
name: "Leaf 1.21.5"
|
||||
tag_name: "ver-1.21.5"
|
||||
files: "./leaf-1.21.5-${{ env.BUILD_NUMBER }}.jar"
|
||||
name: "Leaf 1.21.6"
|
||||
tag_name: "ver-1.21.6"
|
||||
files: "./leaf-1.21.6-${{ env.BUILD_NUMBER }}.jar"
|
||||
body_path: "./release_notes.md"
|
||||
token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
target_commitish: "${{ github.sha }}"
|
||||
@@ -111,7 +111,7 @@ jobs:
|
||||
- name: Calculate SHA-256
|
||||
id: hash
|
||||
run: |
|
||||
FILE_NAME="leaf-1.21.5-${{ env.BUILD_NUMBER }}.jar"
|
||||
FILE_NAME="leaf-1.21.6-${{ env.BUILD_NUMBER }}.jar"
|
||||
HASH=$(sha256sum "$FILE_NAME" | awk '{ print $1 }')
|
||||
echo "sha256=$HASH" >> $GITHUB_OUTPUT
|
||||
|
||||
@@ -121,7 +121,7 @@ jobs:
|
||||
host: ${{ secrets.API_HOST }}
|
||||
username: ${{ secrets.API_USER }}
|
||||
password: ${{ secrets.API_PASS }}
|
||||
source: "./leaf-1.21.5-${{ env.BUILD_NUMBER }}.jar"
|
||||
source: "./leaf-1.21.6-${{ env.BUILD_NUMBER }}.jar"
|
||||
target: "~/api/uploads/"
|
||||
|
||||
- name: Insert build to download API
|
||||
@@ -141,11 +141,11 @@ jobs:
|
||||
node insertBuild.js \
|
||||
--projectName leaf \
|
||||
--projectFriendlyName "Leaf" \
|
||||
--version 1.21.5 \
|
||||
--versionGroupName 1.21.5 \
|
||||
--versionName 1.21.5 \
|
||||
--version 1.21.6 \
|
||||
--versionGroupName 1.21.6 \
|
||||
--versionName 1.21.6 \
|
||||
--build-number ${{ env.BUILD_NUMBER }} \
|
||||
--repositoryPath "$REPO_DIR" \
|
||||
--storagePath /root/api/storage \
|
||||
--download "primary:/root/api/uploads/leaf-1.21.5-${{ env.BUILD_NUMBER }}.jar:${{ steps.hash.outputs.sha256 }}" \
|
||||
--download "primary:/root/api/uploads/leaf-1.21.6-${{ env.BUILD_NUMBER }}.jar:${{ steps.hash.outputs.sha256 }}" \
|
||||
--buildChannel default
|
||||
8
.github/workflows/build-pr.yml
vendored
8
.github/workflows/build-pr.yml
vendored
@@ -2,7 +2,7 @@ name: Build Pull Request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ "ver/1.21.5" ]
|
||||
branches: [ "ver/1.21.6" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -34,9 +34,9 @@ jobs:
|
||||
|
||||
- name: Rename Paperclip JARs
|
||||
run: |
|
||||
mv leaf-server/build/libs/leaf-paperclip-1.21.5-R0.1-SNAPSHOT-mojmap.jar ./leaf-1.21.5.jar
|
||||
mv leaf-server/build/libs/leaf-paperclip-1.21.6-R0.1-SNAPSHOT-mojmap.jar ./leaf-1.21.6.jar
|
||||
- name: Upload Leaf as build artifact
|
||||
uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: Leaf 1.21.5
|
||||
path: ./leaf-1.21.5.jar
|
||||
name: Leaf 1.21.6
|
||||
path: ./leaf-1.21.6.jar
|
||||
|
||||
2
.github/workflows/publish-api.yml
vendored
2
.github/workflows/publish-api.yml
vendored
@@ -1,7 +1,7 @@
|
||||
name: Publish API
|
||||
on:
|
||||
push:
|
||||
branches: [ "ver/1.21.5" ]
|
||||
branches: [ "ver/1.21.6" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div align="center">
|
||||
|
||||
[](https://www.leafmc.one/download)⠀
|
||||
[](https://github.com/Winds-Studio/Leaf/actions)⠀
|
||||
[](https://github.com/Winds-Studio/Leaf/actions)⠀
|
||||
[](https://discord.gg/gfgAwdSEuM)
|
||||
[](https://www.leafmc.one/docs)
|
||||
|
||||
@@ -65,7 +65,7 @@ Building a Paperclip JAR for distribution:
|
||||
<dependency>
|
||||
<groupId>cn.dreeam.leaf</groupId>
|
||||
<artifactId>leaf-api</artifactId>
|
||||
<version>1.21.5-R0.1-SNAPSHOT</version>
|
||||
<version>1.21.6-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
```
|
||||
@@ -78,7 +78,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly("cn.dreeam.leaf:leaf-api:1.21.5-R0.1-SNAPSHOT")
|
||||
compileOnly("cn.dreeam.leaf:leaf-api:1.21.6-R0.1-SNAPSHOT")
|
||||
}
|
||||
|
||||
java {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
group=cn.dreeam.leaf
|
||||
mcVersion=1.21.5
|
||||
version=1.21.5-R0.1-SNAPSHOT
|
||||
mcVersion=1.21.6-rc1
|
||||
version=1.21.6-R0.1-SNAPSHOT
|
||||
|
||||
paperCommit=ba7fb23ddd2376079951d1e22f9204d1ed691585
|
||||
paperCommit=6fddc93a93c7cd9081f550b32f53803759857bf9
|
||||
|
||||
org.gradle.configuration-cache=true
|
||||
org.gradle.caching=true
|
||||
|
||||
@@ -110,7 +110,7 @@ index 0000000000000000000000000000000000000000..00b16e4aacba50996b81fac81c3f78b6
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/map/MapPalette.java b/src/main/java/org/bukkit/map/MapPalette.java
|
||||
index fc9728342de7605da69813fb44b008c1343124c0..4d55f8ece0bbe0be64b700f54a52d6a2cbfad9a5 100644
|
||||
index 5bb3267f81a23d73baa3e4117563a13d61303013..047a33ef63cfc13b4d1ae31088538f2c1d8c404c 100644
|
||||
--- a/src/main/java/org/bukkit/map/MapPalette.java
|
||||
+++ b/src/main/java/org/bukkit/map/MapPalette.java
|
||||
@@ -35,7 +35,7 @@ public final class MapPalette {
|
||||
@@ -120,7 +120,7 @@ index fc9728342de7605da69813fb44b008c1343124c0..4d55f8ece0bbe0be64b700f54a52d6a2
|
||||
- static final Color[] colors = {
|
||||
+ public static final Color[] colors = { // Gale - Pufferfish - vectorized map color conversion - package -> public
|
||||
// Start generate - MapPalette#colors
|
||||
// @GeneratedFrom 1.21.5
|
||||
// @GeneratedFrom 1.21.6-rc1
|
||||
new Color(0x00000000, true),
|
||||
@@ -395,9 +395,15 @@ public final class MapPalette {
|
||||
temp.getRGB(0, 0, temp.getWidth(), temp.getHeight(), pixels, 0, temp.getWidth());
|
||||
|
||||
@@ -2861,7 +2861,7 @@ index 59fada9b1eb78238d280c6bbb711f52facba52c6..eb4d78c6111a530d015a0b91d14c40ad
|
||||
return i >= j && i <= k;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
index 613a0bad5c07cf14098218652eba1f4deaf77c6d..25a0414cc9482925ad0426dde57e65012d62e637 100644
|
||||
index 4acda947b7d69ab4133b4cc94e76d945e4d148d5..737e96a7ce91d65a4899873b681e421207ecd76c 100644
|
||||
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
@@ -32,7 +32,6 @@ public class SimpleCommandMap implements CommandMap {
|
||||
@@ -2880,9 +2880,9 @@ index 613a0bad5c07cf14098218652eba1f4deaf77c6d..25a0414cc9482925ad0426dde57e6501
|
||||
label = label.toLowerCase(Locale.ROOT).trim();
|
||||
fallbackPrefix = fallbackPrefix.toLowerCase(Locale.ROOT).trim();
|
||||
boolean registered = register(label, command, false, fallbackPrefix);
|
||||
@@ -159,23 +157,13 @@ public class SimpleCommandMap implements CommandMap {
|
||||
parsedArgs = event.getArgs();
|
||||
// Purpur end - ExecuteCommandEvent
|
||||
@@ -146,23 +144,13 @@ public class SimpleCommandMap implements CommandMap {
|
||||
return false;
|
||||
}
|
||||
|
||||
- // Paper start - Plugins do weird things to workaround normal registration
|
||||
- if (target.timings == null) {
|
||||
@@ -2893,7 +2893,7 @@ index 613a0bad5c07cf14098218652eba1f4deaf77c6d..25a0414cc9482925ad0426dde57e6501
|
||||
try {
|
||||
- try (co.aikar.timings.Timing ignored = target.timings.startTiming()) { // Paper - use try with resources
|
||||
// Note: we don't return the result of target.execute as thats success / failure, we return handled (true) or not handled (false)
|
||||
target.execute(sender, sentCommandLabel, parsedArgs); // Purpur - ExecuteCommandEvent
|
||||
target.execute(sender, sentCommandLabel, Arrays.copyOfRange(args, 1, args.length));
|
||||
- } // target.timings.stopTiming(); // Spigot // Paper
|
||||
} catch (CommandException ex) {
|
||||
server.getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerCommandException(ex, target, sender, args))); // Paper
|
||||
@@ -7,13 +7,13 @@ Original license: MIT
|
||||
Original project: https://github.com/KeYiMC/KeYi
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index d4082cd6dae07958ace3b9e9769ccb7da4c2a828..d17f7881e55d61c2137f29d0b903016958b05b5d 100644
|
||||
index c44453789834c544b0e78b52bb9b09ffbd5958fb..36209081ad96bfd2f44e9aa150e8eb4d3527b988 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -4054,4 +4054,23 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
sendDeathScreen(message);
|
||||
}
|
||||
// Purpur end
|
||||
@@ -3935,4 +3935,23 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param score New death screen score of player
|
||||
*/
|
||||
void setDeathScreenScore(int score);
|
||||
+
|
||||
+ // Leaf start - KeYi - Player Skull API
|
||||
+ /**
|
||||
@@ -9,7 +9,7 @@ Original project: https://github.com/Cryptite/Slice
|
||||
Co-authored-by: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index d17f7881e55d61c2137f29d0b903016958b05b5d..09f70aa4d206a1b7fc5f3274f34c6885a9e2d60d 100644
|
||||
index 36209081ad96bfd2f44e9aa150e8eb4d3527b988..431435c9666b000197722a36d3a7b8999025e2b5 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3716,6 +3716,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -9,10 +9,10 @@ Added some asynchronous structure locate methods in World,
|
||||
requires async-locator to be enabled in Leaf config, or else it will fall back to sync methods.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index d0c2ff65893c1fd3903633ebc24aae879dc91f10..000ed0527609690b01a32053557b74049beed73c 100644
|
||||
index 04a1379f5fe281ab72610d2f8f18e1355fe3a134..37c0ea84ffac85bab6344a46abe6a79d20566bda 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -4084,6 +4084,60 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -4102,6 +4102,60 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@Nullable
|
||||
StructureSearchResult locateNearestStructure(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored);
|
||||
|
||||
@@ -7,16 +7,24 @@
|
||||
+val leafMavenPublicUrl = "https://maven.nostal.ink/repository/maven-snapshots/" // Leaf - project setup - Add publish repo
|
||||
|
||||
dependencies {
|
||||
mache("io.papermc:mache:1.21.5+build.2")
|
||||
mache("io.papermc:mache:1.21.6-rc1+build.1")
|
||||
- paperclip("io.papermc:paperclip:3.0.3")
|
||||
+ paperclip("cn.dreeam:quantumleaper:1.0.0-SNAPSHOT") // Leaf - project setup - Use own paperclip fork
|
||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||
}
|
||||
|
||||
@@ -28,6 +_,19 @@
|
||||
// oldPaperCommit = "f4f275519f7c1fbe9db173b7144a4fe81440e365"
|
||||
//}
|
||||
@@ -24,9 +_,26 @@
|
||||
minecraftVersion = providers.gradleProperty("mcVersion")
|
||||
gitFilePatches = false
|
||||
|
||||
+ // Purpur start - project setup
|
||||
+ /*
|
||||
updatingMinecraft {
|
||||
oldPaperCommit = "a033e3b9ef78cfe85be807ac3fd1dd956274d4db"
|
||||
}
|
||||
+ */
|
||||
+ // Purpur end - project setup
|
||||
+
|
||||
+ // Leaf start - project setup
|
||||
+ val leaf = forks.register("leaf") {
|
||||
+ upstream.patchDir("paperServer") {
|
||||
@@ -29,11 +37,10 @@
|
||||
+
|
||||
+ activeFork = leaf
|
||||
+ // Leaf end - project setup
|
||||
+
|
||||
|
||||
spigot {
|
||||
buildDataRef = "702e1a0a5072b2c4082371d5228cb30525687efc"
|
||||
packageVersion = "v1_21_R4" // also needs to be updated in MappingEnvironment
|
||||
@@ -50,6 +_,7 @@
|
||||
enabled = false
|
||||
@@ -51,6 +_,7 @@
|
||||
libraryRepositories.addAll(
|
||||
"https://repo.maven.apache.org/maven2/",
|
||||
paperMavenPublicUrl,
|
||||
@@ -41,7 +48,7 @@
|
||||
)
|
||||
}
|
||||
|
||||
@@ -108,7 +_,22 @@
|
||||
@@ -109,7 +_,22 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +72,7 @@
|
||||
configurations.named(log4jPlugins.compileClasspathConfigurationName) {
|
||||
extendsFrom(configurations.compileClasspath.get())
|
||||
}
|
||||
@@ -130,10 +_,20 @@
|
||||
@@ -131,10 +_,20 @@
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -89,7 +96,7 @@
|
||||
implementation("net.minecrell:terminalconsoleappender:1.3.0")
|
||||
implementation("net.kyori:adventure-text-serializer-ansi:4.21.0") // Keep in sync with adventureVersion from Paper-API build file
|
||||
runtimeConfiguration(sourceSets.main.map { it.runtimeClasspath })
|
||||
@@ -144,41 +_,58 @@
|
||||
@@ -145,41 +_,58 @@
|
||||
all its classes to check if they are plugins.
|
||||
Scanning takes about 1-2 seconds so adding this speeds up the server start.
|
||||
*/
|
||||
@@ -161,7 +168,7 @@
|
||||
|
||||
implementation("net.neoforged:srgutils:1.0.9") // Mappings handling
|
||||
implementation("net.neoforged:AutoRenamingTool:2.0.3") // Remap plugins
|
||||
@@ -192,28 +_,40 @@
|
||||
@@ -193,28 +_,40 @@
|
||||
// Spark
|
||||
implementation("me.lucko:spark-api:0.1-20240720.200737-2")
|
||||
implementation("me.lucko:spark-paper:1.10.133-20250413.112336-1")
|
||||
@@ -209,7 +216,7 @@
|
||||
"Build-Number" to (build ?: ""),
|
||||
"Build-Time" to buildTime.toString(),
|
||||
"Git-Branch" to gitBranch,
|
||||
@@ -267,7 +_,7 @@
|
||||
@@ -273,7 +_,7 @@
|
||||
jvmArgumentProviders.add(provider)
|
||||
}
|
||||
|
||||
@@ -218,7 +225,7 @@
|
||||
idea {
|
||||
module {
|
||||
generatedSourceDirs.add(generatedDir.toFile())
|
||||
@@ -325,6 +_,8 @@
|
||||
@@ -331,6 +_,8 @@
|
||||
val memoryGb = providers.gradleProperty("paper.runMemoryGb").getOrElse("2")
|
||||
minHeapSize = "${memoryGb}G"
|
||||
maxHeapSize = "${memoryGb}G"
|
||||
@@ -227,7 +234,7 @@
|
||||
|
||||
doFirst {
|
||||
workingDir.mkdirs()
|
||||
@@ -370,3 +_,62 @@
|
||||
@@ -376,3 +_,62 @@
|
||||
classpath(tasks.createReobfPaperclipJar.flatMap { it.outputZip })
|
||||
mainClass.set(null as String?)
|
||||
}
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: Paper (https://github.com/PaperMC/Paper)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index f1373fd5fdebb9f4600ba7f32a5df6188de3a0e9..96d34149b1009b1522335784bc1858f61bb59cd1 100644
|
||||
index d6dcb6d146d89a8fb96e7c669e5deb802223abd6..84f4f0c87f904a31f3f972e9fb1da8a01474dfca 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -299,6 +299,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -300,6 +300,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public volatile boolean abnormalExit; // Paper - Improved watchdog support
|
||||
public volatile Thread shutdownThread; // Paper - Improved watchdog support
|
||||
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; // Paper - add paper configuration files
|
||||
@@ -24,7 +24,7 @@ index f1373fd5fdebb9f4600ba7f32a5df6188de3a0e9..96d34149b1009b1522335784bc1858f6
|
||||
public boolean isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
|
||||
private final Set<String> pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping
|
||||
public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation
|
||||
@@ -469,6 +470,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -471,6 +472,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
|
||||
// CraftBukkit end
|
||||
this.paperConfigurations = services.paperConfigurations(); // Paper - add paper configuration files
|
||||
@@ -78,7 +78,7 @@ index 015e3ff8d856a7722def4448d8c68792cc3a32a2..e7c3d84d64cc62989c01019b71c499ae
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 31e02f50edd46220dac81500dbb273f1ccdbe0b9..aa44476e7d732a51d226533ccf6fb55013faf003 100644
|
||||
index 5fea5e2e9fc10d348fa3e65cd354ef6a4a717a4d..92a6376d4a242f4ca276cf8232f083d9734f5ee9 100644
|
||||
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -171,6 +171,10 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -93,10 +93,10 @@ index 31e02f50edd46220dac81500dbb273f1ccdbe0b9..aa44476e7d732a51d226533ccf6fb550
|
||||
// Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save
|
||||
if (this.convertOldUsers()) {
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index bfbfbaa9660d21071c420b60b10be0a02a1bc87e..f66aca0b506390ca5c2f95aacb9495417de325e7 100644
|
||||
index dda8d38ef61672cc714d9e5a475f9b0412ed5ff9..b4c983216cd839d793a09e327bb2f15ab90cbff8 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -580,7 +580,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -583,7 +583,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
org.bukkit.generator.BiomeProvider biomeProvider // CraftBukkit
|
||||
) {
|
||||
// CraftBukkit start
|
||||
@@ -106,7 +106,7 @@ index bfbfbaa9660d21071c420b60b10be0a02a1bc87e..f66aca0b506390ca5c2f95aacb949541
|
||||
this.levelStorageAccess = levelStorageAccess;
|
||||
this.uuid = org.bukkit.craftbukkit.util.WorldUUID.getOrCreate(levelStorageAccess.levelDirectory.path().toFile());
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index 418d3958b7510d469142178f9427c829b6387d83..4c31b039eb697ba84598dd1fdded707a2f155ce5 100644
|
||||
index c41df4b1fff1f65532256e835dc30fadbb4f8c8b..4b96e512905aca3b69408145054c0658ee932eed 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -159,6 +159,12 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
|
||||
@@ -11,10 +11,10 @@ Add per world config
|
||||
Add config reload
|
||||
|
||||
diff --git a/net/minecraft/server/Main.java b/net/minecraft/server/Main.java
|
||||
index 9c9b601a3f903bebb0dd1bda0e24745587229727..6c65122fe15e08c352885c7dfd3ddf496f0c00c4 100644
|
||||
index fd3553bdc1c3cdbf6aa3dc00e0a4987f8eaa4fb8..b16f3f515a76ddbbd74d73464396cf094cb30599 100644
|
||||
--- a/net/minecraft/server/Main.java
|
||||
+++ b/net/minecraft/server/Main.java
|
||||
@@ -108,10 +108,12 @@ public class Main {
|
||||
@@ -109,10 +109,12 @@ public class Main {
|
||||
JvmProfiler.INSTANCE.start(Environment.SERVER);
|
||||
}
|
||||
|
||||
@@ -28,10 +28,10 @@ index 9c9b601a3f903bebb0dd1bda0e24745587229727..6c65122fe15e08c352885c7dfd3ddf49
|
||||
DedicatedServerSettings dedicatedServerSettings = new DedicatedServerSettings(optionSet); // CraftBukkit - CLI argument support
|
||||
dedicatedServerSettings.forceSave();
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 96d34149b1009b1522335784bc1858f61bb59cd1..d8179f1b7441679a96ac8ccbd67c2cb1c4fc4fd6 100644
|
||||
index 84f4f0c87f904a31f3f972e9fb1da8a01474dfca..1d79892613707c7a81b5f0686874070f7f98debd 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1182,6 +1182,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1184,6 +1184,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
org.spigotmc.WatchdogThread.tick();
|
||||
// Paper end
|
||||
org.spigotmc.WatchdogThread.hasStarted = true; // Paper
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/net/minecraft/world/entity/projectile/Projectile.java b/net/minecraft/world/entity/projectile/Projectile.java
|
||||
index 4487c03183d20a187d391dd124abb7b926508b5b..84c846d2ef4990befb2891631ac5ae16d881401b 100644
|
||||
index ee16a05b8b2747ce95fcae1616c96143a5dec74e..36124bfd4189e35208875e971733889410242641 100644
|
||||
--- a/net/minecraft/world/entity/projectile/Projectile.java
|
||||
+++ b/net/minecraft/world/entity/projectile/Projectile.java
|
||||
@@ -53,6 +53,55 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
@@ -50,6 +50,55 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
super(entityType, level);
|
||||
}
|
||||
|
||||
@@ -87,6 +87,6 @@ index 4487c03183d20a187d391dd124abb7b926508b5b..84c846d2ef4990befb2891631ac5ae16
|
||||
+ }
|
||||
+ // Gale end - Airplane - reduce projectile chunk loading
|
||||
+
|
||||
public void setOwner(@Nullable Entity owner) {
|
||||
if (owner != null) {
|
||||
this.ownerUUID = owner.getUUID();
|
||||
protected void setOwner(@Nullable EntityReference<Entity> owner) {
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/net/minecraft/world/entity/ambient/Bat.java b/net/minecraft/world/entity/ambient/Bat.java
|
||||
index eb9fb57440f498079182030a46034008d3f6b5e8..65a9ea8d4a208f447b5e78b58b10a0917e35e4f2 100644
|
||||
index 912b099a51269f92f250c7d6094ad41817749f93..5dadb42fd2d2d03ef366ca83c9c4aae6c288aaa4 100644
|
||||
--- a/net/minecraft/world/entity/ambient/Bat.java
|
||||
+++ b/net/minecraft/world/entity/ambient/Bat.java
|
||||
@@ -244,11 +244,66 @@ public class Bat extends AmbientCreature {
|
||||
@@ -245,11 +245,66 @@ public class Bat extends AmbientCreature {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@ require it to be initialized earlier. By moving it to the superclass, we
|
||||
initialize it earlier, ensuring that it is available sooner.
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 1d53c0b96ff781765155aac29256f4493f7d7c58..3941d15753aef952ad1fd5b5f96cb810f4f251e3 100644
|
||||
index 1413511500ce8ae25cc4af1d54fc33c8912c24bc..0665c2ec275086b8c555c550af93dfef197fba07 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -830,8 +830,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -834,8 +834,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
}
|
||||
|
||||
// Paper start - optimise random ticking
|
||||
@@ -32,7 +32,7 @@ index 1d53c0b96ff781765155aac29256f4493f7d7c58..3941d15753aef952ad1fd5b5f96cb810
|
||||
final LevelChunkSection[] sections = chunk.getSections();
|
||||
final int minSection = ca.spottedleaf.moonrise.common.util.WorldUtil.getMinSection((ServerLevel)(Object)this);
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index 9a5447dfa8cba271fdb205d21e4236c94074a7da..013e22dc4eceda9b947f1ff8fe43540b8855aa34 100644
|
||||
index 9f630dda781dd540ab5655bd7ce916949eeee61c..19a9b37bad1d465440047cbde9a00b12ba5d9a4b 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -168,6 +168,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
|
||||
@@ -52,10 +52,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 5005ad97fe4830c6563bca50a77a6abd36c984df..3d7d336c2043b533012ee390e6da02ac4f64e1f2 100644
|
||||
index 6020b71802babb35ef60aca65afe9c2612c05bb7..e53440bd5f0e659db0745a009540520f6dc41238 100644
|
||||
--- a/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -499,6 +499,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -500,6 +500,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
long l = gameTime - this.lastInhabitedUpdate;
|
||||
this.lastInhabitedUpdate = gameTime;
|
||||
if (!this.level.isDebug()) {
|
||||
@@ -64,10 +64,10 @@ index 5005ad97fe4830c6563bca50a77a6abd36c984df..3d7d336c2043b533012ee390e6da02ac
|
||||
this.tickChunks(l); // Gale - Purpur - remove vanilla profiler
|
||||
}
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 28377b1d568e70f4ff1e5a6eea39e7fb9e1233e7..606dee544c669dcaa0eb02808c5786545b5519eb 100644
|
||||
index 0665c2ec275086b8c555c550af93dfef197fba07..6bc70c1d53049a1f75268ab9944bfb1557ca74ee 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -879,13 +879,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -883,13 +883,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
}
|
||||
// Paper end - optimise random ticking
|
||||
|
||||
@@ -84,7 +84,7 @@ index 28377b1d568e70f4ff1e5a6eea39e7fb9e1233e7..606dee544c669dcaa0eb02808c578654
|
||||
for (int i = 0; i < randomTickSpeed; i++) {
|
||||
if (simpleRandom.nextInt(48) == 0) { // Paper - optimise random ticking
|
||||
this.tickPrecipitation(this.getBlockRandomPos(minBlockX, 0, minBlockZ, 15));
|
||||
@@ -903,7 +905,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -907,7 +909,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
boolean isRaining = this.isRaining();
|
||||
int minBlockX = pos.getMinBlockX();
|
||||
int minBlockZ = pos.getMinBlockZ();
|
||||
@@ -94,10 +94,10 @@ index 28377b1d568e70f4ff1e5a6eea39e7fb9e1233e7..606dee544c669dcaa0eb02808c578654
|
||||
if (this.isRainingAt(blockPos)) {
|
||||
DifficultyInstance currentDifficultyAt = this.getCurrentDifficultyAt(blockPos);
|
||||
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 61fa8f2bf018b8892a11acec058f36914c5a1573..a8db2a822deb07ddc707cf73fdc5c269d9842c06 100644
|
||||
index b88254fb3c12b99684c6ede1ae8a6671ffbe9ad6..9e2debee38bc4b25281c8a8c6e7082cca1f7b569 100644
|
||||
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -126,6 +126,18 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
@@ -128,6 +128,18 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
}
|
||||
// Paper end - get block chunk optimisation
|
||||
|
||||
@@ -116,7 +116,7 @@ index 61fa8f2bf018b8892a11acec058f36914c5a1573..a8db2a822deb07ddc707cf73fdc5c269
|
||||
public LevelChunk(Level level, ChunkPos pos) {
|
||||
this(level, pos, UpgradeData.EMPTY, new LevelChunkTicks<>(), new LevelChunkTicks<>(), 0L, null, null, null);
|
||||
}
|
||||
@@ -162,6 +174,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
@@ -164,6 +176,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
this.debug = !empty && this.level.isDebug();
|
||||
this.defaultBlockState = empty ? VOID_AIR_BLOCKSTATE : AIR_BLOCKSTATE;
|
||||
// Paper end - get block chunk optimisation
|
||||
|
||||
@@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/net/minecraft/world/entity/monster/EnderMan.java b/net/minecraft/world/entity/monster/EnderMan.java
|
||||
index 5ae08be75ca01924fc78bdd8d6bb6747ddc21aea..84a9dbf5898fb519fad5fdc3ea1d9a2054d1e0eb 100644
|
||||
index 4edd94ac765d2ab107612504b67e6e07da609313..9b0235c50426accde002cbb0a09a992f13b05cd7 100644
|
||||
--- a/net/minecraft/world/entity/monster/EnderMan.java
|
||||
+++ b/net/minecraft/world/entity/monster/EnderMan.java
|
||||
@@ -300,11 +300,19 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
@@ -296,11 +296,19 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
private boolean teleport(double x, double y, double z) {
|
||||
BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(x, y, z);
|
||||
|
||||
|
||||
@@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java
|
||||
index 2ebee223085fe7926c7f3e555df19ae69f36157e..602ed4c5556723e54a80ccc3481af31109d5a0a6 100644
|
||||
index ae2bb9a73106febfe5f0d090abd4252bbb5fd27e..eee9c41e40402e52b73f34a734b4cbdeb6cfbc22 100644
|
||||
--- a/io/papermc/paper/entity/activation/ActivationRange.java
|
||||
+++ b/io/papermc/paper/entity/activation/ActivationRange.java
|
||||
@@ -215,7 +215,7 @@ public final class ActivationRange {
|
||||
@@ -221,7 +221,7 @@ public final class ActivationRange {
|
||||
}
|
||||
// special cases.
|
||||
if (entity instanceof final LivingEntity living) {
|
||||
@@ -44,10 +44,10 @@ index 2ebee223085fe7926c7f3e555df19ae69f36157e..602ed4c5556723e54a80ccc3481af311
|
||||
}
|
||||
if (entity instanceof final Mob mob && mob.getTarget() != null) {
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 79f499fea47a9c675da1aed718c713290bc008d0..f019571b4b6b5e2d1953030911449a02e459591c 100644
|
||||
index 97431aa47b5425578bf14b992596962c64c87f35..e174c7b8c637e6983cf0778e6956d8d11e9cd7d1 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2083,6 +2083,21 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -2115,6 +2115,21 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
return this.lastClimbablePos;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java
|
||||
index 7360914a6f4dc43758c38f2c6c7f8d458cc14c4d..7fe21b10eefce56dde19baebf9cb6d2d0a8d73ec 100644
|
||||
index e958972ca09eb0ab07d81990e661076ab0371850..5df8ee3955593e70f0e67e91431e464d177bdeeb 100644
|
||||
--- a/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -189,19 +189,25 @@ public class ServerEntity {
|
||||
@@ -193,19 +193,25 @@ public class ServerEntity {
|
||||
packet = ClientboundEntityPositionSyncPacket.of(this.entity);
|
||||
flag3 = true;
|
||||
flag4 = true;
|
||||
|
||||
@@ -31,7 +31,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java b/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
|
||||
index d0ab3db7bbd2942db19f473474371b20ce822608..3f080b15543bf8c5fa0774b62d7f12e13b82511a 100644
|
||||
index 7e70c7bee633c54497d1cd2854dd60f4fb5ff160..f15da598cb1d7872fafb8b173e5134b9667c9a9f 100644
|
||||
--- a/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
|
||||
@@ -119,6 +119,7 @@ public abstract class MoveToBlockGoal extends Goal {
|
||||
@@ -39,6 +39,6 @@ index d0ab3db7bbd2942db19f473474371b20ce822608..3f080b15543bf8c5fa0774b62d7f12e1
|
||||
for (int i5 = i4 < i3 && i4 > -i3 ? i3 : 0; i5 <= i3; i5 = i5 > 0 ? -i5 : 1 - i5) {
|
||||
mutableBlockPos.setWithOffset(blockPos, i4, i2 - 1, i5);
|
||||
+ if (!this.mob.level().hasChunkAt(mutableBlockPos)) continue; // Gale - Airplane - block goal does not load chunks - if this block isn't loaded, continue
|
||||
if (this.mob.isWithinRestriction(mutableBlockPos) && this.isValidTarget(this.mob.level(), mutableBlockPos)) {
|
||||
if (this.mob.isWithinHome(mutableBlockPos) && this.isValidTarget(this.mob.level(), mutableBlockPos)) {
|
||||
this.blockPos = mutableBlockPos;
|
||||
this.mob.movingTarget = mutableBlockPos == BlockPos.ZERO ? null : mutableBlockPos.immutable(); // Paper
|
||||
|
||||
@@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 606dee544c669dcaa0eb02808c5786545b5519eb..f14aab66d200828952b647fa8424caec757a9e9c 100644
|
||||
index 6bc70c1d53049a1f75268ab9944bfb1557ca74ee..a9c2f419200483673f6743ed94af110a8e875e71 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -784,7 +784,19 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -788,7 +788,19 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
entity.stopRiding();
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ index 606dee544c669dcaa0eb02808c5786545b5519eb..f14aab66d200828952b647fa8424caec
|
||||
}
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index a2513f58d6a19aef1f43fb120f6d78e53a3b129b..9e72ed6ed0c5acb69f23652dce473e914455c412 100644
|
||||
index 19a9b37bad1d465440047cbde9a00b12ba5d9a4b..b62ee276e2176da439ac2f4da4501861da746004 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -1489,10 +1489,10 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
|
||||
@@ -22,10 +22,10 @@ you to easily disable books, should you want to preemptively remove this
|
||||
functionality before additional exploits are found.
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 9041830c19e2899479e1519488faba5c416ccd88..3c5b1cf6d47738d232282abe7f7f24c40b7bb387 100644
|
||||
index aeb43902a09ef9c1b137964065780be3e87648f4..383652f0bd32fca3551db85fb6ac42a0e326836e 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1225,6 +1225,11 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -1255,6 +1255,11 @@ public class ServerGamePacketListenerImpl
|
||||
|
||||
@Override
|
||||
public void handleEditBook(ServerboundEditBookPacket packet) {
|
||||
|
||||
@@ -28,10 +28,10 @@ but is so much cheaper than the suffocation check that it's worth
|
||||
keeping it.
|
||||
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index f019571b4b6b5e2d1953030911449a02e459591c..85759f8fe3892e0af3cbbd836defc9ee4b2705f6 100644
|
||||
index e174c7b8c637e6983cf0778e6956d8d11e9cd7d1..dc7d53e93a49297e3a5e1204025b3a50e73fba4e 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -419,7 +419,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -433,7 +433,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
|
||||
if (this.isAlive() && this.level() instanceof ServerLevel serverLevel1) {
|
||||
boolean flag = this instanceof Player;
|
||||
@@ -43,7 +43,7 @@ index f019571b4b6b5e2d1953030911449a02e459591c..85759f8fe3892e0af3cbbd836defc9ee
|
||||
this.hurtServer(serverLevel1, this.damageSources().inWall(), 1.0F);
|
||||
} else if (flag && !serverLevel1.getWorldBorder().isWithinBounds(this.getBoundingBox())) {
|
||||
double d = serverLevel1.getWorldBorder().getDistanceToBorder(this) + serverLevel1.getWorldBorder().getDamageSafeZone();
|
||||
@@ -1367,6 +1370,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1399,6 +1402,12 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
return this.getHealth() <= 0.0F;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,10 +20,10 @@ launcher can very easily fill a chunk.
|
||||
Prevent saving Fireworks so that chunk unloads will wipe a chunks fireworks in this case.
|
||||
|
||||
diff --git a/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||
index e0e193078e550225e163149638bf9e053c0531f8..70197071db4e46cd93579d92ff2f8aa7a49083cb 100644
|
||||
index d8dc196ef92e97f831cf97cd1536a46f81f9d5d1..8d29c5c7f651176639363f5227a386679f5b67f3 100644
|
||||
--- a/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||
+++ b/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||
@@ -354,4 +354,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||
@@ -350,4 +350,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||
double d1 = entity.position().z - this.position().z;
|
||||
return DoubleDoubleImmutablePair.of(d, d1);
|
||||
}
|
||||
|
||||
@@ -17,10 +17,10 @@ Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
Only do an item "suck in" action once per second
|
||||
|
||||
diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index 6c0ebfb2be4e8b884456a2aa3d5fdc87e45a0e3c..bf2f81232ac40218c6d0241b7a0a26cb2272e06b 100644
|
||||
index a29860af4c37b2b45df49f9ba18f7e38921dfb02..7afdccf04e2239b0654e8f1ce7b7e22c39d84f44 100644
|
||||
--- a/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -150,7 +150,13 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -140,7 +140,13 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
}
|
||||
// CraftBukkit end
|
||||
this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
|
||||
@@ -34,7 +34,7 @@ index 6c0ebfb2be4e8b884456a2aa3d5fdc87e45a0e3c..bf2f81232ac40218c6d0241b7a0a26cb
|
||||
}
|
||||
// Paper end - EAR 2
|
||||
|
||||
@@ -234,9 +240,31 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -224,9 +230,31 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
}
|
||||
// CraftBukkit end
|
||||
this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
|
||||
@@ -67,10 +67,10 @@ index 6c0ebfb2be4e8b884456a2aa3d5fdc87e45a0e3c..bf2f81232ac40218c6d0241b7a0a26cb
|
||||
@Override
|
||||
public BlockPos getBlockPosBelowThatAffectsMyMovement() {
|
||||
diff --git a/net/minecraft/world/entity/vehicle/MinecartHopper.java b/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||
index a56d9cdeb6589a053ffaaf2cd599a98ae0a0989a..df5eda70d1d2eafcd32606fb93bb62409e5a8943 100644
|
||||
index 41a6ec508a10a49a37539d2f10171d15c233b280..fb099517927f3c2699a348ea7692772c5420b8d1 100644
|
||||
--- a/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||
@@ -22,6 +22,7 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper
|
||||
@@ -23,6 +23,7 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper
|
||||
private static final boolean DEFAULT_ENABLED = true;
|
||||
private boolean enabled = true;
|
||||
private boolean consumedItemThisFrame = false;
|
||||
@@ -78,7 +78,7 @@ index a56d9cdeb6589a053ffaaf2cd599a98ae0a0989a..df5eda70d1d2eafcd32606fb93bb6240
|
||||
|
||||
public MinecartHopper(EntityType<? extends MinecartHopper> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
@@ -150,4 +151,12 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper
|
||||
@@ -151,4 +152,12 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -105,7 +105,7 @@ index 484c2ba2752fbf3ad929e46c2f078e906f6f0637..6ced5a7e27703a7cf5a7495dc3a1a290
|
||||
|
||||
double getLevelY();
|
||||
diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
index 15d4f60942c0cc612c1468b4c0fda886867a67cb..c2c7832fbb207ecfd23c7a086ef72db9648f48f9 100644
|
||||
index 800b7e78ae989868ed0b9e060c80dcd002759412..2a49f65a2ea13414099b636f463239ced4fbb5f6 100644
|
||||
--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
@@ -544,7 +544,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java
|
||||
index 602ed4c5556723e54a80ccc3481af31109d5a0a6..bdbbbc5e0c06c71584e7514623d0c8be168befd7 100644
|
||||
index eee9c41e40402e52b73f34a734b4cbdeb6cfbc22..63ff39f3db2e695c8a14b021045c17f6d3d2f23d 100644
|
||||
--- a/io/papermc/paper/entity/activation/ActivationRange.java
|
||||
+++ b/io/papermc/paper/entity/activation/ActivationRange.java
|
||||
@@ -53,27 +53,41 @@ public final class ActivationRange {
|
||||
@@ -59,27 +59,41 @@ public final class ActivationRange {
|
||||
if (entity.activationType == ActivationType.VILLAGER) {
|
||||
if (inactiveFor > config.wakeUpInactiveVillagersEvery && world.wakeupInactiveRemainingVillagers > 0) {
|
||||
world.wakeupInactiveRemainingVillagers--;
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: EmpireCraft (https://github.com/starlis/empirecraft)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 6f60f5e92628e744a22b3d3f83c2010d8a4661be..6d1542dc07fdf1f3384e8e6d1dacca5f8c3f0b69 100644
|
||||
index ffae3e45ba88e8b733e77b87a45cc27b9ecf8c19..684a15babe984c84703e2c6af7a461f75959312d 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -414,6 +414,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -425,6 +425,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
public boolean sentListPacket = false;
|
||||
public boolean supressTrackerForLogin = false; // Paper - Fire PlayerJoinEvent when Player is actually ready
|
||||
// CraftBukkit end
|
||||
@@ -25,10 +25,10 @@ index 6f60f5e92628e744a22b3d3f83c2010d8a4661be..6d1542dc07fdf1f3384e8e6d1dacca5f
|
||||
public @Nullable com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent
|
||||
public @Nullable String clientBrandName = null; // Paper - Brand support
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 3c5b1cf6d47738d232282abe7f7f24c40b7bb387..99670d9b8450f8c5a04927a18720468d4ddc1bec 100644
|
||||
index 383652f0bd32fca3551db85fb6ac42a0e326836e..29466047936ed44f57cb4bcb8f1bff0bdad81827 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2399,7 +2399,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2433,7 +2433,7 @@ public class ServerGamePacketListenerImpl
|
||||
this.disconnectAsync(Component.translatable("multiplayer.disconnect.illegal_characters"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_CHARACTERS); // Paper - add proper async disconnect
|
||||
} else if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales
|
||||
this.send(new ClientboundSystemChatPacket(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED), false));
|
||||
@@ -38,15 +38,15 @@ index 3c5b1cf6d47738d232282abe7f7f24c40b7bb387..99670d9b8450f8c5a04927a18720468d
|
||||
// CraftBukkit start
|
||||
if (sync) {
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index a0949d8256823731f6f7da30e74dfd0205dde380..2c025382d041c43486ae975a3f687bc4cddf8d62 100644
|
||||
index 898d9ab963a6cf1db8edf4657a65335d15f271c4..8017266123a91e5bd46ae0d39a35cf2e6cbb390f 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -334,6 +334,8 @@ public abstract class PlayerList {
|
||||
return;
|
||||
}
|
||||
@@ -335,6 +335,8 @@ public abstract class PlayerList {
|
||||
return;
|
||||
}
|
||||
|
||||
+ player.didPlayerJoinEvent = true; // Gale - EMC - do not process chat/commands before player has joined
|
||||
+
|
||||
final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage();
|
||||
final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage();
|
||||
|
||||
if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure
|
||||
if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure
|
||||
|
||||
@@ -13,28 +13,31 @@ As part of: EmpireCraft (https://github.com/starlis/empirecraft)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
diff --git a/net/minecraft/stats/ServerStatsCounter.java b/net/minecraft/stats/ServerStatsCounter.java
|
||||
index b147df7479da03fae19294587cded62c210ea590..dfaead7716ac718bcdbf4c3021aed1b57676af50 100644
|
||||
index 16e06085ed3c0f6a0b35c730b63b75824f44a905..195ff539c9cb4b2a0640555fc4b59df39e06c90d 100644
|
||||
--- a/net/minecraft/stats/ServerStatsCounter.java
|
||||
+++ b/net/minecraft/stats/ServerStatsCounter.java
|
||||
@@ -117,16 +117,18 @@ public class ServerStatsCounter extends StatsCounter {
|
||||
this.stats
|
||||
.putAll(
|
||||
STATS_CODEC.parse(dynamic.get("stats").orElseEmptyMap())
|
||||
- .resultOrPartial(string -> LOGGER.error("Failed to parse statistics for {}: {}", this.file, string))
|
||||
+ .resultOrPartial(string -> {
|
||||
+ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.invalidStatistics) LOGGER.error("Failed to parse statistics for {}: {}", this.file, string); // Gale - EMC - do not log invalid statistics
|
||||
+ })
|
||||
.orElse(Map.of())
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ public class ServerStatsCounter extends StatsCounter {
|
||||
try {
|
||||
JsonElement jsonElement = StrictJsonParser.parse(json);
|
||||
if (jsonElement.isJsonNull()) {
|
||||
- LOGGER.error("Unable to parse Stat data from {}", this.file);
|
||||
+ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.invalidStatistics) LOGGER.error("Unable to parse Stat data from {}", this.file); // Gale - EMC - do not log invalid statistics
|
||||
+ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.invalidStatistics) LOGGER.error("Unable to parse Stat data from {}", this.file);
|
||||
return;
|
||||
}
|
||||
} catch (IOException | JsonParseException var8) {
|
||||
- LOGGER.error("Unable to parse Stat data from {}", this.file, var8);
|
||||
+ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.invalidStatistics) LOGGER.error("Unable to parse Stat data from {}", this.file, var8); // Gale - EMC - do not log invalid statistics
|
||||
|
||||
@@ -117,11 +117,13 @@ public class ServerStatsCounter extends StatsCounter {
|
||||
this.stats
|
||||
.putAll(
|
||||
STATS_CODEC.parse(dynamic.get("stats").orElseEmptyMap())
|
||||
- .resultOrPartial(string -> LOGGER.error("Failed to parse statistics for {}: {}", this.file, string))
|
||||
+ .resultOrPartial(string -> {
|
||||
+ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.invalidStatistics) LOGGER.error("Failed to parse statistics for {}: {}", this.file, string); // Gale - EMC - do not log invalid statistics
|
||||
+ })
|
||||
.orElse(Map.of())
|
||||
);
|
||||
} catch (JsonParseException var5) {
|
||||
- LOGGER.error("Unable to parse Stat data from {}", this.file, var5);
|
||||
+ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.invalidStatistics) LOGGER.error("Unable to parse Stat data from {}", this.file, var5);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 99670d9b8450f8c5a04927a18720468d4ddc1bec..c06d9ae722455cd2315097b2b0333d2adb51f9ad 100644
|
||||
index 29466047936ed44f57cb4bcb8f1bff0bdad81827..767dfc71ad9aafffa01ed27fdeac2c19bbba6f37 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2481,7 +2481,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2515,7 +2515,7 @@ public class ServerGamePacketListenerImpl
|
||||
// CraftBukkit start
|
||||
String rawMessage = message.signedContent();
|
||||
if (rawMessage.isEmpty()) {
|
||||
|
||||
@@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/net/minecraft/server/PlayerAdvancements.java b/net/minecraft/server/PlayerAdvancements.java
|
||||
index 52e0ae233a7b1c88bfbbc27707ef5f18453ec865..741894ed6df81fce41d9f906d6198d038aab44a8 100644
|
||||
index fdeca41d40705f28864ce4443d01cd872c9d51b0..63c32ae544d87177c9b3e1f1b73eeb9be904eebf 100644
|
||||
--- a/net/minecraft/server/PlayerAdvancements.java
|
||||
+++ b/net/minecraft/server/PlayerAdvancements.java
|
||||
@@ -148,7 +148,7 @@ public class PlayerAdvancements {
|
||||
@@ -147,7 +147,7 @@ public class PlayerAdvancements {
|
||||
AdvancementHolder advancementHolder = advancementManager.get(path);
|
||||
if (advancementHolder == null) {
|
||||
if (!path.getNamespace().equals(ResourceLocation.DEFAULT_NAMESPACE)) return; // CraftBukkit
|
||||
|
||||
@@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/net/minecraft/stats/ServerRecipeBook.java b/net/minecraft/stats/ServerRecipeBook.java
|
||||
index 2158b20458de63897131db3d425d1efcc358cace..40944806284921bd084901c94595fefa78b2c20b 100644
|
||||
index 7e1a06b97ab0c744e910df1c82454ce5686c1870..5e12e021d6e3b01f0d209c23255fab0a232f69cb 100644
|
||||
--- a/net/minecraft/stats/ServerRecipeBook.java
|
||||
+++ b/net/minecraft/stats/ServerRecipeBook.java
|
||||
@@ -133,7 +133,7 @@ public class ServerRecipeBook extends RecipeBook {
|
||||
@@ -102,7 +102,7 @@ public class ServerRecipeBook extends RecipeBook {
|
||||
private void loadRecipes(List<ResourceKey<Recipe<?>>> recipes, Consumer<ResourceKey<Recipe<?>>> output, Predicate<ResourceKey<Recipe<?>>> isRecognized) {
|
||||
for (ResourceKey<Recipe<?>> resourceKey : recipes) {
|
||||
if (!isRecognized.test(resourceKey)) {
|
||||
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 2c025382d041c43486ae975a3f687bc4cddf8d62..2a4e52ba074dfd6dce98669282de729eae7d272a 100644
|
||||
index 8017266123a91e5bd46ae0d39a35cf2e6cbb390f..c5ab58c890c7c55f2ad75560269663d3fd5a6aa3 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1278,7 +1278,7 @@ public abstract class PlayerList {
|
||||
@@ -1274,7 +1274,7 @@ public abstract class PlayerList {
|
||||
public void broadcastChatMessage(PlayerChatMessage message, Predicate<ServerPlayer> shouldFilterMessageTo, @Nullable ServerPlayer sender, ChatType.Bound boundChatType, @Nullable Function<net.kyori.adventure.audience.Audience, Component> unsignedFunction) {
|
||||
// Paper end
|
||||
boolean flag = this.verifyChatTrusted(message);
|
||||
|
||||
@@ -42,10 +42,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/net/minecraft/world/entity/projectile/AbstractArrow.java b/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
index 595cdb7d013eb0b9282b133a22f51ee865d18623..b8f04b98d2117cfb274a5888d34b9836d3390ae9 100644
|
||||
index 11adb3eacce9d46f15e6c5216e9b2494df158baf..fe738894f82480c6a7c2ff8fde895daaa0ba8bc6 100644
|
||||
--- a/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
+++ b/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
@@ -352,7 +352,7 @@ public abstract class AbstractArrow extends Projectile {
|
||||
@@ -349,7 +349,7 @@ public abstract class AbstractArrow extends Projectile {
|
||||
this.setInGround(false);
|
||||
Vec3 deltaMovement = this.getDeltaMovement();
|
||||
this.setDeltaMovement(deltaMovement.multiply(this.random.nextFloat() * 0.2F, this.random.nextFloat() * 0.2F, this.random.nextFloat() * 0.2F));
|
||||
|
||||
@@ -13,20 +13,20 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 2a4e52ba074dfd6dce98669282de729eae7d272a..be324f5085c1cceb3d4c37bc73d0ee5ac761a99c 100644
|
||||
index c5ab58c890c7c55f2ad75560269663d3fd5a6aa3..186e0a6e565d29572f5d4771a68e4a9cb2bd45de 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -402,7 +402,13 @@ public abstract class PlayerList {
|
||||
scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam);
|
||||
}
|
||||
// Paper end - Configurable player collision
|
||||
@@ -403,7 +403,13 @@ public abstract class PlayerList {
|
||||
scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam);
|
||||
}
|
||||
// Paper end - Configurable player collision
|
||||
+ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.playerLoginLocations) { // Gale - JettPack - make logging login location configurable
|
||||
PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), loggableAddress, player.getId(), serverLevel.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ());
|
||||
PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), loggableAddress, player.getId(), serverLevel.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ());
|
||||
+ // Gale start - JettPack - make logging login location configurable
|
||||
+ } else {
|
||||
+ PlayerList.LOGGER.info("{}[{}] logged in with entity id {}", player.getName().getString(), loggableAddress, player.getId());
|
||||
+ }
|
||||
+ // Gale end - JettPack - make logging login location configurable
|
||||
// Paper start - Send empty chunk, so players aren't stuck in the world loading screen with our chunk system not sending chunks when dead
|
||||
if (player.isDeadOrDying()) {
|
||||
net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> plains = serverLevel.registryAccess().lookupOrThrow(net.minecraft.core.registries.Registries.BIOME)
|
||||
// Paper start - Send empty chunk, so players aren't stuck in the world loading screen with our chunk system not sending chunks when dead
|
||||
if (player.isDeadOrDying()) {
|
||||
net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> plains = serverLevel.registryAccess().lookupOrThrow(net.minecraft.core.registries.Registries.BIOME)
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java
|
||||
index ba20e87d2105ce53cdaf4049de2388d05fcd1b56..7b686d834e4eb36be5758b0e0a846a70d1e2294b 100644
|
||||
index b2bcfb3557a0326fd7ec1059f95d6da4568dfd80..fee4a7452178c274eb835d758b718d8e874d79d0 100644
|
||||
--- a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java
|
||||
@@ -378,7 +378,6 @@ public final class ChunkEntitySlices {
|
||||
@@ -400,7 +400,6 @@ public final class ChunkEntitySlices {
|
||||
|
||||
private static final class BasicEntityList<E extends Entity> {
|
||||
|
||||
@@ -24,7 +24,7 @@ index ba20e87d2105ce53cdaf4049de2388d05fcd1b56..7b686d834e4eb36be5758b0e0a846a70
|
||||
private static final int DEFAULT_CAPACITY = 4;
|
||||
|
||||
private E[] storage;
|
||||
@@ -389,7 +388,7 @@ public final class ChunkEntitySlices {
|
||||
@@ -411,7 +410,7 @@ public final class ChunkEntitySlices {
|
||||
}
|
||||
|
||||
public BasicEntityList(final int cap) {
|
||||
@@ -33,7 +33,7 @@ index ba20e87d2105ce53cdaf4049de2388d05fcd1b56..7b686d834e4eb36be5758b0e0a846a70
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
@@ -401,7 +400,7 @@ public final class ChunkEntitySlices {
|
||||
@@ -423,7 +422,7 @@ public final class ChunkEntitySlices {
|
||||
}
|
||||
|
||||
private void resize() {
|
||||
@@ -125,11 +125,24 @@ index 8ef16f98996b1ec0c9c3f158248ac95f1b07328f..6780b2493d625603b74e635c4996bb83
|
||||
private static final Codec<Object> PRIMITIVE_ARG_CODEC = ExtraCodecs.JAVA.validate(TranslatableContents::filterAllowedArguments);
|
||||
private static final Codec<Object> ARG_CODEC = Codec.either(PRIMITIVE_ARG_CODEC, ComponentSerialization.CODEC)
|
||||
.xmap(
|
||||
diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java
|
||||
index 5df8ee3955593e70f0e67e91431e464d177bdeeb..b7581796dda77bca66c03e421f2a83a920f44ef1 100644
|
||||
--- a/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -366,7 +366,7 @@ public class ServerEntity {
|
||||
if (this.entity instanceof LivingEntity livingEntityx) {
|
||||
List<Pair<EquipmentSlot, ItemStack>> list = Lists.newArrayList();
|
||||
|
||||
- for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES) {
|
||||
+ for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES_ARRAY) { // Gale - JettPack - reduce array allocations
|
||||
ItemStack itemBySlot = livingEntityx.getItemBySlot(equipmentSlot);
|
||||
if (!itemBySlot.isEmpty()) {
|
||||
list.add(Pair.of(equipmentSlot, itemBySlot.copy()));
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index f14aab66d200828952b647fa8424caec757a9e9c..4da7c02024a5ad8ba34bad2adfd8228f11f39eee 100644
|
||||
index a9c2f419200483673f6743ed94af110a8e875e71..617eb1b9d30d499124576c5d7cb5152571cc6b84 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1220,7 +1220,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -1228,7 +1228,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
|
||||
public static List<Entity> getCurrentlyTickingEntities() {
|
||||
Entity ticking = currentlyTickingEntity.get();
|
||||
@@ -138,11 +151,24 @@ index f14aab66d200828952b647fa8424caec757a9e9c..4da7c02024a5ad8ba34bad2adfd8228f
|
||||
|
||||
return ret;
|
||||
}
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 684a15babe984c84703e2c6af7a461f75959312d..3b08bf99de48b7af7c91de4b7448231ebe6819ae 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1102,7 +1102,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
this.getInventory().getNonEquipmentItems().set(i, net.minecraft.world.item.ItemStack.EMPTY);
|
||||
}
|
||||
}
|
||||
- for (final EquipmentSlot value : EquipmentSlot.VALUES) {
|
||||
+ for (final EquipmentSlot value : EquipmentSlot.VALUES_ARRAY) { // Gale - JettPack - reduce array allocations
|
||||
if (this.getInventory().equipment.has(value) && !shouldKeepDeathEventItem(event, this.getInventory().equipment.get(value))) {
|
||||
this.getInventory().equipment.set(value, net.minecraft.world.item.ItemStack.EMPTY);
|
||||
}
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index c06d9ae722455cd2315097b2b0333d2adb51f9ad..68368928035ffa8fb7b12a7e3c6a7f9686379933 100644
|
||||
index 767dfc71ad9aafffa01ed27fdeac2c19bbba6f37..a94df4a0f5730f154abd9ed788d7613d3b08de03 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2771,7 +2771,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2784,7 +2784,7 @@ public class ServerGamePacketListenerImpl
|
||||
// SPIGOT-7136 - Allays
|
||||
if (target instanceof net.minecraft.world.entity.animal.allay.Allay || target instanceof net.minecraft.world.entity.animal.horse.AbstractHorse) { // Paper - Fix horse armor desync
|
||||
ServerGamePacketListenerImpl.this.send(new net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket(
|
||||
@@ -177,6 +203,32 @@ index 09fd99c9cbd23b5f3c899bfb00c9b89651948ed8..5c1103ef028e5ffe6ce0eadc861dd3b2
|
||||
private final int size;
|
||||
|
||||
public ZeroBitStorage(int size) {
|
||||
diff --git a/net/minecraft/world/entity/ConversionType.java b/net/minecraft/world/entity/ConversionType.java
|
||||
index 3eea236bd1fd401fefdf7c5cc553a3db335029c7..3739272cbc73b7c4f15a2fbe874905cf06175f64 100644
|
||||
--- a/net/minecraft/world/entity/ConversionType.java
|
||||
+++ b/net/minecraft/world/entity/ConversionType.java
|
||||
@@ -37,7 +37,7 @@ public enum ConversionType {
|
||||
}
|
||||
|
||||
if (conversionParams.keepEquipment()) {
|
||||
- for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES) {
|
||||
+ for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES_ARRAY) { // Gale - JettPack - reduce array allocations
|
||||
ItemStack itemBySlot = oldMob.getItemBySlot(equipmentSlot);
|
||||
if (!itemBySlot.isEmpty()) {
|
||||
newMob.setItemSlot(equipmentSlot, itemBySlot.copyAndClear());
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 96ff8384beabdfd471579d4626ce89d5587b0a35..6714668563e3a7543765064d9824b93ec3924473 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -3077,7 +3077,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
private boolean attemptToShearEquipment(Player player, InteractionHand hand, ItemStack stack, Mob mob) {
|
||||
- for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES) {
|
||||
+ for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES_ARRAY) { // Gale - JettPack - reduce array allocations
|
||||
ItemStack itemBySlot = mob.getItemBySlot(equipmentSlot);
|
||||
Equippable equippable = itemBySlot.get(DataComponents.EQUIPPABLE);
|
||||
if (equippable != null
|
||||
diff --git a/net/minecraft/world/entity/EquipmentSlot.java b/net/minecraft/world/entity/EquipmentSlot.java
|
||||
index 0e44397c9d53ff30a96c9e8e392a363fa9ae0c55..dbf31389f0e9796c80afbffddf6a20cbaf184e6e 100644
|
||||
--- a/net/minecraft/world/entity/EquipmentSlot.java
|
||||
@@ -198,7 +250,7 @@ index 0e44397c9d53ff30a96c9e8e392a363fa9ae0c55..dbf31389f0e9796c80afbffddf6a20cb
|
||||
private final EquipmentSlot.Type type;
|
||||
private final int index;
|
||||
diff --git a/net/minecraft/world/entity/EquipmentSlotGroup.java b/net/minecraft/world/entity/EquipmentSlotGroup.java
|
||||
index 381e0a1c0af7e339713ed1df1c2f21121c1bbd0f..4e847c3f9d761da5dda11dec60582d9d9e630b37 100644
|
||||
index 381e0a1c0af7e339713ed1df1c2f21121c1bbd0f..1ebcab2ee9898a618ad76b18491be19859629192 100644
|
||||
--- a/net/minecraft/world/entity/EquipmentSlotGroup.java
|
||||
+++ b/net/minecraft/world/entity/EquipmentSlotGroup.java
|
||||
@@ -24,6 +24,7 @@ public enum EquipmentSlotGroup implements StringRepresentable, Iterable<Equipmen
|
||||
@@ -209,19 +261,41 @@ index 381e0a1c0af7e339713ed1df1c2f21121c1bbd0f..4e847c3f9d761da5dda11dec60582d9d
|
||||
public static final IntFunction<EquipmentSlotGroup> BY_ID = ByIdMap.continuous(
|
||||
equipmentSlotGroup -> equipmentSlotGroup.id, values(), ByIdMap.OutOfBoundsStrategy.ZERO
|
||||
);
|
||||
@@ -38,7 +39,7 @@ public enum EquipmentSlotGroup implements StringRepresentable, Iterable<Equipmen
|
||||
this.id = id;
|
||||
this.key = key;
|
||||
this.predicate = predicate;
|
||||
- this.slots = EquipmentSlot.VALUES.stream().filter(predicate).toList();
|
||||
+ this.slots = EquipmentSlot.VALUES.stream().filter(predicate).toList(); // Gale - JettPack - reduce array allocations
|
||||
}
|
||||
|
||||
private EquipmentSlotGroup(final int id, final String key, final EquipmentSlot slot) {
|
||||
diff --git a/net/minecraft/world/entity/EquipmentTable.java b/net/minecraft/world/entity/EquipmentTable.java
|
||||
index b383836c200ca9f7bd84639367aa81b57868fb25..3af4a6dcc81afaf2860325fe5852c9a941f216d4 100644
|
||||
--- a/net/minecraft/world/entity/EquipmentTable.java
|
||||
+++ b/net/minecraft/world/entity/EquipmentTable.java
|
||||
@@ -30,7 +30,7 @@ public record EquipmentTable(ResourceKey<LootTable> lootTable, Map<EquipmentSlot
|
||||
}
|
||||
|
||||
private static Map<EquipmentSlot, Float> createForAllSlots(float dropChance) {
|
||||
- return createForAllSlots(List.of(EquipmentSlot.values()), dropChance);
|
||||
+ return createForAllSlots(List.of(EquipmentSlot.VALUES_ARRAY), dropChance); // Gale - JettPack - reduce array allocations
|
||||
}
|
||||
|
||||
private static Map<EquipmentSlot, Float> createForAllSlots(List<EquipmentSlot> equipmentSlots, float dropChance) {
|
||||
diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java
|
||||
index 24ecca78dc1140b6fc47d59f2acefca6bc2b0220..18bddc3db6f0e06f1811f2c409f207db2f462f63 100644
|
||||
index cf283389d9263ba29720bf296a778be9eaf308a7..8803c03846828b532bd2b6e164c589995907c96b 100644
|
||||
--- a/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/net/minecraft/world/item/ItemStack.java
|
||||
@@ -1173,7 +1173,7 @@ public final class ItemStack implements DataComponentHolder {
|
||||
@@ -1153,7 +1153,7 @@ public final class ItemStack implements DataComponentHolder {
|
||||
|
||||
private void addAttributeTooltips(Consumer<Component> tooltipAdder, TooltipDisplay tooltipDisplay, @Nullable Player player) {
|
||||
if (tooltipDisplay.shows(DataComponents.ATTRIBUTE_MODIFIERS)) {
|
||||
- for (EquipmentSlotGroup equipmentSlotGroup : EquipmentSlotGroup.values()) {
|
||||
+ for (EquipmentSlotGroup equipmentSlotGroup : EquipmentSlotGroup.VALUES_ARRAY) { // Gale - JettPack - reduce array allocations
|
||||
MutableBoolean mutableBoolean = new MutableBoolean(true);
|
||||
this.forEachModifier(equipmentSlotGroup, (attribute, modifier) -> {
|
||||
if (mutableBoolean.isTrue()) {
|
||||
this.forEachModifier(
|
||||
equipmentSlotGroup,
|
||||
diff --git a/net/minecraft/world/item/crafting/ShapedRecipePattern.java b/net/minecraft/world/item/crafting/ShapedRecipePattern.java
|
||||
index bfda76974ea8d4397e2c2ebf5bdcb5d7e5f0bab5..cabbc93409ca99180d115e2f23419ee1824d5801 100644
|
||||
--- a/net/minecraft/world/item/crafting/ShapedRecipePattern.java
|
||||
@@ -236,10 +310,10 @@ index bfda76974ea8d4397e2c2ebf5bdcb5d7e5f0bab5..cabbc93409ca99180d115e2f23419ee1
|
||||
String[] strings = new String[pattern.size() - i3 - i2];
|
||||
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index 9e72ed6ed0c5acb69f23652dce473e914455c412..439b8619e9f0ed3dc1974ba2ee6214b63447ea96 100644
|
||||
index b62ee276e2176da439ac2f4da4501861da746004..97d227249405c8648b8b5e9bcca5a3f202f7b903 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -1832,7 +1832,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
@@ -1825,7 +1825,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
public org.bukkit.entity.Entity[] getChunkEntities(int chunkX, int chunkZ) {
|
||||
ca.spottedleaf.moonrise.patches.chunk_system.level.entity.ChunkEntitySlices slices = ((ServerLevel)this).moonrise$getEntityLookup().getChunk(chunkX, chunkZ);
|
||||
if (slices == null) {
|
||||
@@ -248,7 +322,7 @@ index 9e72ed6ed0c5acb69f23652dce473e914455c412..439b8619e9f0ed3dc1974ba2ee6214b6
|
||||
}
|
||||
|
||||
List<org.bukkit.entity.Entity> ret = new java.util.ArrayList<>();
|
||||
@@ -1843,7 +1843,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
@@ -1836,7 +1836,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
}
|
||||
}
|
||||
|
||||
@@ -289,7 +363,7 @@ index a647d76d365a60b95a3eb7927ac426bf70d417f3..7977ecd013c55359f179b4b7f895099b
|
||||
|
||||
@Override
|
||||
diff --git a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
index c5b3b5e5f621f8db152aa190374ae0fe567d6828..f6c3dac2a2a17760ab7015fe75c5a4dd04c11319 100644
|
||||
index 36a72a11d28f99bfe85868461925b778cc01478e..ca2cab797fc16f0961ce994fcb45029589b3c370 100644
|
||||
--- a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
@@ -44,7 +44,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
@@ -301,3 +375,16 @@ index c5b3b5e5f621f8db152aa190374ae0fe567d6828..f6c3dac2a2a17760ab7015fe75c5a4dd
|
||||
private static final int[] SLOTS_FOR_DOWN = new int[]{2, 1};
|
||||
private static final int[] SLOTS_FOR_SIDES = new int[]{1};
|
||||
public static final int DATA_LIT_DURATION = 1;
|
||||
diff --git a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
index c8f23011a8942a5be970c606f67142cbd202b97e..98971a07757d29d6926a0aa05f229b8020af42b6 100644
|
||||
--- a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
+++ b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
@@ -258,7 +258,7 @@ public class MapItemSavedData extends SavedData {
|
||||
}
|
||||
|
||||
private static boolean hasMapInvisibilityItemEquipped(Player player) {
|
||||
- for (EquipmentSlot equipmentSlot : EquipmentSlot.values()) {
|
||||
+ for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES_ARRAY) { // Gale - JettPack - reduce array allocations
|
||||
if (equipmentSlot != EquipmentSlot.MAINHAND
|
||||
&& equipmentSlot != EquipmentSlot.OFFHAND
|
||||
&& player.getItemBySlot(equipmentSlot).is(ItemTags.MAP_INVISIBILITY_EQUIPMENT)) {
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index e84081f571190fc00db07bdc9da349b9cfae142a..90f80877f25fd10a62d6ed273aa2ebb4b390f292 100644
|
||||
index 6714668563e3a7543765064d9824b93ec3924473..147b57bec7646eda5b9f3b1119ce7b9dfd7c328c 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -2017,10 +2017,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2087,10 +2087,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
@Deprecated
|
||||
public float getLightLevelDependentMagicValue() {
|
||||
@@ -39,10 +39,10 @@ index e84081f571190fc00db07bdc9da349b9cfae142a..90f80877f25fd10a62d6ed273aa2ebb4
|
||||
public void absSnapTo(double x, double y, double z, float yRot, float xRot) {
|
||||
this.absSnapTo(x, y, z);
|
||||
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
|
||||
index 7f5981f71e6380c09e40a0c80db6a77e74d5113d..6cc000611dc58a5487034ad87af4156059dd37d7 100644
|
||||
index 4d4b58b684ca115f4d8f672362d4c8252ef9481a..dcea538d00d3751b887c71450026ce2ced0093b1 100644
|
||||
--- a/net/minecraft/world/entity/Mob.java
|
||||
+++ b/net/minecraft/world/entity/Mob.java
|
||||
@@ -1474,20 +1474,31 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
@@ -1500,20 +1500,31 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
protected void playAttackSound() {
|
||||
}
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/level/GameRules.java b/net/minecraft/world/level/GameRules.java
|
||||
index 02bc5d83b92a594ec519f0a02b0517fdb4b9e954..a3a2d51cf53ce4dba8caaaf73967ae714ed16a36 100644
|
||||
index d5536dd40a1e9a2e05967652f690abbbca287852..966ca1e0e828e4176e12cbcf8c4a6b16489708de 100644
|
||||
--- a/net/minecraft/world/level/GameRules.java
|
||||
+++ b/net/minecraft/world/level/GameRules.java
|
||||
@@ -277,7 +277,7 @@ public class GameRules {
|
||||
@@ -288,7 +288,7 @@ public class GameRules {
|
||||
}
|
||||
|
||||
private GameRules(Map<GameRules.Key<?>, GameRules.Value<?>> rules, FeatureFlagSet enabledFeatures) {
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/ai/attributes/AttributeMap.java b/net/minecraft/world/entity/ai/attributes/AttributeMap.java
|
||||
index bed9b564c493cd84bf53fc49368fda736f3fbc2b..c61071e0019a18eb73223ed9b64619c9cb691896 100644
|
||||
index fdb02fc40579866167e8cc9bcefbd961588b53a6..58d8424262db14b2dca0b2c5a40748b6c0c18e83 100644
|
||||
--- a/net/minecraft/world/entity/ai/attributes/AttributeMap.java
|
||||
+++ b/net/minecraft/world/entity/ai/attributes/AttributeMap.java
|
||||
@@ -14,9 +14,11 @@ import net.minecraft.nbt.ListTag;
|
||||
@@ -14,9 +14,11 @@ import net.minecraft.core.Holder;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
public class AttributeMap {
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 85759f8fe3892e0af3cbbd836defc9ee4b2705f6..a542e1dfa41ec2ea1a979dc27d0155d5c08fd7cc 100644
|
||||
index dc7d53e93a49297e3a5e1204025b3a50e73fba4e..586b79bc844b098336c6d3bf342b570396e6af88 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -521,10 +521,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -535,10 +535,9 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
}
|
||||
|
||||
protected void tryAddFrost() {
|
||||
@@ -28,7 +28,7 @@ index 85759f8fe3892e0af3cbbd836defc9ee4b2705f6..a542e1dfa41ec2ea1a979dc27d0155d5
|
||||
if (attribute == null) {
|
||||
return;
|
||||
}
|
||||
@@ -532,7 +531,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -546,7 +545,6 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
float f = -0.05F * this.getPercentFrozen();
|
||||
attribute.addTransientModifier(new AttributeModifier(SPEED_MODIFIER_POWDER_SNOW_ID, f, AttributeModifier.Operation.ADD_VALUE));
|
||||
}
|
||||
|
||||
@@ -88,10 +88,10 @@ index 5c1103ef028e5ffe6ce0eadc861dd3b2c8f3ed9f..828ced8aa5665c6f5d0b121947719c4e
|
||||
+ @Override public <T> void compact(net.minecraft.world.level.chunk.Palette<T> srcPalette, net.minecraft.world.level.chunk.Palette<T> dstPalette, short[] out) {} // Gale - Lithium - faster chunk serialization
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/chunk/PalettedContainer.java b/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
index 7da7ce0fd19896593e63edc88b492c02f926bba0..f6bb9bd4d000958610ec3e6733b54c5f7a020da5 100644
|
||||
index a251ba67644cd02a0b00d7c8b0e2c64aa5e26291..59d48e7dc0911557c57a7e07f5f9013c010165bd 100644
|
||||
--- a/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
+++ b/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
@@ -25,6 +25,22 @@ import net.minecraft.util.ThreadingDetector;
|
||||
@@ -24,6 +24,22 @@ import net.minecraft.util.ThreadingDetector;
|
||||
import net.minecraft.util.ZeroBitStorage;
|
||||
|
||||
public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainerRO<T> {
|
||||
@@ -114,7 +114,7 @@ index 7da7ce0fd19896593e63edc88b492c02f926bba0..f6bb9bd4d000958610ec3e6733b54c5f
|
||||
private static final int MIN_PALETTE_BITS = 0;
|
||||
private final PaletteResize<T> dummyPaletteResize = (bits, objectAdded) -> 0;
|
||||
public final IdMap<T> registry;
|
||||
@@ -344,28 +360,54 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
@@ -343,28 +359,54 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
public synchronized PalettedContainerRO.PackedData<T> pack(IdMap<T> registry, PalettedContainer.Strategy strategy) { // Paper - synchronize
|
||||
this.acquire();
|
||||
|
||||
@@ -184,7 +184,7 @@ index 7da7ce0fd19896593e63edc88b492c02f926bba0..f6bb9bd4d000958610ec3e6733b54c5f
|
||||
}
|
||||
|
||||
private static <T> void swapPalette(int[] bits, IntUnaryOperator operator) {
|
||||
@@ -405,13 +447,33 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
@@ -404,13 +446,33 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
|
||||
@Override
|
||||
public void count(PalettedContainer.CountConsumer<T> countConsumer) {
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: VMP (https://github.com/RelativityMC/VMP-fabric)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 90f80877f25fd10a62d6ed273aa2ebb4b390f292..c0a75b84360cdaf89bb23380210de7c39f51ab2b 100644
|
||||
index 147b57bec7646eda5b9f3b1119ce7b9dfd7c328c..cb444ab1a3bef2ee5544b99dd513229a1aae4b84 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -240,6 +240,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -260,6 +260,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public float yRotO;
|
||||
public float xRotO;
|
||||
private AABB bb = INITIAL_AABB;
|
||||
@@ -24,7 +24,7 @@ index 90f80877f25fd10a62d6ed273aa2ebb4b390f292..c0a75b84360cdaf89bb23380210de7c3
|
||||
public boolean onGround;
|
||||
public boolean horizontalCollision;
|
||||
public boolean verticalCollision;
|
||||
@@ -1064,6 +1065,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1086,6 +1087,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
// Paper end - detailed watchdog information
|
||||
|
||||
public void move(MoverType type, Vec3 movement) {
|
||||
@@ -36,7 +36,7 @@ index 90f80877f25fd10a62d6ed273aa2ebb4b390f292..c0a75b84360cdaf89bb23380210de7c3
|
||||
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
|
||||
// Paper start - detailed watchdog information
|
||||
ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread("Cannot move an entity off-main");
|
||||
@@ -4155,6 +4161,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4376,6 +4382,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public final void setBoundingBox(AABB bb) {
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: Slice (https://github.com/Cryptite/Slice)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index c0a75b84360cdaf89bb23380210de7c39f51ab2b..e7c9b51a115d975ea4a6aaa8e051ac7daf58395e 100644
|
||||
index cb444ab1a3bef2ee5544b99dd513229a1aae4b84..ffdeaab1fa7540eddea5997d9ab1eb6faddb7128 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -864,7 +864,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -886,7 +886,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
this.checkBelowWorld();
|
||||
if (!this.level().isClientSide) {
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: SportPaper (https://github.com/Electroid/SportPaper)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 4da7c02024a5ad8ba34bad2adfd8228f11f39eee..d99ac6eb59e10ff6af841c4496ee46fbfbf57c22 100644
|
||||
index 617eb1b9d30d499124576c5d7cb5152571cc6b84..ad114ca013e0d09d40755acbe916586868a519ed 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1557,6 +1557,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -1579,6 +1579,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
|
||||
@Override
|
||||
public void destroyBlockProgress(int breakerId, BlockPos pos, int progress) {
|
||||
@@ -32,7 +32,7 @@ index 4da7c02024a5ad8ba34bad2adfd8228f11f39eee..d99ac6eb59e10ff6af841c4496ee46fb
|
||||
// CraftBukkit start
|
||||
Player breakerPlayer = null;
|
||||
Entity entity = this.getEntity(breakerId);
|
||||
@@ -1573,7 +1582,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -1595,7 +1604,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
.callEvent();
|
||||
}
|
||||
// Paper end - Add BlockBreakProgressUpdateEvent
|
||||
@@ -41,7 +41,7 @@ index 4da7c02024a5ad8ba34bad2adfd8228f11f39eee..d99ac6eb59e10ff6af841c4496ee46fb
|
||||
if (serverPlayer != null && serverPlayer.level() == this && serverPlayer.getId() != breakerId) {
|
||||
double d = pos.getX() - serverPlayer.getX();
|
||||
double d1 = pos.getY() - serverPlayer.getY();
|
||||
@@ -1584,7 +1593,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -1606,7 +1615,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (d * d + d1 * d1 + d2 * d2 < 1024.0) {
|
||||
|
||||
@@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index be324f5085c1cceb3d4c37bc73d0ee5ac761a99c..1ea70e63db1d5f05cdbace8be48160b26a480fee 100644
|
||||
index 186e0a6e565d29572f5d4771a68e4a9cb2bd45de..91d4a5f7685296e397c1c341813542fd13eaf168 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -114,6 +114,7 @@ public abstract class PlayerList {
|
||||
@@ -113,6 +113,7 @@ public abstract class PlayerList {
|
||||
private final MinecraftServer server;
|
||||
public final List<ServerPlayer> players = new java.util.concurrent.CopyOnWriteArrayList(); // CraftBukkit - ArrayList -> CopyOnWriteArrayList: Iterator safety
|
||||
private final Map<UUID, ServerPlayer> playersByUUID = Maps.newHashMap();
|
||||
@@ -48,15 +48,15 @@ index be324f5085c1cceb3d4c37bc73d0ee5ac761a99c..1ea70e63db1d5f05cdbace8be48160b2
|
||||
private final UserBanList bans = new UserBanList(USERBANLIST_FILE);
|
||||
private final IpBanList ipBans = new IpBanList(IPBANLIST_FILE);
|
||||
private final ServerOpList ops = new ServerOpList(OPLIST_FILE);
|
||||
@@ -311,6 +312,7 @@ public abstract class PlayerList {
|
||||
this.players.add(player);
|
||||
this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot
|
||||
this.playersByUUID.put(player.getUUID(), player);
|
||||
+ this.addToSendAllPlayerInfoBuckets(player); // Gale - Purpur - spread out sending all player info
|
||||
// this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player))); // CraftBukkit - replaced with loop below
|
||||
// Paper start - Fire PlayerJoinEvent when Player is actually ready; correctly register player BEFORE PlayerJoinEvent, so the entity is valid and doesn't require tick delay hacks
|
||||
player.supressTrackerForLogin = true;
|
||||
@@ -582,6 +584,7 @@ public abstract class PlayerList {
|
||||
@@ -312,6 +313,7 @@ public abstract class PlayerList {
|
||||
this.players.add(player);
|
||||
this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot
|
||||
this.playersByUUID.put(player.getUUID(), player);
|
||||
+ this.addToSendAllPlayerInfoBuckets(player); // Gale - Purpur - spread out sending all player info
|
||||
// this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player))); // CraftBukkit - replaced with loop below
|
||||
// Paper start - Fire PlayerJoinEvent when Player is actually ready; correctly register player BEFORE PlayerJoinEvent, so the entity is valid and doesn't require tick delay hacks
|
||||
player.supressTrackerForLogin = true;
|
||||
@@ -585,6 +587,7 @@ public abstract class PlayerList {
|
||||
player.getAdvancements().stopListening();
|
||||
this.players.remove(player);
|
||||
this.playersByName.remove(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
|
||||
@@ -64,15 +64,15 @@ index be324f5085c1cceb3d4c37bc73d0ee5ac761a99c..1ea70e63db1d5f05cdbace8be48160b2
|
||||
this.server.getCustomBossEvents().onPlayerDisconnect(player);
|
||||
UUID uuid = player.getUUID();
|
||||
ServerPlayer serverPlayer = this.playersByUUID.get(uuid);
|
||||
@@ -724,6 +727,7 @@ public abstract class PlayerList {
|
||||
@@ -720,6 +723,7 @@ public abstract class PlayerList {
|
||||
player.stopRiding(); // CraftBukkit
|
||||
this.players.remove(player);
|
||||
this.playersByName.remove(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
|
||||
+ this.removeFromSendAllPlayerInfoBuckets(player); // Gale - Purpur - spread out sending all player info
|
||||
player.serverLevel().removePlayerImmediately(player, reason);
|
||||
player.level().removePlayerImmediately(player, reason);
|
||||
// TeleportTransition teleportTransition = player.findRespawnPositionAndUseSpawnBlock(!keepInventory, TeleportTransition.DO_NOTHING);
|
||||
// ServerLevel level = teleportTransition.newLevel();
|
||||
@@ -802,6 +806,7 @@ public abstract class PlayerList {
|
||||
@@ -798,6 +802,7 @@ public abstract class PlayerList {
|
||||
this.players.add(serverPlayer);
|
||||
this.playersByName.put(serverPlayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT), serverPlayer); // Spigot
|
||||
this.playersByUUID.put(serverPlayer.getUUID(), serverPlayer);
|
||||
@@ -80,7 +80,7 @@ index be324f5085c1cceb3d4c37bc73d0ee5ac761a99c..1ea70e63db1d5f05cdbace8be48160b2
|
||||
}
|
||||
// serverPlayer.initInventoryMenu();
|
||||
serverPlayer.setHealth(serverPlayer.getHealth());
|
||||
@@ -904,18 +909,58 @@ public abstract class PlayerList {
|
||||
@@ -900,18 +905,58 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
@@ -145,16 +145,16 @@ index be324f5085c1cceb3d4c37bc73d0ee5ac761a99c..1ea70e63db1d5f05cdbace8be48160b2
|
||||
public void broadcastAll(Packet packet, net.minecraft.world.entity.player.Player entityhuman) {
|
||||
for (ServerPlayer entityplayer : this.players) { // Paper - replace for i with for each for thread safety
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index 248ee263a853d1d3148746a63ba422115853f6a1..8032eae3256625e90313edb4fa132b19d52ba0a0 100644
|
||||
index abb19f08c736151fa5c6986e31eb4cf545073586..5e01ae7c5d11777868d72589019ad11305c9acdd 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -221,9 +221,12 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -230,9 +230,12 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
+ public final int sendAllPlayerInfoBucketIndex; // Gale - Purpur - spread out sending all player info
|
||||
+
|
||||
public Player(Level level, BlockPos pos, float yRot, GameProfile gameProfile) {
|
||||
public Player(Level level, GameProfile gameProfile) {
|
||||
super(EntityType.PLAYER, level);
|
||||
this.setUUID(gameProfile.getId());
|
||||
+ this.sendAllPlayerInfoBucketIndex = Math.floorMod(this.uuid.hashCode(), net.minecraft.server.players.PlayerList.SEND_PLAYER_INFO_INTERVAL); // Gale - Purpur - spread out sending all player info
|
||||
|
||||
@@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 1ea70e63db1d5f05cdbace8be48160b26a480fee..4a3f06a4677348c1277669514f9acef7a4334f1d 100644
|
||||
index 91d4a5f7685296e397c1c341813542fd13eaf168..8e7c77174750807bc0e925b100ff73a7bedd76e9 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -913,10 +913,19 @@ public abstract class PlayerList {
|
||||
@@ -909,10 +909,19 @@ public abstract class PlayerList {
|
||||
ServerPlayer[] sendAllPlayerInfoBucket = this.sendAllPlayerInfoBuckets[this.sendAllPlayerInfoIn];
|
||||
|
||||
if (sendAllPlayerInfoBucket != null) {
|
||||
|
||||
@@ -37,22 +37,22 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
||||
index f1a637272a8e4ec9c46209ca6b58a4905c925a86..006b5502eda66909a971278aa5751ec187bb8a3c 100644
|
||||
index b9b049e025de5393fa4ef6555f5900a7b5b2f032..189cba4369a029713bb3b0cdc77d5c103c6cd852 100644
|
||||
--- a/net/minecraft/commands/Commands.java
|
||||
+++ b/net/minecraft/commands/Commands.java
|
||||
@@ -496,6 +496,7 @@ public class Commands {
|
||||
private void runSync(ServerPlayer player, java.util.Collection<String> bukkit, RootCommandNode<SharedSuggestionProvider> rootCommandNode) {
|
||||
@@ -531,6 +531,7 @@ public class Commands {
|
||||
private void runSync(ServerPlayer player, java.util.Collection<String> bukkit, RootCommandNode<CommandSourceStack> rootCommandNode) {
|
||||
// Paper end - Perf: Async command map building
|
||||
new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent<CommandSourceStack>(player.getBukkitEntity(), (RootCommandNode) rootCommandNode, true).callEvent(); // Paper - Brigadier API
|
||||
+ if (org.bukkit.event.player.PlayerCommandSendEvent.getHandlerList().getRegisteredListeners().length > 0) { // Gale - Purpur - skip PlayerCommandSendEvent if there are no listeners
|
||||
org.bukkit.event.player.PlayerCommandSendEvent event = new org.bukkit.event.player.PlayerCommandSendEvent(player.getBukkitEntity(), new java.util.LinkedHashSet<>(bukkit));
|
||||
event.getPlayer().getServer().getPluginManager().callEvent(event);
|
||||
|
||||
@@ -506,6 +507,7 @@ public class Commands {
|
||||
@@ -541,6 +542,7 @@ public class Commands {
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
+ } // Gale - Purpur - skip PlayerCommandSendEvent if there are no listeners
|
||||
|
||||
player.connection.send(new ClientboundCommandsPacket(rootCommandNode));
|
||||
player.connection.send(new ClientboundCommandsPacket(rootCommandNode, COMMAND_NODE_INSPECTOR));
|
||||
}
|
||||
|
||||
|
||||
@@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
index 776ff13b399fa01bf3900280cf1b5782370732a0..c4f4c21f32e2aba79e15315d73124c803bb1223a 100644
|
||||
index dd3841c06a386c0d6dc641fe2573d3fb0733504d..0ff225163b3d95b51b851c7e16bd994453cc2d0e 100644
|
||||
--- a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
@@ -40,6 +40,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
@@ -42,6 +42,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
private long keepAliveChallenge;
|
||||
private long closedListenerTime;
|
||||
private boolean closed = false;
|
||||
@@ -48,7 +48,7 @@ index 776ff13b399fa01bf3900280cf1b5782370732a0..c4f4c21f32e2aba79e15315d73124c80
|
||||
private int latency;
|
||||
private volatile boolean suspendFlushingOnServerThread = false;
|
||||
// CraftBukkit start
|
||||
@@ -48,7 +49,10 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
@@ -50,7 +51,10 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
public boolean processedDisconnect;
|
||||
// CraftBukkit end
|
||||
public final java.util.Map<java.util.UUID, net.kyori.adventure.resource.ResourcePackCallback> packCallbacks = new java.util.concurrent.ConcurrentHashMap<>(); // Paper - adventure resource pack callbacks
|
||||
@@ -60,7 +60,7 @@ index 776ff13b399fa01bf3900280cf1b5782370732a0..c4f4c21f32e2aba79e15315d73124c80
|
||||
protected static final net.minecraft.resources.ResourceLocation MINECRAFT_BRAND = net.minecraft.resources.ResourceLocation.withDefaultNamespace("brand"); // Paper - Brand support
|
||||
|
||||
public ServerCommonPacketListenerImpl(MinecraftServer server, Connection connection, CommonListenerCookie cookie, net.minecraft.server.level.ServerPlayer player) { // CraftBukkit
|
||||
@@ -117,6 +121,16 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
@@ -119,6 +123,16 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
|
||||
@Override
|
||||
public void handleKeepAlive(ServerboundKeepAlivePacket packet) {
|
||||
@@ -77,7 +77,7 @@ index 776ff13b399fa01bf3900280cf1b5782370732a0..c4f4c21f32e2aba79e15315d73124c80
|
||||
if (this.keepAlivePending && packet.getId() == this.keepAliveChallenge) {
|
||||
int i = (int)(Util.getMillis() - this.keepAliveTime);
|
||||
this.latency = (this.latency * 3 + i) / 4;
|
||||
@@ -124,6 +138,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
@@ -126,6 +140,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
} else if (!this.isSingleplayerOwner()) {
|
||||
this.disconnectAsync(TIMEOUT_DISCONNECTION_MESSAGE, org.bukkit.event.player.PlayerKickEvent.Cause.TIMEOUT); // Paper - add proper async disconnect
|
||||
}
|
||||
@@ -85,7 +85,7 @@ index 776ff13b399fa01bf3900280cf1b5782370732a0..c4f4c21f32e2aba79e15315d73124c80
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -240,6 +255,21 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
@@ -248,6 +263,21 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
// Paper start - give clients a longer time to respond to pings as per pre 1.12.2 timings
|
||||
// This should effectively place the keepalive handling back to "as it was" before 1.12.2
|
||||
final long elapsedTime = millis - this.keepAliveTime;
|
||||
@@ -107,7 +107,7 @@ index 776ff13b399fa01bf3900280cf1b5782370732a0..c4f4c21f32e2aba79e15315d73124c80
|
||||
if (!this.isSingleplayerOwner() && elapsedTime >= 15000L) { // use vanilla's 15000L between keep alive packets
|
||||
if (this.keepAlivePending) {
|
||||
if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected
|
||||
@@ -253,6 +283,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
@@ -261,6 +291,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
this.send(new ClientboundKeepAlivePacket(this.keepAliveChallenge));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index e7c9b51a115d975ea4a6aaa8e051ac7daf58395e..430dec39410c4445326488b537dcd103715b16f4 100644
|
||||
index ffdeaab1fa7540eddea5997d9ab1eb6faddb7128..cf13f3956ddcf350e6b2ea3b34d9a2bae214cb22 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4665,6 +4665,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4874,6 +4874,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return this.inBlockState;
|
||||
}
|
||||
|
||||
@@ -28,10 +28,10 @@ index e7c9b51a115d975ea4a6aaa8e051ac7daf58395e..430dec39410c4445326488b537dcd103
|
||||
return this.chunkPosition;
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index a542e1dfa41ec2ea1a979dc27d0155d5c08fd7cc..ed96755b15e9a9d3dc05ccc8afc730437fe035ff 100644
|
||||
index 586b79bc844b098336c6d3bf342b570396e6af88..af6633b8b3efceeb3bf101e069ddc1c65c7f6bfb 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2097,8 +2097,17 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -2129,8 +2129,17 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
|
||||
public boolean onClimbableCached() {
|
||||
if (!this.blockPosition().equals(this.lastClimbingPosition)) {
|
||||
@@ -51,7 +51,7 @@ index a542e1dfa41ec2ea1a979dc27d0155d5c08fd7cc..ed96755b15e9a9d3dc05ccc8afc73043
|
||||
}
|
||||
|
||||
return this.cachedOnClimbable;
|
||||
@@ -2106,11 +2115,28 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -2138,11 +2147,28 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
// Gale end - Airplane - cache on climbable check
|
||||
|
||||
public boolean onClimbable() {
|
||||
|
||||
@@ -13,25 +13,25 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 6d1542dc07fdf1f3384e8e6d1dacca5f8c3f0b69..13ab4a70f8208c998edeeddffea0b694d2b1347f 100644
|
||||
index 3b08bf99de48b7af7c91de4b7448231ebe6819ae..46be66df0c6c31bff75bb31c005c1c1416c034fb 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2079,12 +2079,18 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -2117,12 +2117,18 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
|
||||
@Override
|
||||
public void crit(Entity entityHit) {
|
||||
- this.serverLevel().getChunkSource().broadcastAndSend(this, new ClientboundAnimatePacket(entityHit, 4));
|
||||
- this.level().getChunkSource().broadcastAndSend(this, new ClientboundAnimatePacket(entityHit, 4));
|
||||
+ // Gale start - MultiPaper - broadcast crit animations as the entity being critted
|
||||
+ var level = this.serverLevel();
|
||||
+ var level = this.level();
|
||||
+ level.getChunkSource().broadcastAndSend(level.galeConfig().gameplayMechanics.fixes.broadcastCritAnimationsAsTheEntityBeingCritted ? entityHit : this, new ClientboundAnimatePacket(entityHit, 4));
|
||||
+ // Gale end - MultiPaper - broadcast crit animations as the entity being critted
|
||||
+ // Gale end - MultiPaper - broadcast crit animations as the entity being critte
|
||||
}
|
||||
|
||||
@Override
|
||||
public void magicCrit(Entity entityHit) {
|
||||
- this.serverLevel().getChunkSource().broadcastAndSend(this, new ClientboundAnimatePacket(entityHit, 5));
|
||||
- this.level().getChunkSource().broadcastAndSend(this, new ClientboundAnimatePacket(entityHit, 5));
|
||||
+ // Gale start - MultiPaper - broadcast crit animations as the entity being critted
|
||||
+ var level = this.serverLevel();
|
||||
+ var level = this.level();
|
||||
+ level.getChunkSource().broadcastAndSend(level.galeConfig().gameplayMechanics.fixes.broadcastCritAnimationsAsTheEntityBeingCritted ? entityHit : this, new ClientboundAnimatePacket(entityHit, 5));
|
||||
+ // Gale end - MultiPaper - broadcast crit animations as the entity being critted
|
||||
}
|
||||
|
||||
@@ -14,12 +14,12 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 4a3f06a4677348c1277669514f9acef7a4334f1d..d2dc48d5a42506716bcbe0854a860b1eaa3b5705 100644
|
||||
index 8e7c77174750807bc0e925b100ff73a7bedd76e9..00932be984dae86210329b92c47422c83d670bfb 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -235,6 +235,13 @@ public abstract class PlayerList {
|
||||
org.spigotmc.event.player.PlayerSpawnLocationEvent ev = new org.spigotmc.event.player.PlayerSpawnLocationEvent(spawnPlayer, spawnPlayer.getLocation());
|
||||
this.cserver.getPluginManager().callEvent(ev);
|
||||
@@ -236,6 +236,13 @@ public abstract class PlayerList {
|
||||
org.spigotmc.event.player.PlayerSpawnLocationEvent ev = new org.spigotmc.event.player.PlayerSpawnLocationEvent(spawnPlayer, spawnPlayer.getLocation());
|
||||
this.cserver.getPluginManager().callEvent(ev);
|
||||
|
||||
+ // Gale start - MultiPaper - do not place player in world if kicked before being spawned in
|
||||
+ if (!connection.isConnected() || player.quitReason != null) {
|
||||
@@ -28,6 +28,6 @@ index 4a3f06a4677348c1277669514f9acef7a4334f1d..d2dc48d5a42506716bcbe0854a860b1e
|
||||
+ }
|
||||
+ // Gale end - MultiPaper - do not place player in world if kicked before being spawned in
|
||||
+
|
||||
org.bukkit.Location loc = ev.getSpawnLocation();
|
||||
serverLevel = ((org.bukkit.craftbukkit.CraftWorld) loc.getWorld()).getHandle();
|
||||
org.bukkit.Location loc = ev.getSpawnLocation();
|
||||
serverLevel = ((org.bukkit.craftbukkit.CraftWorld) loc.getWorld()).getHandle();
|
||||
|
||||
|
||||
@@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 923fc9d611d46017cf7ac8e6de6cf0966e0ce9f9..32b8613c62971bc7481d5242ee15b84cb1b361a7 100644
|
||||
index eae529b69296f4c1329907ae6bb1b0c300393b6d..8b7b0232fa176e7034be34bf12cfdb63151ae059 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1091,6 +1091,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1093,6 +1093,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
private static final long MAX_CATCHUP_BUFFER = TICK_TIME * TPS * 60L;
|
||||
private long lastTick = 0;
|
||||
private long catchupTime = 0;
|
||||
@@ -48,7 +48,7 @@ index 923fc9d611d46017cf7ac8e6de6cf0966e0ce9f9..32b8613c62971bc7481d5242ee15b84c
|
||||
public final RollingAverage tps1 = new RollingAverage(60);
|
||||
public final RollingAverage tps5 = new RollingAverage(60 * 5);
|
||||
public final RollingAverage tps15 = new RollingAverage(60 * 15);
|
||||
@@ -1201,6 +1202,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1203,6 +1204,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (++MinecraftServer.currentTick % MinecraftServer.SAMPLE_INTERVAL == 0) {
|
||||
final long diff = currentTime - tickSection;
|
||||
final java.math.BigDecimal currentTps = TPS_BASE.divide(new java.math.BigDecimal(diff), 30, java.math.RoundingMode.HALF_UP);
|
||||
|
||||
@@ -23,10 +23,10 @@ The above copyright notice and this permission notice shall be included in all c
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 32b8613c62971bc7481d5242ee15b84cb1b361a7..c1b3d2b4c56b657ff51c8b27b4b80e0c0d01ddbe 100644
|
||||
index 8b7b0232fa176e7034be34bf12cfdb63151ae059..d1f79b29bc56afe62503f8b3caf0b7bf443add9e 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1138,6 +1138,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1140,6 +1140,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
private static final java.math.BigDecimal TPS_BASE = new java.math.BigDecimal(1E9).multiply(new java.math.BigDecimal(SAMPLE_INTERVAL));
|
||||
// Paper end
|
||||
|
||||
@@ -38,7 +38,7 @@ index 32b8613c62971bc7481d5242ee15b84cb1b361a7..c1b3d2b4c56b657ff51c8b27b4b80e0c
|
||||
protected void runServer() {
|
||||
try {
|
||||
if (!this.initServer()) {
|
||||
@@ -1223,7 +1228,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1225,7 +1230,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.nextTickTimeNanos += l;
|
||||
|
||||
this.tickFrame.start();
|
||||
@@ -48,7 +48,7 @@ index 32b8613c62971bc7481d5242ee15b84cb1b361a7..c1b3d2b4c56b657ff51c8b27b4b80e0c
|
||||
// Paper start - rewrite chunk system
|
||||
final Throwable crash = this.chunkSystemCrash;
|
||||
if (crash != null) {
|
||||
@@ -1352,11 +1359,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1354,11 +1361,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
protected void waitUntilNextTick() {
|
||||
this.runAllTasks();
|
||||
this.waitingForNextTick = true;
|
||||
|
||||
@@ -45,10 +45,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index 8032eae3256625e90313edb4fa132b19d52ba0a0..2aca22f978daa826bf7ac2b25f13bf30a1bd4284 100644
|
||||
index 5e01ae7c5d11777868d72589019ad11305c9acdd..1610ef636a0d93c1e07bad9e82ac4d9982c4e854 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -157,6 +157,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -166,6 +166,7 @@ public abstract class Player extends LivingEntity {
|
||||
protected static final EntityDataAccessor<Byte> DATA_PLAYER_MAIN_HAND = SynchedEntityData.defineId(Player.class, EntityDataSerializers.BYTE);
|
||||
protected static final EntityDataAccessor<CompoundTag> DATA_SHOULDER_LEFT = SynchedEntityData.defineId(Player.class, EntityDataSerializers.COMPOUND_TAG);
|
||||
protected static final EntityDataAccessor<CompoundTag> DATA_SHOULDER_RIGHT = SynchedEntityData.defineId(Player.class, EntityDataSerializers.COMPOUND_TAG);
|
||||
@@ -56,7 +56,7 @@ index 8032eae3256625e90313edb4fa132b19d52ba0a0..2aca22f978daa826bf7ac2b25f13bf30
|
||||
public static final int CLIENT_LOADED_TIMEOUT_TIME = 60;
|
||||
private static final short DEFAULT_SLEEP_TIMER = 0;
|
||||
private static final float DEFAULT_EXPERIENCE_PROGRESS = 0.0F;
|
||||
@@ -322,19 +323,23 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -332,19 +333,23 @@ public abstract class Player extends LivingEntity {
|
||||
this.moveCloak();
|
||||
if (this instanceof ServerPlayer serverPlayer) {
|
||||
this.foodData.tick(serverPlayer);
|
||||
|
||||
@@ -16,10 +16,10 @@ As part of: Akarin (https://github.com/Akarin-project/Akarin)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 430dec39410c4445326488b537dcd103715b16f4..4a0650cfe07bfafff46c20aeb9e78c92b7f9ca13 100644
|
||||
index cf13f3956ddcf350e6b2ea3b34d9a2bae214cb22..09115720a4e5573960eaeeb16c96888c44e19a95 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -2161,8 +2161,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2231,8 +2231,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public void push(Entity entity) {
|
||||
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 4a0650cfe07bfafff46c20aeb9e78c92b7f9ca13..8508f4b94f3e4532ce36baff4e68189540b0b59a 100644
|
||||
index 09115720a4e5573960eaeeb16c96888c44e19a95..e457dc20f76d813c32225733af0b29646d501202 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1206,8 +1206,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1218,8 +1218,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java
|
||||
index 18bddc3db6f0e06f1811f2c409f207db2f462f63..3ec4e0aa0777009b4ee75f6ae94732bd7e125619 100644
|
||||
index 8803c03846828b532bd2b6e164c589995907c96b..3acc2ae8533f19a6f9b2b6a1d96271f1047384a4 100644
|
||||
--- a/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/net/minecraft/world/item/ItemStack.java
|
||||
@@ -888,11 +888,11 @@ public final class ItemStack implements DataComponentHolder {
|
||||
@@ -868,11 +868,11 @@ public final class ItemStack implements DataComponentHolder {
|
||||
}
|
||||
|
||||
public static boolean isSameItem(ItemStack stack, ItemStack other) {
|
||||
|
||||
@@ -13,7 +13,7 @@ As part of: Patina (https://github.com/PatinaMC/Patina)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/commands/SpreadPlayersCommand.java b/net/minecraft/server/commands/SpreadPlayersCommand.java
|
||||
index d381800ad054be6b054dcca43fbe80d3f0c0c771..5904b9d985487ff8bd1f330667c43096aa298b98 100644
|
||||
index 92a820d48057ffe2ef35919341b6cdf605ca939e..b9b1bf351070cd2a744cdb683974fb2aa048d0d2 100644
|
||||
--- a/net/minecraft/server/commands/SpreadPlayersCommand.java
|
||||
+++ b/net/minecraft/server/commands/SpreadPlayersCommand.java
|
||||
@@ -107,7 +107,7 @@ public class SpreadPlayersCommand {
|
||||
@@ -26,10 +26,10 @@ index d381800ad054be6b054dcca43fbe80d3f0c0c771..5904b9d985487ff8bd1f330667c43096
|
||||
double d1 = center.y - maxRange;
|
||||
double d2 = center.x + maxRange;
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 13ab4a70f8208c998edeeddffea0b694d2b1347f..b3ffb2afda9ea5cafbab9f775d526af1940cfdca 100644
|
||||
index 46be66df0c6c31bff75bb31c005c1c1416c034fb..274b3aba999f485ea261ef356bfc62627257974c 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -488,7 +488,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -498,7 +498,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
long l1 = l * l;
|
||||
int i = l1 > 2147483647L ? Integer.MAX_VALUE : (int)l1;
|
||||
int coprime = this.getCoprime(i);
|
||||
@@ -52,10 +52,10 @@ index 0b8d279a53196f3998b1f6901738ca8e02ef7311..9add567d2ec2f5e9cd5bee84423c5a44
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/entity/projectile/FishingHook.java b/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
index ca5cd9354d53c6c05bd7ba50c6e1dbd1ed548f67..6cfd384aea8c8e90b4e4ae08ece86d52640c95d7 100644
|
||||
index 5f3abbe943be394e9cb987945a238208940b5015..5b831ecd8f094bcae2ff50b96ccfc0d75b43a495 100644
|
||||
--- a/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
+++ b/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
@@ -48,7 +48,7 @@ import org.slf4j.Logger;
|
||||
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
|
||||
|
||||
public class FishingHook extends Projectile {
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -64,7 +64,7 @@ index ca5cd9354d53c6c05bd7ba50c6e1dbd1ed548f67..6cfd384aea8c8e90b4e4ae08ece86d52
|
||||
private boolean biting;
|
||||
public int outOfWaterTime;
|
||||
private static final int MAX_OUT_OF_WATER_TIME = 10;
|
||||
@@ -86,6 +86,7 @@ public class FishingHook extends Projectile {
|
||||
@@ -90,6 +90,7 @@ public class FishingHook extends Projectile {
|
||||
this.minWaitTime = level.paperConfig().fishingTimeRange.minimum;
|
||||
this.maxWaitTime = level.paperConfig().fishingTimeRange.maximum;
|
||||
// Paper end - Configurable fishing time ranges
|
||||
@@ -73,7 +73,7 @@ index ca5cd9354d53c6c05bd7ba50c6e1dbd1ed548f67..6cfd384aea8c8e90b4e4ae08ece86d52
|
||||
|
||||
public FishingHook(EntityType<? extends FishingHook> entityType, Level level) {
|
||||
diff --git a/net/minecraft/world/entity/raid/Raid.java b/net/minecraft/world/entity/raid/Raid.java
|
||||
index 71166fbf93d62e8e1bff3db8161932ee2fc5ea86..c7ca8a71070f15c573a5748f1df9810af23febdb 100644
|
||||
index afcf185c4e2c0648c96a872fbe1fbebb6012d513..aaa990b01e886812cc1dbad819e922b23d08889c 100644
|
||||
--- a/net/minecraft/world/entity/raid/Raid.java
|
||||
+++ b/net/minecraft/world/entity/raid/Raid.java
|
||||
@@ -121,7 +121,7 @@ public class Raid {
|
||||
@@ -104,10 +104,10 @@ index 71166fbf93d62e8e1bff3db8161932ee2fc5ea86..c7ca8a71070f15c573a5748f1df9810a
|
||||
|
||||
for (int i3 = 0; i3 < i1; i3++) {
|
||||
diff --git a/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
index 8bb0926130a14351507b2b74feca42278c080381..f7884610d5a94bb1680c1ec8bd4f3ec917b8bc8a 100644
|
||||
index c8b577a5d5f059aed368fa082bc4518cc2dbd0b0..ac5ab4ae88c8188635f5784a10002a6cdcad49b6 100644
|
||||
--- a/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
@@ -246,7 +246,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||
@@ -248,7 +248,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||
}
|
||||
|
||||
private static void spawnGatewayPortal(ServerLevel level, BlockPos pos, EndGatewayConfiguration config) {
|
||||
|
||||
@@ -18,10 +18,10 @@ this patch is focused around the sensors used for ai
|
||||
delete the line of sight cache less often and use a faster nearby comparison
|
||||
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index ed96755b15e9a9d3dc05ccc8afc730437fe035ff..befed81ecf698d27971d18fe2743562742e4e1d3 100644
|
||||
index af6633b8b3efceeb3bf101e069ddc1c65c7f6bfb..5025e1eb7be566c21b6228038fd6596f4ac53e9a 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1008,15 +1008,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1033,15 +1033,16 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
}
|
||||
|
||||
if (lookingEntity != null) {
|
||||
|
||||
@@ -375,7 +375,7 @@ index 6ee39b534b8d992655bc0cef3c299d12cbae0034..f59879ae7d3c73cd4c4233d30667988b
|
||||
.completer(new ConsoleCommandCompleter(this.server))
|
||||
.option(LineReader.Option.COMPLETE_IN_WORD, true);
|
||||
diff --git a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
|
||||
index 790bad0494454ca12ee152e3de6da3da634d9b20..5b844d2fea387f2cb655169f458ec0ca627f1c65 100644
|
||||
index 74ffdc823e66fc5ec027c4b7c462382bcbfe2be2..f5302d038e4bb731075dccde4015627dc9e7b420 100644
|
||||
--- a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
|
||||
+++ b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
|
||||
@@ -31,6 +31,10 @@ public record ServerBuildInfoImpl(
|
||||
@@ -398,8 +398,8 @@ index 790bad0494454ca12ee152e3de6da3da634d9b20..5b844d2fea387f2cb655169f458ec0ca
|
||||
getManifestAttribute(manifest, ATTRIBUTE_BRAND_NAME)
|
||||
- .orElse(BRAND_PAPER_NAME),
|
||||
+ .orElse(BRAND_LEAF_NAME), // Gale - branding changes // Leaf - Rebrand
|
||||
SharedConstants.getCurrentVersion().getId(),
|
||||
SharedConstants.getCurrentVersion().getName(),
|
||||
SharedConstants.getCurrentVersion().id(),
|
||||
SharedConstants.getCurrentVersion().name(),
|
||||
getManifestAttribute(manifest, ATTRIBUTE_BUILD_NUMBER)
|
||||
@@ -61,7 +65,11 @@ public record ServerBuildInfoImpl(
|
||||
|
||||
@@ -441,10 +441,10 @@ index 1354ccfbf525e5e64483ac5f443cc2325ba63850..f6f787db016f4d1ac14648ebf2b8e162
|
||||
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index a287ad5cce532229f2a514956d34a9358175bc45..05823a2865565446a100e161ca3a44c972868ea7 100644
|
||||
index ff65904cf067900cd1635b6dab0b01b0fe6ef655..15a88601aaa07ce59b7096bdfc96aa517af5107f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -485,7 +485,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -491,7 +491,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
|
||||
@Override
|
||||
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
||||
|
||||
@@ -3,14 +3,14 @@ set -e
|
||||
|
||||
IS_EOL=false
|
||||
IS_UNSUPPORTED=false
|
||||
IS_DEV=false
|
||||
IS_DEV=true
|
||||
|
||||
JAR_NAME="leaf-1.21.5"
|
||||
CURRENT_TAG="ver-1.21.5"
|
||||
JAR_NAME="leaf-1.21.6"
|
||||
CURRENT_TAG="ver-1.21.6"
|
||||
RELEASE_NOTES="release_notes.md"
|
||||
|
||||
# Rename Leaf jar
|
||||
mv ./leaf-server/build/libs/leaf-paperclip-1.21.5-R0.1-SNAPSHOT-mojmap.jar ./$JAR_NAME-${BUILD_NUMBER}.jar
|
||||
mv ./leaf-server/build/libs/leaf-paperclip-1.21.6-R0.1-SNAPSHOT-mojmap.jar ./$JAR_NAME-${BUILD_NUMBER}.jar
|
||||
|
||||
# Branch name
|
||||
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
|
||||
Reference in New Issue
Block a user