update upstream (and fix a few bugs)

This commit is contained in:
Blast-MC
2025-02-15 01:22:45 -05:00
parent 30cfeef7c6
commit e224056a29
22 changed files with 124 additions and 103 deletions

View File

@@ -1,28 +1,50 @@
name: Patch and Build name: Build main
on: on: [push]
push:
branches: [ "**" ]
pull_request:
jobs: jobs:
build: build:
# Only run on PRs if the source branch is on someone else's repo
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
java: [21]
fail-fast: true
steps: steps:
- name: Checkout Git Repository - uses: actions/checkout@v4
uses: actions/checkout@v4
- name: Set up JDK - name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4 uses: actions/setup-java@v3
with: with:
distribution: 'temurin' java-version: ${{ matrix.java }}
java-version: '21' distribution: 'adopt'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4 - name: Cache gradle
- name: Configure Git User Details uses: actions/cache@v3
run: git config --global user.email "actions@github.com" && git config --global user.name "Github Actions" with:
- name: Apply Patches path: |
run: ./gradlew applyAllPatches --stacktrace ~/.gradle/caches
- name: Build ~/.gradle/jdks
run: ./gradlew build ~/.gradle/native
~/.gradle/wrapper
key: ${{ runner.os }}-parchment-2-${{ hashFiles('**/*.gradle*', 'gradle/**', 'gradle.properties') }}
restore-keys: ${{ runner.os }}-parchment-2
- name: Patch Parchment
env:
ORG_GRADLE_PROJECT_edenSnapshotsUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_edenSnapshotsPassword: ${{ secrets.SONATYPE_PASSWORD }}
run: |
git config --global user.email "no-reply@github.com"
git config --global user.name "GitHub Actions"
./gradlew applyAllPatches
./gradlew createMojmapPaperclipJar
./gradlew :parchment-api:publishMavenPublicationToEdenSnapshotsRepository
./gradlew publishDevBundlePublicationToEdenSnapshotsRepository -PpublishDevBundle
- uses: actions/upload-artifact@v3
with:
name: Parchment-JDK${{ matrix.java }}
path: parchment-server/build/libs/parchment-paperclip-*-mojmap.jar

View File

@@ -3,8 +3,11 @@ Things I've found while just trying to get this to work:
- If you've made an update to either of the build.gradle.kts files in api or server, run `./gradlew rebuildPaperSingleFilePatches` after adding to git (no commit) - If you've made an update to either of the build.gradle.kts files in api or server, run `./gradlew rebuildPaperSingleFilePatches` after adding to git (no commit)
- To create a file patch: - To create a file patch:
- Make the changes you need and have no other staged changes - Make the changes you need and have no other staged changes
- cd paper-api or paper-server - cd **paper-api** or **paper-server** or **parchment-server/src/minecraft/java**
- git add . - git add .
- git commit --ammend - git commit --amend
- This ammends it to the specific 'File Patch Commit' - This ammends it to the specific 'File Patch Commit'
- ./gradlew rebuildPaper<Api/Server>FilePatches - Then run one of the following
- ./gradlew rebuildPaperApiFilePatches
- ./gradlew rebuildPaperServerFilePatches
- ./gradlew rebuildMinecraftFilePatches

View File

@@ -3,7 +3,7 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins { plugins {
java // TODO java launcher tasks java // TODO java launcher tasks
id("io.papermc.paperweight.patcher") version "2.0.0-beta.13" id("io.papermc.paperweight.patcher") version "2.0.0-beta.14"
} }
paperweight { paperweight {
@@ -26,11 +26,6 @@ paperweight {
patchesDir = file("parchment-api/paper-patches") patchesDir = file("parchment-api/paper-patches")
outputDir = file("paper-api") outputDir = file("paper-api")
} }
patchDir("paperApiGenerator") {
upstreamPath = "paper-api-generator"
patchesDir = file("parchment-api-generator/paper-patches")
outputDir = file("paper-api-generator")
}
} }
} }

View File

@@ -1,7 +1,7 @@
group=gg.projecteden.parchment group=gg.projecteden.parchment
version=1.21.4-R0.1-SNAPSHOT version=1.21.4-R0.1-SNAPSHOT
mcVersion=1.21.4 mcVersion=1.21.4
paperRef=b03d39b5ce6b5046ce6854ddba74e8ae3641c230 paperRef=6cfa2f7f315cbad23d7b12984b751f2721b496b6
org.gradle.configuration-cache=true org.gradle.configuration-cache=true
org.gradle.caching=true org.gradle.caching=true

View File

@@ -17,6 +17,15 @@
// api dependencies are listed transitively to API consumers // api dependencies are listed transitively to API consumers
api("com.google.guava:guava:33.3.1-jre") api("com.google.guava:guava:33.3.1-jre")
@@ -93,7 +_,7 @@
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
-val generatedApiPath: java.nio.file.Path = layout.projectDirectory.dir("src/generated/java").asFile.toPath()
+val generatedApiPath: java.nio.file.Path = rootProject.layout.projectDirectory.dir("paper-api/src/generated/java").asFile.toPath()
idea {
module {
generatedSourceDirs.add(generatedApiPath.toFile())
@@ -103,6 +_,18 @@ @@ -103,6 +_,18 @@
main { main {
java { java {

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/Location.java --- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java +++ b/src/main/java/org/bukkit/Location.java
@@ -27,13 +_,20 @@ @@ -28,13 +_,20 @@
* magnitude than 360 are valid, but may be normalized to any other equivalent * magnitude than 360 are valid, but may be normalized to any other equivalent
* representation by the implementation. * representation by the implementation.
*/ */

View File

@@ -1,9 +1,9 @@
--- a/src/main/java/org/bukkit/OfflinePlayer.java --- a/src/main/java/org/bukkit/OfflinePlayer.java
+++ b/src/main/java/org/bukkit/OfflinePlayer.java +++ b/src/main/java/org/bukkit/OfflinePlayer.java
@@ -19,7 +_,14 @@ @@ -20,7 +_,14 @@
* player that is stored on the disk and can, thus, be retrieved without the
* player needing to be online. * player needing to be online.
*/ */
@NullMarked
-public interface OfflinePlayer extends ServerOperator, AnimalTamer, ConfigurationSerializable, io.papermc.paper.persistence.PersistentDataViewHolder { // Paper - Add Offline PDC API -public interface OfflinePlayer extends ServerOperator, AnimalTamer, ConfigurationSerializable, io.papermc.paper.persistence.PersistentDataViewHolder { // Paper - Add Offline PDC API
+public interface OfflinePlayer extends ServerOperator, AnimalTamer, ConfigurationSerializable, io.papermc.paper.persistence.PersistentDataViewHolder, gg.projecteden.parchment.HasOfflinePlayer, gg.projecteden.parchment.OptionalPlayer { // Parchment +public interface OfflinePlayer extends ServerOperator, AnimalTamer, ConfigurationSerializable, io.papermc.paper.persistence.PersistentDataViewHolder, gg.projecteden.parchment.HasOfflinePlayer, gg.projecteden.parchment.OptionalPlayer { // Parchment
+ +

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -52,6 +_,36 @@ @@ -53,6 +_,36 @@
*/ */
public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient, Metadatable, PersistentDataHolder, Keyed, net.kyori.adventure.audience.ForwardingAudience { // Paper public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient, Metadatable, PersistentDataHolder, Keyed, net.kyori.adventure.audience.ForwardingAudience { // Paper

View File

@@ -9,7 +9,7 @@
/** /**
* Gets the metadata for this block * Gets the metadata for this block
@@ -593,6 +_,20 @@ @@ -590,6 +_,20 @@
* @return true if the block was destroyed * @return true if the block was destroyed
*/ */
boolean breakNaturally(@NotNull ItemStack tool, boolean triggerEffect, boolean dropExperience); boolean breakNaturally(@NotNull ItemStack tool, boolean triggerEffect, boolean dropExperience);

View File

@@ -1,15 +1,15 @@
--- a/src/main/java/org/bukkit/entity/HumanEntity.java --- a/src/main/java/org/bukkit/entity/HumanEntity.java
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java
@@ -23,7 +_,14 @@ @@ -25,7 +_,14 @@
/**
* Represents a human entity, such as an NPC or a player * Represents a human entity, such as an NPC or a player
*/ */
@NullMarked
-public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder { -public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder {
+public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder, gg.projecteden.parchment.HasHumanEntity { // Parchment +public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder, gg.projecteden.parchment.HasHumanEntity { // Parchment
+ +
+ // Parchment start + // Parchment start
+ @Override + @Override
+ default @NotNull HumanEntity getPlayer() { + default HumanEntity getPlayer() {
+ return this; + return this;
+ } + }
+ // Parchment end + // Parchment end

View File

@@ -1,11 +1,11 @@
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -59,7 +_,17 @@ @@ -62,7 +_,17 @@
/**
* Represents a player, connected or not * Represents a player, connected or not
*/ */
@NullMarked
-public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, net.kyori.adventure.identity.Identified, net.kyori.adventure.bossbar.BossBarViewer, com.destroystokyo.paper.network.NetworkClient { // Paper -public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, net.kyori.adventure.identity.Identified, net.kyori.adventure.bossbar.BossBarViewer, com.destroystokyo.paper.network.NetworkClient { // Paper
+public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, net.kyori.adventure.identity.Identified, net.kyori.adventure.bossbar.BossBarViewer, com.destroystokyo.paper.network.NetworkClient , gg.projecteden.parchment.HasPlayer { // Paper // Parchment +public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, net.kyori.adventure.identity.Identified, net.kyori.adventure.bossbar.BossBarViewer, com.destroystokyo.paper.network.NetworkClient, gg.projecteden.parchment.HasPlayer { // Paper // Parchment
+ +
+ // Parchment start + // Parchment start
+ /** + /**
@@ -14,14 +14,14 @@
+ * @return this player + * @return this player
+ */ + */
+ @Override + @Override
+ @NotNull Player getPlayer(); + Player getPlayer();
+ // Parchment end + // Parchment end
// Paper start // Paper start
@Override @Override
@@ -2128,6 +_,17 @@ @@ -2084,6 +_,16 @@
*/ */
public boolean canSee(@NotNull Entity entity); public boolean canSee(Player player);
+ // Parchment start + // Parchment start
+ /** + /**
@@ -30,17 +30,16 @@
+ * @param plugin Plugin that has hidden entities + * @param plugin Plugin that has hidden entities
+ * @return a view of hidden entity UUIDs + * @return a view of hidden entity UUIDs
+ */ + */
+ public java.util.@NotNull Set<java.util.UUID> getHiddenEntities(@NotNull Plugin plugin); + public java.util.Set<java.util.UUID> getHiddenEntities(Plugin plugin);
+ // Parchment end + // Parchment end
+ +
+
// Paper start
/** /**
* Returns whether the {@code other} player is listed for {@code this}. * Visually hides an entity from this player.
@@ -3892,4 +_,45 @@ *
@@ -3902,4 +_,43 @@
* @return the result of this method, holding leftovers and spawned items.
*/ */
void sendEntityEffect(org.bukkit.@NotNull EntityEffect effect, @NotNull Entity target); PlayerGiveResult give(Collection<ItemStack> items, boolean dropIfFull);
// Paper end - entity effect API
+ +
+ /** + /**
+ * Checks if the player will spawn phantoms at night + * Checks if the player will spawn phantoms at night
@@ -80,6 +79,4 @@
+ * @return ticks since the player last slept + * @return ticks since the player last slept
+ */ + */
+ int getTimeSinceLastRest(); + int getTimeSinceLastRest();
+// Parchment end
+
} }

View File

@@ -1,9 +1,10 @@
--- a/paper-server/build.gradle.kts --- a/paper-server/build.gradle.kts
+++ b/paper-server/build.gradle.kts +++ b/paper-server/build.gradle.kts
@@ -21,8 +_,19 @@ @@ -37,6 +_,21 @@
// macheOldPath = file("F:\\Projects\\PaperTooling\\mache\\versions\\1.21.4\\src\\main\\java") "org.bukkit.craftbukkit",
// gitFilePatches = true "org.spigotmc",
)
+
+ val fork = forks.register("parchment") { + val fork = forks.register("parchment") {
+ upstream.patchDir("paperServer") { + upstream.patchDir("paperServer") {
+ upstreamPath = "paper-server" + upstreamPath = "paper-server"
@@ -15,13 +16,13 @@
+ +
+ activeFork = fork + activeFork = fork
+ +
paper { + paper {
- reobfMappingsPatch = layout.projectDirectory.file("../build-data/reobf-mappings-patch.tiny")
+ paperServerDir = upstreamsDirectory().map { it.dir("paper/paper-server") } + paperServerDir = upstreamsDirectory().map { it.dir("paper/paper-server") }
} + }
}
spigot { tasks.generateDevelopmentBundle {
@@ -105,7 +_,20 @@ @@ -101,7 +_,20 @@
} }
} }
@@ -43,16 +44,16 @@
configurations.named(log4jPlugins.compileClasspathConfigurationName) { configurations.named(log4jPlugins.compileClasspathConfigurationName) {
extendsFrom(configurations.compileClasspath.get()) extendsFrom(configurations.compileClasspath.get())
} }
@@ -123,7 +_,7 @@ @@ -119,7 +_,7 @@
} }
dependencies { dependencies {
- implementation(project(":paper-api")) - implementation(project(":paper-api"))
+ implementation(project(":parchment-api")) + implementation(project(":parchment-api"))
implementation("ca.spottedleaf:concurrentutil:0.0.2") implementation("ca.spottedleaf:concurrentutil:0.0.3")
implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+ implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
implementation("org.jline:jline-terminal-jni:3.27.1") // fall back to jni on java 21 implementation("org.jline:jline-terminal-jni:3.27.1") // fall back to jni on java 21
@@ -192,14 +_,14 @@ @@ -188,14 +_,14 @@
val gitBranch = git.exec(providers, "rev-parse", "--abbrev-ref", "HEAD").get().trim() val gitBranch = git.exec(providers, "rev-parse", "--abbrev-ref", "HEAD").get().trim()
attributes( attributes(
"Main-Class" to "org.bukkit.craftbukkit.Main", "Main-Class" to "org.bukkit.craftbukkit.Main",

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -778,9 +_,12 @@ @@ -785,9 +_,12 @@
public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) { public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) {
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); // Paper - AsyncTabCompleteEvent; run this async // PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); // Paper - AsyncTabCompleteEvent; run this async
// CraftBukkit start // CraftBukkit start
@@ -16,7 +16,7 @@
} }
// CraftBukkit end // CraftBukkit end
// Paper start - Don't suggest if tab-complete is disabled // Paper start - Don't suggest if tab-complete is disabled
@@ -2490,6 +_,7 @@ @@ -2497,6 +_,7 @@
// Spigot start - spam exclusions // Spigot start - spam exclusions
private void detectRateSpam(String message) { private void detectRateSpam(String message) {
@@ -24,7 +24,7 @@
// CraftBukkit start - replaced with thread safe throttle // CraftBukkit start - replaced with thread safe throttle
for (String exclude : org.spigotmc.SpigotConfig.spamExclusions) { for (String exclude : org.spigotmc.SpigotConfig.spamExclusions) {
if (exclude != null && message.startsWith(exclude)) { if (exclude != null && message.startsWith(exclude)) {
@@ -3245,9 +_,11 @@ @@ -3280,9 +_,11 @@
public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) { public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) {
// Paper start - auto recipe limit // Paper start - auto recipe limit
if (!org.bukkit.Bukkit.isPrimaryThread()) { if (!org.bukkit.Bukkit.isPrimaryThread()) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -5081,4 +_,31 @@ @@ -5077,4 +_,31 @@
return ((ServerLevel) this.level).isPositionEntityTicking(this.blockPosition()); return ((ServerLevel) this.level).isPositionEntityTicking(this.blockPosition());
} }
// Paper end - Expose entity id counter // Paper end - Expose entity id counter

View File

@@ -36,7 +36,7 @@
} }
} }
// Paper end - send while respecting visibility // Paper end - send while respecting visibility
@@ -2432,4 +_,11 @@ @@ -2440,4 +_,11 @@
return this.message; return this.message;
} }
} }

View File

@@ -16,29 +16,27 @@
this.hasImpulse = true; this.hasImpulse = true;
double d = movementToShoot.horizontalDistance(); double d = movementToShoot.horizontalDistance();
this.setYRot((float)(Mth.atan2(movementToShoot.x, movementToShoot.z) * 180.0F / (float)Math.PI)); this.setYRot((float)(Mth.atan2(movementToShoot.x, movementToShoot.z) * 180.0F / (float)Math.PI));
@@ -193,14 +_,19 @@ @@ -193,6 +_,10 @@
} }
public void shootFromRotation(Entity shooter, float x, float y, float z, float velocity, float inaccuracy) { public void shootFromRotation(Entity shooter, float x, float y, float z, float velocity, float inaccuracy) {
+ // Parchment start + this.shootFromRotation(shooter, x, y, z, velocity, inaccuracy, true);
+ shootFromRotation(shooter, x, y, z, velocity, inaccuracy, true);
+ } + }
+ +
+ public void shootFromRotation(Entity shooter, float x, float y, float z, float velocity, float inaccuracy, boolean relative) { + public void shootFromRotation(Entity shooter, float x, float y, float z, float velocity, float inaccuracy, boolean relative) {
float f = -Mth.sin(y * (float) (Math.PI / 180.0)) * Mth.cos(x * (float) (Math.PI / 180.0)); float f = -Mth.sin(y * (float) (Math.PI / 180.0)) * Mth.cos(x * (float) (Math.PI / 180.0));
float f1 = -Mth.sin((x + z) * (float) (Math.PI / 180.0)); float f1 = -Mth.sin((x + z) * (float) (Math.PI / 180.0));
float f2 = Mth.cos(y * (float) (Math.PI / 180.0)) * Mth.cos(x * (float) (Math.PI / 180.0)); float f2 = Mth.cos(y * (float) (Math.PI / 180.0)) * Mth.cos(x * (float) (Math.PI / 180.0));
this.shoot(f, f1, f2, velocity, inaccuracy); @@ -202,7 +_,7 @@
Vec3 knownMovement = shooter.getKnownMovement(); if (Double.isNaN(knownMovement.x) || Double.isNaN(knownMovement.y) || Double.isNaN(knownMovement.z)) {
// Paper start - allow disabling relative velocity knownMovement = new Vec3(0, 0, 0);
}
- if (!shooter.level().paperConfig().misc.disableRelativeProjectileVelocity) { - if (!shooter.level().paperConfig().misc.disableRelativeProjectileVelocity) {
- this.setDeltaMovement(this.getDeltaMovement().add(knownMovement.x, shooter.onGround() ? 0.0 : knownMovement.y, knownMovement.z));
+ if (!shooter.level().paperConfig().misc.disableRelativeProjectileVelocity && relative) { + if (!shooter.level().paperConfig().misc.disableRelativeProjectileVelocity && relative) {
+ this.setDeltaMovement(this.getDeltaMovement().add(knownMovement.x, shooter.onGround() ? 0.0 : knownMovement.y, knownMovement.z)); this.setDeltaMovement(this.getDeltaMovement().add(knownMovement.x, shooter.onGround() ? 0.0 : knownMovement.y, knownMovement.z));
} }
// Paper end - allow disabling relative velocity // Paper end - allow disabling relative velocity
} @@ -235,7 +_,11 @@
@@ -232,7 +_,11 @@
float velocity, float velocity,
float inaccuracy float inaccuracy
) { ) {
@@ -51,7 +49,7 @@
} }
public static <T extends Projectile> T spawnProjectileUsingShoot( public static <T extends Projectile> T spawnProjectileUsingShoot(
@@ -241,9 +_,19 @@ @@ -244,9 +_,19 @@
// Paper start - fixes and addition to spawn reason API // Paper start - fixes and addition to spawn reason API
return spawnProjectileUsingShootDelayed(projectile, level, spawnedFrom, x, y, z, velocity, inaccuracy).spawn(); return spawnProjectileUsingShootDelayed(projectile, level, spawnedFrom, x, y, z, velocity, inaccuracy).spawn();
} }

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/Block.java --- a/net/minecraft/world/level/block/Block.java
+++ b/net/minecraft/world/level/block/Block.java +++ b/net/minecraft/world/level/block/Block.java
@@ -308,30 +_,46 @@ @@ -308,30 +_,45 @@
} }
// Paper end - Add BlockBreakBlockEvent // Paper end - Add BlockBreakBlockEvent
@@ -43,7 +43,6 @@
- getDrops(state, (ServerLevel)level, pos, blockEntity, entity, tool).forEach(itemStack -> popResource(level, pos, itemStack)); - getDrops(state, (ServerLevel)level, pos, blockEntity, entity, tool).forEach(itemStack -> popResource(level, pos, itemStack));
+ List<ItemEntity> itemEntities = new java.util.ArrayList<>(); + List<ItemEntity> itemEntities = new java.util.ArrayList<>();
+ org.bukkit.craftbukkit.event.CraftEventFactory.callBlockDropResourcesEvent(level, pos, Block.getDrops(state, (ServerLevel) level, pos, blockEntity, entity, tool)).forEach((itemstack1) -> { // Parchment + org.bukkit.craftbukkit.event.CraftEventFactory.callBlockDropResourcesEvent(level, pos, Block.getDrops(state, (ServerLevel) level, pos, blockEntity, entity, tool)).forEach((itemstack1) -> { // Parchment
+ Block.popResource(level, pos, itemstack1);
+ itemEntities.add(Block.popResourceWithReturn(level, pos, itemstack1)); + itemEntities.add(Block.popResourceWithReturn(level, pos, itemstack1));
+ }); + });
state.spawnAfterBreak((ServerLevel) level, pos, tool, dropExperience); // Paper - Properly handle xp dropping state.spawnAfterBreak((ServerLevel) level, pos, tool, dropExperience); // Paper - Properly handle xp dropping

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2472,4 +_,16 @@ @@ -2498,4 +_,16 @@
return this.adventure$pointers; return this.adventure$pointers;
} }
// Paper end // Paper end

View File

@@ -1,11 +1,13 @@
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -267,7 +_,7 @@ @@ -266,8 +_,8 @@
deadline.add(Calendar.DAY_OF_YEAR, -14);
if (buildDate.before(deadline.getTime())) { if (buildDate.before(deadline.getTime())) {
// Paper start - This is some stupid bullshit // Paper start - This is some stupid bullshit
System.err.println("*** Warning, you've not updated in a while! ***"); - System.err.println("*** Warning, you've not updated in a while! ***");
- System.err.println("*** Please download a new build as per instructions from https://papermc.io/downloads/paper ***"); // Paper - System.err.println("*** Please download a new build from https://papermc.io/downloads/paper ***"); // Paper
+ System.err.println("*** Please download a new build as per instructions from https://github.com/ProjectEdenGG/Parchment ***"); // Paper + // System.err.println("*** Warning, you've not updated in a while! ***");
+ // System.err.println("*** Please download a new build from https://papermc.io/downloads/paper ***"); // Paper
//System.err.println("*** Server will start in 20 seconds ***"); //System.err.println("*** Server will start in 20 seconds ***");
//Thread.sleep(TimeUnit.SECONDS.toMillis(20)); //Thread.sleep(TimeUnit.SECONDS.toMillis(20));
// Paper end // Paper end

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -219,6 +_,7 @@ @@ -226,6 +_,7 @@
public org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; // Paper - more resource pack API public org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; // Paper - more resource pack API
private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit
private long lastSaveTime; // Paper - getLastPlayed replacement API private long lastSaveTime; // Paper - getLastPlayed replacement API
@@ -8,10 +8,10 @@
public CraftPlayer(CraftServer server, ServerPlayer entity) { public CraftPlayer(CraftServer server, ServerPlayer entity) {
super(server, entity); super(server, entity);
@@ -3541,4 +_,41 @@ @@ -3583,4 +_,39 @@
this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundEntityEventPacket(((CraftEntity) target).getHandle(), effect.getData())); handle.containerMenu.broadcastChanges();
return new PaperPlayerGiveResult(leftovers.build(), drops.build());
} }
// Paper end - entity effect API
+ +
+ // Parchment start + // Parchment start
+ @Override + @Override
@@ -46,7 +46,5 @@
+ public int getTimeSinceLastRest() { + public int getTimeSinceLastRest() {
+ return net.minecraft.util.Mth.clamp(this.getHandle().getStats().getValue(net.minecraft.stats.Stats.CUSTOM.get(net.minecraft.stats.Stats.TIME_SINCE_REST)), 1, Integer.MAX_VALUE); + return net.minecraft.util.Mth.clamp(this.getHandle().getStats().getValue(net.minecraft.stats.Stats.CUSTOM.get(net.minecraft.stats.Stats.TIME_SINCE_REST)), 1, Integer.MAX_VALUE);
+ } + }
+
+ // Parchment end
+ +
} }

View File

@@ -9,7 +9,7 @@
return CraftEventFactory.callEntityDamageEvent(event, damagee, cancelled); return CraftEventFactory.callEntityDamageEvent(event, damagee, cancelled);
} }
@@ -2271,4 +_,57 @@ @@ -2272,4 +_,57 @@
return event; return event;
} }
// Paper end - add EntityFertilizeEggEvent // Paper end - add EntityFertilizeEggEvent

View File

@@ -1,3 +0,0 @@
--- a/src/main/resources/data/.paperassetsroot
+++ b/src/main/resources/data/.paperassetsroot
@@ -1,0 +_,0 @@