mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +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
This commit is contained in:
parent
02d5cb7b2b
commit
5326cb65f0
6 changed files with 11 additions and 111 deletions
|
@ -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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
||||||
--- a/src/main/java/org/bukkit/block/Jukebox.java
|
|
||||||
+++ b/src/main/java/org/bukkit/block/Jukebox.java
|
|
||||||
@@ -0,0 +0,0 @@ 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.
|
|
||||||
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
||||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
|
||||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
|
||||||
@@ -0,0 +0,0 @@ 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;
|
|
|
@ -1169,14 +1169,15 @@ diff --git a/src/main/java/org/bukkit/entity/Sniffer.java b/src/main/java/org/bu
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/Sniffer.java
|
--- a/src/main/java/org/bukkit/entity/Sniffer.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/Sniffer.java
|
+++ b/src/main/java/org/bukkit/entity/Sniffer.java
|
||||||
@@ -0,0 +0,0 @@ package org.bukkit.entity;
|
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable;
|
||||||
/**
|
* <b>Note: This entity is part of an experimental feature of Minecraft and
|
||||||
* Represents a Sniffer.
|
* 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 {
|
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
|
diff --git a/src/main/java/org/bukkit/entity/memory/MemoryKey.java b/src/main/java/org/bukkit/entity/memory/MemoryKey.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/memory/MemoryKey.java
|
--- a/src/main/java/org/bukkit/entity/memory/MemoryKey.java
|
||||||
|
@ -1200,7 +1201,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - 1.20
|
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - 1.20
|
||||||
CHISELED_BOOKSHELF(6, "Chiseled Bookshelf", false),
|
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.
|
||||||
|
@@ -0,0 +0,0 @@ public enum InventoryType {
|
||||||
*
|
*
|
||||||
* @deprecated draft, experimental 1.20 API
|
* @deprecated draft, experimental 1.20 API
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java
|
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java
|
|
||||||
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
|
||||||
@@ -0,0 +0,0 @@ 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;
|
|
||||||
}
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 150a2861a7399537d077bb754438d12a8741fe36
|
Subproject commit 2c64d8c4a880c6aec8ee8ce3abdd0238b0e0d8a3
|
|
@ -1 +1 @@
|
||||||
Subproject commit e5a7921f0597766fd92590317da11ffea85138a4
|
Subproject commit 93813509b6dd3476419a5344b252aa1867960090
|
|
@ -1 +1 @@
|
||||||
Subproject commit 41150f3919a43f833c5c81734afc71ad419c6816
|
Subproject commit 6ad4b93c2ab4d981910821bd43be6a085177bed9
|
Loading…
Reference in a new issue