3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00

Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9018)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
2c64d8c4 SPIGOT-7309: Add API for jukebox inventories
a6d7e4ca PR-826: Add Sniffer API

CraftBukkit Changes:
93813509b SPIGOT-7309: Add API for jukebox inventories
2d5209e8d PR-1153: Handle teleport reason in spreadplayers command
f5b61387e SPIGOT-7308: Fix NullPointerException when calling Jukebox#setRecord()
388d458a6 SPIGOT-7306: Fix reset of coords in default teleportTo in EntityPlayer
40b87e1af PR-1150: Add Sniffer API and handle EntityItemDropEvent

Spigot Changes:
6ad4b93c SPIGOT-7298: Fix debug stick always permission left click toggle
Dieser Commit ist enthalten in:
Jake Potrebic 2023-03-24 13:38:40 -07:00 committet von GitHub
Ursprung a0f548f5ec
Commit 38be4f873b
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
47 geänderte Dateien mit 90 neuen und 190 gelöschten Zeilen

Datei anzeigen

@ -2775,10 +2775,10 @@ index 3c2ea8fec3a748cab7f5ad9100d12bd8213ec6c9..a803bfea5400b3578bb4cf3261874e87
* Gets how much EXP the Player should have at respawn.
* <p>
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
index 4fb754cd7fd9b668029e2311cfaad774bb47cf80..99a45a698882acd47c725183a1f199eb1643f6e8 100644
index 629c1bf79ca3577c51d17ef8c9d36f84b1a2c360..2186507089384cb9805057c7cc1795fba7de1df3 100644
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
@@ -151,6 +151,18 @@ public enum InventoryType {
@@ -155,6 +155,18 @@ public enum InventoryType {
private final String title;
private final boolean isCreatable;
@ -2797,7 +2797,7 @@ index 4fb754cd7fd9b668029e2311cfaad774bb47cf80..99a45a698882acd47c725183a1f199eb
private InventoryType(int defaultSize, /*@NotNull*/ String defaultTitle) {
this(defaultSize, defaultTitle, true);
}
@@ -159,6 +171,7 @@ public enum InventoryType {
@@ -163,6 +175,7 @@ public enum InventoryType {
size = defaultSize;
title = defaultTitle;
this.isCreatable = isCreatable;
@ -2805,7 +2805,7 @@ index 4fb754cd7fd9b668029e2311cfaad774bb47cf80..99a45a698882acd47c725183a1f199eb
}
public int getDefaultSize() {
@@ -166,6 +179,7 @@ public enum InventoryType {
@@ -170,6 +183,7 @@ public enum InventoryType {
}
@NotNull

Datei anzeigen

@ -562,7 +562,7 @@ index 93244e6d940891f1297d4a26a80ba155af306071..caa34db68bdbbc8dceefb4385f4585ac
/**
* Uses {@link BlockData} as DataType
diff --git a/src/main/java/org/bukkit/Sound.java b/src/main/java/org/bukkit/Sound.java
index fad12a883046010274c8b44426096bfe4703bcc3..5537a0a86b8d360ad540e1dff3b872098fe2ad6b 100644
index 5035c525ab40ebdde3da7fe85f5bdf6a26f6cfc0..aeaa8406fd97154a7afe66a4d08a3f598dfb83a4 100644
--- a/src/main/java/org/bukkit/Sound.java
+++ b/src/main/java/org/bukkit/Sound.java
@@ -76,25 +76,45 @@ public enum Sound implements Keyed, net.kyori.adventure.sound.Sound.Type { // Pa
@ -1166,17 +1166,18 @@ index 9f935266f51f4ea5d1193031f52e5327350cc06f..ee3a3bda9a5b9cf3bcabf80ee3c653a2
TEXT_DISPLAY("text_display", TextDisplay.class, -1),
/**
diff --git a/src/main/java/org/bukkit/entity/Sniffer.java b/src/main/java/org/bukkit/entity/Sniffer.java
index dc640c44660acef8f2d17283426052fe7e9e8ae2..50c953619dc8139f064ba139e75a397325ae8cd4 100644
index 6509d1ca35ff1cb7a2b31871c642d730b2816f6f..67982a8b2258c476eac76e7dc64bc7f143f63df9 100644
--- a/src/main/java/org/bukkit/entity/Sniffer.java
+++ b/src/main/java/org/bukkit/entity/Sniffer.java
@@ -3,6 +3,7 @@ package org.bukkit.entity;
/**
* Represents a Sniffer.
@@ -12,7 +12,7 @@ import org.jetbrains.annotations.Nullable;
* <b>Note: This entity is part of an experimental feature of Minecraft and
* hence subject to change.</b>
*/
+@org.jetbrains.annotations.ApiStatus.Experimental // Paper - 1.20
-@ApiStatus.Experimental
+@ApiStatus.Experimental // Paper - 1.20
public interface Sniffer extends Animals {
}
/**
diff --git a/src/main/java/org/bukkit/entity/memory/MemoryKey.java b/src/main/java/org/bukkit/entity/memory/MemoryKey.java
index 8f601e85df580ef8106eaff8b9eafb5691a4874b..99ca502a14e3f321c323d7675bc47e7ee77d7464 100644
--- a/src/main/java/org/bukkit/entity/memory/MemoryKey.java
@ -1190,17 +1191,18 @@ index 8f601e85df580ef8106eaff8b9eafb5691a4874b..99ca502a14e3f321c323d7675bc47e7e
/**
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
index 65a1cd5837d944db1ade9dbed1caa083f73da53e..90a846e23d2b41e3f658fbf48cd43bd5e72b709f 100644
index 2186507089384cb9805057c7cc1795fba7de1df3..94f127fd6ba69ca48d03acbc9886ee499e9be4f3 100644
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
@@ -137,13 +137,14 @@ public enum InventoryType {
@@ -137,6 +137,7 @@ public enum InventoryType {
/**
* Pseudo chiseled bookshelf inventory, with 6 slots of undefined type.
*/
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - 1.20
CHISELED_BOOKSHELF(6, "Chiseled Bookshelf", false),
/**
* The new smithing inventory, with 3 CRAFTING slots and 1 RESULT slot.
* Pseudo jukebox inventory with 1 slot of undefined type.
@@ -147,7 +148,7 @@ public enum InventoryType {
*
* @deprecated draft, experimental 1.20 API
*/

Datei anzeigen

@ -1,58 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Tue, 14 Mar 2023 18:55:47 -0700
Subject: [PATCH] Fix Jukeboxes
diff --git a/src/main/java/org/bukkit/block/Jukebox.java b/src/main/java/org/bukkit/block/Jukebox.java
index 321e5e034a906129142341cec952fac3c1e7e360..37967acb9ee85f1d1c9b3b2d3472b460f41f7080 100644
--- a/src/main/java/org/bukkit/block/Jukebox.java
+++ b/src/main/java/org/bukkit/block/Jukebox.java
@@ -8,7 +8,7 @@ import org.jetbrains.annotations.Nullable;
/**
* Represents a captured state of a jukebox.
*/
-public interface Jukebox extends TileState {
+public interface Jukebox extends TileState, org.bukkit.inventory.BlockInventoryHolder { // Paper
/**
* Gets the record inserted into the jukebox.
@@ -62,4 +62,20 @@ public interface Jukebox extends TileState {
* @throws IllegalStateException if this block state is not placed
*/
public boolean eject();
+ // Paper start
+ /**
+ * @return inventory
+ * @see Container#getInventory()
+ */
+ @NotNull
+ @Override
+ org.bukkit.inventory.Inventory getInventory();
+
+ /**
+ * @return snapshot inventory
+ * @see Container#getSnapshotInventory()
+ */
+ @NotNull
+ org.bukkit.inventory.Inventory getSnapshotInventory();
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
index 90a846e23d2b41e3f658fbf48cd43bd5e72b709f..35aac79a7c58d00e6b3c6c042b291093c9c7af71 100644
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
@@ -146,6 +146,13 @@ public enum InventoryType {
*/
@Deprecated @org.jetbrains.annotations.ApiStatus.Experimental // Paper - 1.20
SMITHING_NEW(4, "Upgrade Gear"),
+ // Paper start
+ /**
+ * Pseudo jukebox inventory
+ */
+ @org.jetbrains.annotations.ApiStatus.Experimental
+ JUKEBOX(1, "Jukebox", false);
+ // Paper end
;
private final int size;

Datei anzeigen

@ -6528,7 +6528,7 @@ index 3bcbdf37ad9d76ec97ad3f20e7a683e267441ed9..aa164a81d072d9390fa1400120e80197
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
// IRegistryCustom.Dimension iregistrycustom_dimension = minecraftserver.registryAccess(); // CraftBukkit - decompile error
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 16ad728a5fd201875c56b27dcedeb19e06d2ea7a..7efd4be91e6ff0abf087bf4d322fd6ac694b7010 100644
index 22bd8ceaaa7f273857867e975cb96d4d79e71c17..ab82ed88baae257f87ec6bc285850b81daa3e27d 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -252,6 +252,8 @@ public class ServerPlayer extends Player {
@ -6623,7 +6623,7 @@ index 337e0a7b3c14e1b1a28744920e0dc0a69e0c5a87..f5829ae484d93b547a5437b85a962134
@Override
public void tell(R runnable) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 78ab0d82e3b425ae561e838d7827ed0ae14fa1d2..35125c029abbdab4c7043842b6042ea44b00a2c3 100644
index 926c319fc4b629cf16cc973c2e26830630dd93ab..4cd1cfbf91ea232756de16120eec4339d8144885 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -318,6 +318,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {

Datei anzeigen

@ -2188,7 +2188,7 @@ index 5725631835ea68802c75934cd85d5c1b1a78d358..0b859ebcc2c53e74615feca5c8641365
}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 7efd4be91e6ff0abf087bf4d322fd6ac694b7010..531d0b0dcd499adf0d973bf336272aa1966069f3 100644
index ab82ed88baae257f87ec6bc285850b81daa3e27d..01fbd70356795a5a1519eca137e8f6095a07ab30 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -161,6 +161,7 @@ import net.minecraft.world.scores.Score;

Datei anzeigen

@ -16069,7 +16069,7 @@ index 12e72ad737b1219fcdf88d344d41621d9fd5feec..e0bfeebeaac1aaea64bc07cdfdf7790e
if (flag1) {
++this.converted;
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index f215204e1dd6fb3b805a60a268dae10f786b5171..969fbf3959733200b1dfb98a8520465e358018c5 100644
index 9171dfb7443d42a5f6d854b2abea55d2671c1177..8a9700d8bbfe2f813259543ed4167495d13e1b4f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -322,6 +322,58 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@ -16145,7 +16145,7 @@ index f215204e1dd6fb3b805a60a268dae10f786b5171..969fbf3959733200b1dfb98a8520465e
return false;
}
@@ -3436,6 +3488,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3442,6 +3494,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
};
}
@ -16162,7 +16162,7 @@ index f215204e1dd6fb3b805a60a268dae10f786b5171..969fbf3959733200b1dfb98a8520465e
public boolean hasExactlyOnePlayerPassenger() {
return this.getIndirectPassengersStream().filter((entity) -> {
return entity instanceof Player;
@@ -3763,6 +3825,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3769,6 +3831,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
public final void setPosRaw(double x, double y, double z) {
@ -16175,7 +16175,7 @@ index f215204e1dd6fb3b805a60a268dae10f786b5171..969fbf3959733200b1dfb98a8520465e
if (this.position.x != x || this.position.y != y || this.position.z != z) {
this.position = new Vec3(x, y, z);
int i = Mth.floor(x);
@@ -3870,6 +3938,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3876,6 +3944,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@Override
public final void setRemoved(Entity.RemovalReason reason) {
@ -16189,7 +16189,7 @@ index f215204e1dd6fb3b805a60a268dae10f786b5171..969fbf3959733200b1dfb98a8520465e
if (this.removalReason == null) {
this.removalReason = reason;
}
@@ -3878,7 +3953,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3884,7 +3959,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.stopRiding();
}
@ -16198,7 +16198,7 @@ index f215204e1dd6fb3b805a60a268dae10f786b5171..969fbf3959733200b1dfb98a8520465e
this.levelCallback.onRemove(reason);
}
@@ -3893,7 +3968,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3899,7 +3974,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@Override
public boolean shouldBeSaved() {

Datei anzeigen

@ -25,7 +25,7 @@ index fb7930009db2c219347e6601ca2cde0c8601e2b4..26cc626ad0c5328c20f7ef20e8e270c9
public void onTrackingEnd(Entity entity) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 969fbf3959733200b1dfb98a8520465e358018c5..3cc8426283f68db0a4cbda6934aa6bfde7663e42 100644
index 8a9700d8bbfe2f813259543ed4167495d13e1b4f..cc46ddc81724ea344d09fa75936fae869e396a02 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -307,7 +307,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {

Datei anzeigen

@ -8,10 +8,10 @@ Adds lots of information about why this orb exists.
Replaces isFromBottle() with logic that persists entity reloads too.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 7f87800a8371c80ef216f4ed0526639f43a20232..2775203a5bb7392428f1305730761e425300a8a9 100644
index 2f21c7920148b812c48da95168fbc63b86b86c9c..fc42bc68ae31f4fad1c382ef3d3c482c1f335f52 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -419,7 +419,7 @@ public class ServerPlayerGameMode {
@@ -427,7 +427,7 @@ public class ServerPlayerGameMode {
// Drop event experience
if (flag && event != null) {

Datei anzeigen

@ -13,7 +13,7 @@ Update adjacent blocks of doors, double plants, pistons and beds
when cancelling interaction.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 2775203a5bb7392428f1305730761e425300a8a9..01a321a0c76c55b32922c94297139e85b3d4ac23 100644
index fc42bc68ae31f4fad1c382ef3d3c482c1f335f52..21401c872035d4dc46a05c066b321d99e0d94b72 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -186,6 +186,11 @@ public class ServerPlayerGameMode {
@ -28,7 +28,7 @@ index 2775203a5bb7392428f1305730761e425300a8a9..01a321a0c76c55b32922c94297139e85
this.player.connection.send(new ClientboundBlockUpdatePacket(this.level, pos));
// Update any tile entity data for this block
BlockEntity tileentity = this.level.getBlockEntity(pos);
@@ -511,7 +516,13 @@ public class ServerPlayerGameMode {
@@ -519,7 +524,13 @@ public class ServerPlayerGameMode {
// send a correcting update to the client for the block above as well, this because of replaceable blocks (such as grass, sea grass etc)
player.connection.send(new ClientboundBlockUpdatePacket(world, blockposition.above()));

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Inventory#removeItemAnySlot
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
index f8cfcecb0fc3377f750f124c8ff45be4c5bf78a1..ea04f0e1e9abf23e152070bd7ec2078e7dac2fe8 100644
index 82bc5e0c8d31e07bd48a729ca937367876be0a37..41c6bb644749b350c2e3552bbd0913b10fcb0abd 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
@@ -224,10 +224,16 @@ public class CraftInventory implements Inventory {
@@ -225,10 +225,16 @@ public class CraftInventory implements Inventory {
}
private int first(ItemStack item, boolean withAmount) {
@ -26,7 +26,7 @@ index f8cfcecb0fc3377f750f124c8ff45be4c5bf78a1..ea04f0e1e9abf23e152070bd7ec2078e
for (int i = 0; i < inventory.length; i++) {
if (inventory[i] == null) continue;
@@ -350,6 +356,17 @@ public class CraftInventory implements Inventory {
@@ -351,6 +357,17 @@ public class CraftInventory implements Inventory {
@Override
public HashMap<Integer, ItemStack> removeItem(ItemStack... items) {
@ -44,7 +44,7 @@ index f8cfcecb0fc3377f750f124c8ff45be4c5bf78a1..ea04f0e1e9abf23e152070bd7ec2078e
Validate.notNull(items, "Items cannot be null");
HashMap<Integer, ItemStack> leftover = new HashMap<Integer, ItemStack>();
@@ -360,7 +377,10 @@ public class CraftInventory implements Inventory {
@@ -361,7 +378,10 @@ public class CraftInventory implements Inventory {
int toDelete = item.getAmount();
while (true) {

Datei anzeigen

@ -19,7 +19,7 @@ public net.minecraft.world.entity.LivingEntity getDeathSound()Lnet/minecraft/sou
public net.minecraft.world.entity.LivingEntity getSoundVolume()F
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index dad0368c8b55be018167bd8b113a80b7508647f1..77a74d41679e88d748d903295ac4f455e1f33b71 100644
index 34e5466211c56f691f0c8bb1ad0e6238fc59dd1b..e39444b842c7faf47830e1cc4034716aa6ee5233 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -240,6 +240,10 @@ public class ServerPlayer extends Player {

Datei anzeigen

@ -192,10 +192,10 @@ index 7d0d2cd4d34d6652eb45aa13442e1081a3a6bd56..191e8233deaa859d969d54242e297e72
// SPIGOT-4598 - we should still delegate the shift click handler
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
index ea04f0e1e9abf23e152070bd7ec2078e7dac2fe8..c3eff9a6734fe2d1809bbeff945c40da816bbddc 100644
index 41c6bb644749b350c2e3552bbd0913b10fcb0abd..8018ad8e5952c714f1bd445c91b4d5c846b9ba7a 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
@@ -491,6 +491,10 @@ public class CraftInventory implements Inventory {
@@ -492,6 +492,10 @@ public class CraftInventory implements Inventory {
return InventoryType.BREWING;
} else if (this.inventory instanceof CraftInventoryCustom.MinecraftInventory) {
return ((CraftInventoryCustom.MinecraftInventory) this.inventory).getType();

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Don't allow digging into unloaded chunks
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 01a321a0c76c55b32922c94297139e85b3d4ac23..514c045883060e4a22f748176091d3b236c2a7fd 100644
index 21401c872035d4dc46a05c066b321d99e0d94b72..618888eac8381b174850e351577601f1d881528d 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -119,8 +119,8 @@ public class ServerPlayerGameMode {
@ -42,7 +42,7 @@ index 01a321a0c76c55b32922c94297139e85b3d4ac23..514c045883060e4a22f748176091d3b2
this.debugLogging(pos, false, sequence, "too far");
} else if (pos.getY() >= worldHeight) {
this.player.connection.send(new ClientboundBlockUpdatePacket(pos, this.level.getBlockState(pos)));
@@ -296,10 +303,12 @@ public class ServerPlayerGameMode {
@@ -304,10 +311,12 @@ public class ServerPlayerGameMode {
this.debugLogging(pos, true, sequence, "stopped destroying");
} else if (action == ServerboundPlayerActionPacket.Action.ABORT_DESTROY_BLOCK) {
this.isDestroyingBlock = false;

Datei anzeigen

@ -112,7 +112,7 @@ index dcdf59d18c0336f766bd320b2d536c115df3435d..5ad746ae673ef09f5581cf9fbbf1c9af
} else {
passenger.stopRiding();
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 80806cd557a481ffbfa9b26e84d1ab1bcba0543f..a0dbb02019d31b890a450d0ffe2197fc095f8362 100644
index b75129ade324835f02a35ae390c15a03139aa6aa..a8b136800e6e233930f152df869e0ba1a9f1282c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -385,6 +385,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {

Datei anzeigen

@ -1140,7 +1140,7 @@ index 5ad746ae673ef09f5581cf9fbbf1c9afa0ff0cd9..5ae321dc30d48f838c49322b5beef89b
this.convertable = convertable_conversionsession;
this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 514c045883060e4a22f748176091d3b236c2a7fd..aee5144bdc5bd9f7b07ce3b72331bcfd42663ec9 100644
index 618888eac8381b174850e351577601f1d881528d..051cbce8394c7a629a7ea8ac422308d96bbad6a6 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -49,7 +49,7 @@ import org.bukkit.event.player.PlayerInteractEvent;
@ -1152,7 +1152,7 @@ index 514c045883060e4a22f748176091d3b236c2a7fd..aee5144bdc5bd9f7b07ce3b72331bcfd
protected final ServerPlayer player;
private GameType gameModeForPlayer;
@Nullable
@@ -318,6 +318,8 @@ public class ServerPlayerGameMode {
@@ -326,6 +326,8 @@ public class ServerPlayerGameMode {
}
}

Datei anzeigen

@ -10,7 +10,7 @@ When not per player it will use the Vanilla mechanic of one delay per
world and the world age for the start day.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index a8f51ab23b46287f6066c421271f4c0fcfe04c3a..2d1c3d222cfced339fb098b09c3c84e0c0805255 100644
index 762afd06eb13f5e4fa8c4085c6013d6056dae083..dc08768928707e5a47e65771262645e675a5093f 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -241,6 +241,7 @@ public class ServerPlayer extends Player {

Datei anzeigen

@ -333,7 +333,7 @@ index 665e088cb0b73f6a0c62f29c56da462bab7c927e..298e4468f7b5346733257f7117f76c66
}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 308df2980f45d25902afd5e696449f6397b186b0..33dd4513fd2a95994460a9d844bcf40b5a4a1fc1 100644
index 3c3df5575208b9b66b59e53346f2d3cf49b7b04c..9627a725079866ebb40ccbb59c50dcfecc343fa6 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -269,6 +269,7 @@ public class ServerPlayer extends Player {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Inventory getHolder method without block snapshot
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
index c3eff9a6734fe2d1809bbeff945c40da816bbddc..513f3311a9009996c27604f2ba7d60c80c7a2060 100644
index 8018ad8e5952c714f1bd445c91b4d5c846b9ba7a..015fc140db9162865f33cd6577cf758091a663c7 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
@@ -537,6 +537,13 @@ public class CraftInventory implements Inventory {
@@ -540,6 +540,13 @@ public class CraftInventory implements Inventory {
return this.inventory.getOwner();
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add permission for command blocks
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index aee5144bdc5bd9f7b07ce3b72331bcfd42663ec9..a98254e38076e82f94db7b2f2112500eaadd52d1 100644
index 051cbce8394c7a629a7ea8ac422308d96bbad6a6..52d71b08c8338254a0e50780363155da4f4c1934 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -396,7 +396,7 @@ public class ServerPlayerGameMode {
@@ -404,7 +404,7 @@ public class ServerPlayerGameMode {
BlockEntity tileentity = this.level.getBlockEntity(pos);
Block block = iblockdata.getBlock();

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Ensure Entity AABB's are never invalid
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 133a544274f4a80071c2a3306f5b0cd47cd6a270..4d62f7f88dfaedfbde598515a1e77716d0ee4a1b 100644
index b95ef3e7c13cee1af59bdb8aa4cc01adb3ae7953..b69615eafcee963862cb3671888dcf8ec5114fe5 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -714,8 +714,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@ -19,7 +19,7 @@ index 133a544274f4a80071c2a3306f5b0cd47cd6a270..4d62f7f88dfaedfbde598515a1e77716
}
protected AABB makeBoundingBox() {
@@ -4068,6 +4068,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4074,6 +4074,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
public final void setPosRaw(double x, double y, double z) {
@ -31,7 +31,7 @@ index 133a544274f4a80071c2a3306f5b0cd47cd6a270..4d62f7f88dfaedfbde598515a1e77716
// Paper start - rewrite chunk system
if (this.updatingSectionStatus) {
LOGGER.error("Refusing to update position for entity " + this + " to position " + new Vec3(x, y, z) + " since it is processing a section status update", new Throwable());
@@ -4091,6 +4096,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4097,6 +4102,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.levelCallback.onMove();
}

Datei anzeigen

@ -23,10 +23,10 @@ index 959a8a170363227bb8ca833d8399f0c4c3d00004..c73bf7d8c6b009ed5e1f666600d3c470
if (spawnReason != null && !CraftEventFactory.doEntityAddEventCalling(this, entity, spawnReason)) {
return false;
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index a98254e38076e82f94db7b2f2112500eaadd52d1..b0096fe5399397d4c5e170daa892aef017108c2f 100644
index 52d71b08c8338254a0e50780363155da4f4c1934..77eec518940ae41880e395b3dd051d89bd67c319 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -428,10 +428,12 @@ public class ServerPlayerGameMode {
@@ -436,10 +436,12 @@ public class ServerPlayerGameMode {
// return true; // CraftBukkit
}
// CraftBukkit start

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 6db716a0b510e88551d532b382c8adb896edeae6..2e14c719eed5e4a76aba1dbdcac3f9e80d4c7927 100644
index a3d547d9fed7e2c9f344aa467f287ba46c4cb338..af258b981a69b0af2787013837c044c798e5176f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4301,4 +4301,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4307,4 +4307,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
void accept(Entity entity, double x, double y, double z);
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Entity#isTicking
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 2e14c719eed5e4a76aba1dbdcac3f9e80d4c7927..f4cca3313b0a5ac69f5b47da727d9ea3e2b7ffc5 100644
index af258b981a69b0af2787013837c044c798e5176f..5f5f853a67518ddbfbc94b9a92b00cda1219b21a 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4306,5 +4306,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4312,5 +4312,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
public static int nextEntityId() {
return ENTITY_COUNTER.incrementAndGet();
}

Datei anzeigen

@ -28,10 +28,10 @@ index 5ca3ad7b3d7606accd0a58b3c708fadb349608f7..4b6e0fe2fabcc55007fd8979e81f66df
public Vec3 decode(long x, long y, long z) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 25e8dcca51dbefc027d985ba09b973fac17702f7..a8a955a66336e908fa685bb78c1a67ebedd07f5c 100644
index 443bf4c32105a88efbb4df0b8b803cb39ee8b751..d1eb347b80fcee37f59012505dd0ae5787f95d7b 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4093,6 +4093,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4099,6 +4099,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
return;
}
// Paper end - rewrite chunk system

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Implement API to expose exact interaction point
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index b0096fe5399397d4c5e170daa892aef017108c2f..645a226c2e3f6dcf1c25187d006d425038b4545d 100644
index 77eec518940ae41880e395b3dd051d89bd67c319..e6154cf74df39d0c87fc820027adc9641156f888 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -509,7 +509,7 @@ public class ServerPlayerGameMode {
@@ -517,7 +517,7 @@ public class ServerPlayerGameMode {
cancelledBlock = true;
}
@ -18,7 +18,7 @@ index b0096fe5399397d4c5e170daa892aef017108c2f..645a226c2e3f6dcf1c25187d006d4250
this.interactResult = event.useItemInHand() == Event.Result.DENY;
this.interactPosition = blockposition.immutable();
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 5f14203089f989023c84ea6a8e1d491779498118..d0acc47f615b02ce72081aede03fc27c8ab6c0f5 100644
index 48d499c60739835f603629e248a9a92f54b3cda4..a7c8736391692dfdf028c40d82754adf47fd26dc 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -58,7 +58,9 @@ import net.minecraft.world.level.storage.loot.parameters.LootContextParams;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Inventory#close
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
index 513f3311a9009996c27604f2ba7d60c80c7a2060..00959a31e172632d9bf047347f345140fca3198c 100644
index 015fc140db9162865f33cd6577cf758091a663c7..092f6843e3b43d4c615d2eee344f5966e96ae850 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
@@ -449,6 +449,14 @@ public class CraftInventory implements Inventory {
@@ -450,6 +450,14 @@ public class CraftInventory implements Inventory {
this.clear(i);
}
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Optimize indirect passenger iteration
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 79bf4320b04acdb3999dcd47f2b6ceef198e5923..1105aa0293df750e70627efe951fd8604bde3e1b 100644
index a0cc38632f387d9c789704040b76181220dd20ee..d55528a8b2e5939942582fd2d40a786ba64af7ac 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3758,20 +3758,34 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3764,20 +3764,34 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
private Stream<Entity> getIndirectPassengersStream() {
@ -43,7 +43,7 @@ index 79bf4320b04acdb3999dcd47f2b6ceef198e5923..1105aa0293df750e70627efe951fd860
return () -> {
return this.getIndirectPassengersStream().iterator();
};
@@ -3788,6 +3802,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3794,6 +3808,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
// Paper end - rewrite chunk system
public boolean hasExactlyOnePlayerPassenger() {

Datei anzeigen

@ -122,7 +122,7 @@ index 8faf55969232d44b999231b219a208e049a72755..1f683d734b9e272c8f4c48d922f3dcd1
private void tickPassenger(Entity vehicle, Entity passenger) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 3a388ead677be73b0ae4425a05a45cd34e95d586..2b3be52e421f21ed4736c9e9093c038d82ded227 100644
index b172f0733491ca6cde6b962f03e15e6e949ebf52..d87e9e252056d9dea6748f54847434468a0111df 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -972,7 +972,42 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@ -182,7 +182,7 @@ index 3a388ead677be73b0ae4425a05a45cd34e95d586..2b3be52e421f21ed4736c9e9093c038d
}
protected boolean isHorizontalCollisionMinor(Vec3 adjustedMovement) {
@@ -4091,7 +4133,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4097,7 +4139,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
public void setDeltaMovement(Vec3 velocity) {
@ -192,7 +192,7 @@ index 3a388ead677be73b0ae4425a05a45cd34e95d586..2b3be52e421f21ed4736c9e9093c038d
}
public void addDeltaMovement(Vec3 velocity) {
@@ -4177,7 +4221,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4183,7 +4227,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
// Paper end - fix MC-4
if (this.position.x != x || this.position.y != y || this.position.z != z) {

Datei anzeigen

@ -1180,7 +1180,7 @@ index 0000000000000000000000000000000000000000..d67a40e7be030142443680c89e1763fc
+ }
+}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index ee35f2696d73dea748bc30a7b3d8172366159696..d4bccae5b83a77af733b5d9466ae24b13323b2ba 100644
index ecdeb2bcfcb23d39f98325b0a36c3c905b12c178..1eda9f5e240bc72cd06dd7fa9fba5df7313c3dde 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -417,7 +417,7 @@ public class ServerPlayer extends Player {
@ -1215,7 +1215,7 @@ index 299676157b16ed9e93f5cf9804ab75514b694f49..0f380a7045f89bc383e4eb3d93c1be38
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 73d475788e23d371c79908c792d8d4dd0ba770ab..182e443e4cd114edeb0c0c6be5dda76d49346da3 100644
index 45eeef03ab3c885b4fbc332287089e9cc5d85afa..63802f5304f23a6e1e469e383692376d1f4d8f0d 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1161,9 +1161,44 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Guard against invalid entity positions
Anything not finite should be blocked and logged
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 35a246c1b167b356e293dd785c05f59a3ebcf4d8..83e201e34a6628faec9ba7497a1025aa207a103e 100644
index e052694ca221508f28cbfbb93a6ec974d9ca65d8..b26fc1a1f30bd9736ac0cf09d381dc02c0bc34d6 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4320,11 +4320,33 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4326,11 +4326,33 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
return this.getZ((2.0D * this.random.nextDouble() - 1.0D) * widthScale);
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Trigger bee_nest_destroyed trigger in the correct place
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 17c313b9cb45c8158cab751ffc4e0dc3b7e1fa3c..796d17f51496974cfdfed2593753b8c09b5c81c1 100644
index 5461e6ff769be93054b3d8369a7aa286d1244875..161a810a8c4bd4c916c54df49c44c504130cb28e 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -419,12 +419,16 @@ public class ServerPlayerGameMode {
@@ -427,12 +427,16 @@ public class ServerPlayerGameMode {
block.destroy(this.level, pos, iblockdata);
}
@ -25,7 +25,7 @@ index 17c313b9cb45c8158cab751ffc4e0dc3b7e1fa3c..796d17f51496974cfdfed2593753b8c0
itemstack.mineBlock(this.level, iblockdata, pos, this.player);
if (flag && flag1 && event.isDropItems()) { // CraftBukkit - Check if block should drop items
@@ -445,6 +449,13 @@ public class ServerPlayerGameMode {
@@ -453,6 +457,13 @@ public class ServerPlayerGameMode {
if (flag && event != null) {
iblockdata.getBlock().popExperience(this.level, pos, event.getExpToDrop(), this.player); // Paper
}

Datei anzeigen

@ -7,7 +7,7 @@ Minecraft's prediction system does not handle block entities, so if we are manua
block breaking we need to set it after the prediction is finished. This fixes block entities not showing when cancelling the BlockBreakEvent.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 796d17f51496974cfdfed2593753b8c09b5c81c1..13031576c20bda3bb12c926f6cd938fa5fb105f2 100644
index 161a810a8c4bd4c916c54df49c44c504130cb28e..45b48da09eafa8482836e49768426069b0a73cca 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -62,6 +62,8 @@ public class ServerPlayerGameMode {
@ -43,7 +43,7 @@ index 796d17f51496974cfdfed2593753b8c09b5c81c1..13031576c20bda3bb12c926f6cd938fa
return;
}
// CraftBukkit end
@@ -385,10 +381,12 @@ public class ServerPlayerGameMode {
@@ -393,10 +389,12 @@ public class ServerPlayerGameMode {
}
// Update any tile entity data for this block
@ -57,7 +57,7 @@ index 796d17f51496974cfdfed2593753b8c09b5c81c1..13031576c20bda3bb12c926f6cd938fa
}
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index c81ae9fd083c255c0964c344b3c4ad1dc8ddba7b..ca8d14ec52ec53654be5afa9a2eb67e83b18ccba 100644
index bcbea0fa4fc277f08d90eea5ea4411516362e21e..4aa0b52f8256efb3d63c774d0025d3b85c5ab955 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1853,8 +1853,28 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Correctly handle interactions with items on cooldown
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 13031576c20bda3bb12c926f6cd938fa5fb105f2..58b093bb1de78ee3b3b2ea364aa50474883f443a 100644
index 16a1416cb2ce01071a033c5049edfb60b614d56a..1d33c02088c150189d7f4b0aa27f6a1de96b11cf 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -512,6 +512,7 @@ public class ServerPlayerGameMode {
@@ -520,6 +520,7 @@ public class ServerPlayerGameMode {
BlockState iblockdata = world.getBlockState(blockposition);
InteractionResult enuminteractionresult = InteractionResult.PASS;
boolean cancelledBlock = false;
@ -16,7 +16,7 @@ index 13031576c20bda3bb12c926f6cd938fa5fb105f2..58b093bb1de78ee3b3b2ea364aa50474
if (!iblockdata.getBlock().isEnabled(world.enabledFeatures())) {
return InteractionResult.FAIL;
@@ -521,10 +522,10 @@ public class ServerPlayerGameMode {
@@ -529,10 +530,10 @@ public class ServerPlayerGameMode {
}
if (player.getCooldowns().isOnCooldown(stack.getItem())) {
@ -30,7 +30,7 @@ index 13031576c20bda3bb12c926f6cd938fa5fb105f2..58b093bb1de78ee3b3b2ea364aa50474
this.interactResult = event.useItemInHand() == Event.Result.DENY;
this.interactPosition = blockposition.immutable();
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 31b955a5424bb9d00c763764f50c9f7605d5317c..109e6afb8fcce0fb539ef93c6c872daa010dc3ff 100644
index 30360517235b2a568b92a43aa5efc0d6759c7e8e..cdb8ec04f4a19ec3dbedbd5b17a7d1f3afaa238e 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -498,6 +498,12 @@ public class CraftEventFactory {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Player Entity Tracking Events
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 9796c6fc7c114e3e2af0dc433a87cda910683e06..071b241de8f6e00f57e8564bb3feb757ee1f05eb 100644
index ad7754fc9bc8340ced8e39bcd882a1307781910c..8a7af77e8ac456cc89da7e954a8090bf794475c8 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3894,9 +3894,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3900,9 +3900,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
EnchantmentHelper.doPostDamageEffects(attacker, target);
}

Datei anzeigen

@ -1,44 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Tue, 14 Mar 2023 18:55:56 -0700
Subject: [PATCH] Fix Jukeboxes
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java b/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java
index 639b5a0452e919960094087933f96b9fca4a3398..d20fafee259b170d4ca770865ab15617c4e127b6 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java
@@ -91,4 +91,18 @@ public class CraftJukebox extends CraftBlockEntityState<JukeboxBlockEntity> impl
jukebox.popOutRecord();
return result;
}
+ // Paper start
+ @Override
+ public org.bukkit.inventory.Inventory getInventory() {
+ if (!this.isPlaced()) {
+ return this.getSnapshotInventory();
+ }
+ return new org.bukkit.craftbukkit.inventory.CraftInventory(this.getTileEntity());
+ }
+
+ @Override
+ public org.bukkit.inventory.Inventory getSnapshotInventory() {
+ return new org.bukkit.craftbukkit.inventory.CraftInventory(this.getSnapshot());
+ }
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
index 00959a31e172632d9bf047347f345140fca3198c..44eba9e20651c29a84def786f4a350750fdbdeeb 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
@@ -535,6 +535,10 @@ public class CraftInventory implements Inventory {
return InventoryType.COMPOSTER;
} else if (this instanceof CraftInventorySmithingNew) {
return InventoryType.SMITHING_NEW;
+ // Paper start
+ } else if (this.inventory instanceof net.minecraft.world.level.block.entity.JukeboxBlockEntity) {
+ return InventoryType.JUKEBOX;
+ // Paper end
} else {
return InventoryType.CHEST;
}

Datei anzeigen

@ -18,7 +18,7 @@ index 6986b2a5df34bfe078c902594f6409ad0ea847ef..ed12a23448dc9ada423ebd79a131eab2
this.updateState(slot);
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java
index dfc41db5c94ef3591f46551a61018eb9db6e25b6..8f999cf55ab90a0334b45796ba5587df030cef70 100644
index 9cb6c0d80a988c23dd7af4263882ac128d08d6e8..08a6f2924b36d36fadb35d8d2443bb717ff4567e 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java
@@ -183,6 +183,12 @@ public class JukeboxBlockEntity extends BlockEntity implements Clearable, Contai

@ -1 +1 @@
Subproject commit 150a2861a7399537d077bb754438d12a8741fe36
Subproject commit 2c64d8c4a880c6aec8ee8ce3abdd0238b0e0d8a3

@ -1 +1 @@
Subproject commit e5a7921f0597766fd92590317da11ffea85138a4
Subproject commit 93813509b6dd3476419a5344b252aa1867960090

@ -1 +1 @@
Subproject commit 41150f3919a43f833c5c81734afc71ad419c6816
Subproject commit 6ad4b93c2ab4d981910821bd43be6a085177bed9