Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b327b6652 | ||
|
|
74c285c9b8 | ||
|
|
53a33bce30 | ||
|
|
f153251858 | ||
|
|
52f1f9d217 | ||
|
|
bd8656028e | ||
|
|
ddce0cde62 |
@@ -4,7 +4,7 @@ plugins {
|
|||||||
java
|
java
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
|
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
|
||||||
id("io.papermc.paperweight.patcher") version "1.5.5"
|
id("io.papermc.paperweight.patcher") version "1.5.8"
|
||||||
}
|
}
|
||||||
|
|
||||||
val paperMavenPublicUrl = "https://papermc.io/repo/repository/maven-public/"
|
val paperMavenPublicUrl = "https://papermc.io/repo/repository/maven-public/"
|
||||||
|
|||||||
30
patches/api/0020-Non-saveable-entities.patch
Normal file
30
patches/api/0020-Non-saveable-entities.patch
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cryptite <cryptite@gmail.com>
|
||||||
|
Date: Sat, 21 Oct 2023 11:27:53 -0500
|
||||||
|
Subject: [PATCH] Non-saveable entities
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||||
|
index 762cb07861ca8ff058ce8d57ea6c15df1e588bf3..234ad94cf73caaac64d0917cf0d761c1d4c5d6b5 100644
|
||||||
|
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||||
|
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||||
|
@@ -1049,4 +1049,19 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||||
|
*/
|
||||||
|
@NotNull String getScoreboardEntryName();
|
||||||
|
// Paper end - entity scoreboard name
|
||||||
|
+
|
||||||
|
+ // Slice start
|
||||||
|
+ /**
|
||||||
|
+ * Returns true if the entity can be saved. If false, the entity will never be serialized or saved.
|
||||||
|
+ */
|
||||||
|
+ boolean isSaveable();
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Sets whether the entity can be serialized and saved to disk.
|
||||||
|
+ *
|
||||||
|
+ * @param saveable the saveable status
|
||||||
|
+ * @see #isSaveable()
|
||||||
|
+ */
|
||||||
|
+ void setSaveable(boolean saveable);
|
||||||
|
+ // Slice end
|
||||||
|
}
|
||||||
70
patches/api/0021-ChunkStatusChangeEvent.patch
Normal file
70
patches/api/0021-ChunkStatusChangeEvent.patch
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cryptite <cryptite@gmail.com>
|
||||||
|
Date: Sun, 22 Oct 2023 08:41:09 -0500
|
||||||
|
Subject: [PATCH] ChunkStatusChangeEvent
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/com/destroystokyo/paper/event/chunk/ChunkStatusChangeEvent.java b/src/main/java/com/destroystokyo/paper/event/chunk/ChunkStatusChangeEvent.java
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000000000000000000000000000..512664d4a7a6821b8d79d0aabf5c31a61fcae6b9
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/main/java/com/destroystokyo/paper/event/chunk/ChunkStatusChangeEvent.java
|
||||||
|
@@ -0,0 +1,58 @@
|
||||||
|
+package com.destroystokyo.paper.event.chunk;
|
||||||
|
+
|
||||||
|
+import org.bukkit.Chunk;
|
||||||
|
+import org.bukkit.event.Event;
|
||||||
|
+import org.bukkit.event.HandlerList;
|
||||||
|
+import org.jetbrains.annotations.NotNull;
|
||||||
|
+
|
||||||
|
+/**
|
||||||
|
+ * Called when the Full Status of a Chunk changes
|
||||||
|
+ */
|
||||||
|
+public class ChunkStatusChangeEvent extends Event {
|
||||||
|
+
|
||||||
|
+ private static final HandlerList handlers = new HandlerList();
|
||||||
|
+ private final Chunk chunk;
|
||||||
|
+ private final ChunkStatus currentState;
|
||||||
|
+ private final ChunkStatus newState;
|
||||||
|
+
|
||||||
|
+ public ChunkStatusChangeEvent(Chunk chunk, ChunkStatus currentState, ChunkStatus newState) {
|
||||||
|
+ super();
|
||||||
|
+ this.chunk = chunk;
|
||||||
|
+ this.currentState = currentState;
|
||||||
|
+ this.newState = newState;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public Chunk getChunk() {
|
||||||
|
+ return chunk;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public ChunkStatus getCurrentState() {
|
||||||
|
+ return currentState;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public ChunkStatus getNewState() {
|
||||||
|
+ return newState;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public boolean isUpgrade() {
|
||||||
|
+ return newState.ordinal() > currentState.ordinal();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ @NotNull
|
||||||
|
+ public HandlerList getHandlers() {
|
||||||
|
+ return handlers;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @NotNull
|
||||||
|
+ public static HandlerList getHandlerList() {
|
||||||
|
+ return handlers;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public enum ChunkStatus {
|
||||||
|
+ INACCESSIBLE,
|
||||||
|
+ FULL,
|
||||||
|
+ BLOCK_TICKING,
|
||||||
|
+ ENTITY_TICKING;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
61
patches/server/0038-Non-saveable-entities.patch
Normal file
61
patches/server/0038-Non-saveable-entities.patch
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cryptite <cryptite@gmail.com>
|
||||||
|
Date: Sat, 21 Oct 2023 11:27:52 -0500
|
||||||
|
Subject: [PATCH] Non-saveable entities
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
||||||
|
index 7e8dc9e8f381abfdcce2746edc93122d623622d1..303e5ed4d5cf2a64b998656bfd189f19f8c8fcde 100644
|
||||||
|
--- a/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
||||||
|
+++ b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
||||||
|
@@ -118,7 +118,7 @@ public final class ChunkEntitySlices {
|
||||||
|
// removed by us below
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
- if (entity.shouldBeSaved()) {
|
||||||
|
+ if (entity.shouldBeSaved() || !entity.saveable) { // Slice
|
||||||
|
entity.setRemoved(Entity.RemovalReason.UNLOADED_TO_CHUNK);
|
||||||
|
if (entity.isVehicle()) {
|
||||||
|
// we cannot assume that these entities are contained within this chunk, because entities can
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
|
index b23b6be85496d031b81b2d3abb9690322c340a80..eb2ef004860c89fba346c8025ae3c645106a21e6 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
|
@@ -418,6 +418,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
public boolean freezeLocked = false; // Paper - Freeze Tick Lock API
|
||||||
|
public boolean collidingWithWorldBorder; // Paper
|
||||||
|
public boolean fixedPose = false; // Paper
|
||||||
|
+ public boolean saveable = true; // Slice
|
||||||
|
|
||||||
|
public void setOrigin(@javax.annotation.Nonnull Location location) {
|
||||||
|
this.origin = location.toVector();
|
||||||
|
@@ -4703,7 +4704,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldBeSaved() {
|
||||||
|
- return this.removalReason != null && !this.removalReason.shouldSave() ? false : (this.isPassenger() ? false : !this.isVehicle() || !this.hasAnyPlayerPassengers()); // Paper - rewrite chunk system - it should check if the entity has ANY player passengers
|
||||||
|
+ return this.saveable && this.removalReason != null && !this.removalReason.shouldSave() ? false : (this.isPassenger() ? false : !this.isVehicle() || !this.hasAnyPlayerPassengers()); // Paper - rewrite chunk system - it should check if the entity has ANY player passengers // Slice - add saveable check
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
|
index 2dbe8b870fd39b4d22e9725912f443757ae70761..0cc2d78c68c87c7dce3fbd40f5ba946d7776daa0 100644
|
||||||
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
|
@@ -1507,4 +1507,16 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
|
return this.getHandle().getScoreboardName();
|
||||||
|
}
|
||||||
|
// Paper end - entity scoreboard name
|
||||||
|
+
|
||||||
|
+ // Slice start
|
||||||
|
+ @Override
|
||||||
|
+ public boolean isSaveable() {
|
||||||
|
+ return this.entity.saveable;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void setSaveable(boolean saveable) {
|
||||||
|
+ this.entity.saveable = saveable;
|
||||||
|
+ }
|
||||||
|
+ // Slice end
|
||||||
|
}
|
||||||
24
patches/server/0039-ChunkStatusChangeEvent.patch
Normal file
24
patches/server/0039-ChunkStatusChangeEvent.patch
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cryptite <cryptite@gmail.com>
|
||||||
|
Date: Sun, 22 Oct 2023 08:41:08 -0500
|
||||||
|
Subject: [PATCH] ChunkStatusChangeEvent
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java
|
||||||
|
index 51304c5cf4b0ac7646693ef97ef4a3847d3342b5..21976eeda150d3d7e396ebabdf6416dd65560dbd 100644
|
||||||
|
--- a/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java
|
||||||
|
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java
|
||||||
|
@@ -1324,6 +1324,13 @@ public final class NewChunkHolder {
|
||||||
|
// chunks cannot downgrade state while status is pending a change
|
||||||
|
final LevelChunk chunk = (LevelChunk)this.currentChunk;
|
||||||
|
|
||||||
|
+ // Slice start
|
||||||
|
+ new com.destroystokyo.paper.event.chunk.ChunkStatusChangeEvent(new org.bukkit.craftbukkit.CraftChunk(chunk),
|
||||||
|
+ com.destroystokyo.paper.event.chunk.ChunkStatusChangeEvent.ChunkStatus.valueOf(currState.name()),
|
||||||
|
+ com.destroystokyo.paper.event.chunk.ChunkStatusChangeEvent.ChunkStatus.valueOf(nextState.name()))
|
||||||
|
+ .callEvent();
|
||||||
|
+ // Slice end
|
||||||
|
+
|
||||||
|
// Note: we assume that only load/unload contain plugin logic
|
||||||
|
// plugin logic is anything stupid enough to possibly change the chunk status while it is already
|
||||||
|
// being changed (i.e during load it is possible it will try to set to full ticking)
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cryptite <cryptite@gmail.com>
|
||||||
|
Date: Wed, 25 Oct 2023 17:05:29 -0500
|
||||||
|
Subject: [PATCH] Disable sending Entity Movement Packets
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||||
|
index 0ac580f3cf8f95025992420702d67ad56db2ba05..676427c69ab445cef3a81628ed34cb6d4f018e8e 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||||
|
@@ -148,7 +148,7 @@ public class ServerEntity {
|
||||||
|
boolean flag = Math.abs(i - this.yRotp) >= 1 || Math.abs(j - this.xRotp) >= 1;
|
||||||
|
|
||||||
|
if (flag) {
|
||||||
|
- this.broadcast.accept(new ClientboundMoveEntityPacket.Rot(this.entity.getId(), (byte) i, (byte) j, this.entity.onGround()));
|
||||||
|
+ if (entity.sendMovementPackets) this.broadcast.accept(new ClientboundMoveEntityPacket.Rot(this.entity.getId(), (byte) i, (byte) j, this.entity.onGround())); // Slice
|
||||||
|
this.yRotp = i;
|
||||||
|
this.xRotp = j;
|
||||||
|
}
|
||||||
|
@@ -183,14 +183,14 @@ public class ServerEntity {
|
||||||
|
if (!flag6 && this.teleportDelay <= 400 && !this.wasRiding && this.wasOnGround == this.entity.onGround()&& !(io.papermc.paper.configuration.GlobalConfiguration.get().collisions.sendFullPosForHardCollidingEntities && this.entity.hardCollides())) { // Paper - send full pos for hard colliding entities to prevent collision problems due to desync
|
||||||
|
if ((!flag2 || !flag3) && !(this.entity instanceof AbstractArrow)) {
|
||||||
|
if (flag2) {
|
||||||
|
- packet1 = new ClientboundMoveEntityPacket.Pos(this.entity.getId(), (short) ((int) k), (short) ((int) l), (short) ((int) i1), this.entity.onGround());
|
||||||
|
+ if (entity.sendMovementPackets) packet1 = new ClientboundMoveEntityPacket.Pos(this.entity.getId(), (short) ((int) k), (short) ((int) l), (short) ((int) i1), this.entity.onGround()); // Slice
|
||||||
|
flag4 = true;
|
||||||
|
} else if (flag3) {
|
||||||
|
- packet1 = new ClientboundMoveEntityPacket.Rot(this.entity.getId(), (byte) i, (byte) j, this.entity.onGround());
|
||||||
|
+ if (entity.sendMovementPackets) packet1 = new ClientboundMoveEntityPacket.Rot(this.entity.getId(), (byte) i, (byte) j, this.entity.onGround()); // Slice
|
||||||
|
flag5 = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
- packet1 = new ClientboundMoveEntityPacket.PosRot(this.entity.getId(), (short) ((int) k), (short) ((int) l), (short) ((int) i1), (byte) i, (byte) j, this.entity.onGround());
|
||||||
|
+ if (entity.sendMovementPackets) packet1 = new ClientboundMoveEntityPacket.PosRot(this.entity.getId(), (short) ((int) k), (short) ((int) l), (short) ((int) i1), (byte) i, (byte) j, this.entity.onGround()); // Slice
|
||||||
|
flag4 = true;
|
||||||
|
flag5 = true;
|
||||||
|
}
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
|
index eb2ef004860c89fba346c8025ae3c645106a21e6..c955bbc0348dad7ffd4bcc3a5fa17f0de6f1aed6 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
|
@@ -419,6 +419,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
public boolean collidingWithWorldBorder; // Paper
|
||||||
|
public boolean fixedPose = false; // Paper
|
||||||
|
public boolean saveable = true; // Slice
|
||||||
|
+ public boolean sendMovementPackets = true; // Slice
|
||||||
|
|
||||||
|
public void setOrigin(@javax.annotation.Nonnull Location location) {
|
||||||
|
this.origin = location.toVector();
|
||||||
45
patches/server/0041-Player-spawnsOwnMobs.patch
Normal file
45
patches/server/0041-Player-spawnsOwnMobs.patch
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cryptite <cryptite@gmail.com>
|
||||||
|
Date: Thu, 7 Dec 2023 08:48:41 -0600
|
||||||
|
Subject: [PATCH] Player spawnsOwnMobs
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
|
index acbcdc8cb1523044b1657e03a141fae6389a3686..000a2c8d30d7d72a460e2fc6205088b81a8bfe3a 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
|
@@ -521,7 +521,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
|
// Paper start - optimize isOutisdeRange
|
||||||
|
ChunkMap playerChunkMap = this.chunkMap;
|
||||||
|
for (ServerPlayer player : this.level.players) {
|
||||||
|
- if (!player.affectsSpawning || player.isSpectator()) {
|
||||||
|
+ if (!player.affectsSpawning || player.isSpectator() || player.spawnsOwnMobs) { // Slice
|
||||||
|
playerChunkMap.playerMobSpawnMap.remove(player);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
|
index 564591e9f18dd6bb0f76ae4f153adcc0a228d4fa..578535732d442b524536bdd76d6a4badeed84fbd 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
|
@@ -770,7 +770,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
// Paper start - optimise checkDespawn
|
||||||
|
this.playersAffectingSpawning.clear();
|
||||||
|
for (ServerPlayer player : this.players) {
|
||||||
|
- if (net.minecraft.world.entity.EntitySelector.PLAYER_AFFECTS_SPAWNING.test(player)) {
|
||||||
|
+ if (!player.spawnsOwnMobs && net.minecraft.world.entity.EntitySelector.PLAYER_AFFECTS_SPAWNING.test(player)) { // Slice
|
||||||
|
this.playersAffectingSpawning.add(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
|
index 15515e871c89498ec936ab24871741f883f18a3b..16fbdbe12d54fbc8d54403979ee2a89322a14dd2 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
|
@@ -188,6 +188,8 @@ public abstract class Player extends LivingEntity {
|
||||||
|
public net.kyori.adventure.util.TriState flyingFallDamage = net.kyori.adventure.util.TriState.NOT_SET;
|
||||||
|
// Paper end
|
||||||
|
|
||||||
|
+ public boolean spawnsOwnMobs = false; // Slice
|
||||||
|
+
|
||||||
|
// CraftBukkit start
|
||||||
|
public boolean fauxSleeping;
|
||||||
|
public int oldLevel = -1;
|
||||||
42
patches/server/0042-Set-location-on-a-Custom-Inventory.patch
Normal file
42
patches/server/0042-Set-location-on-a-Custom-Inventory.patch
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cryptite <cryptite@gmail.com>
|
||||||
|
Date: Fri, 8 Dec 2023 08:02:07 -0600
|
||||||
|
Subject: [PATCH] Set location on a Custom Inventory
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
|
||||||
|
index da1c1fe0faf6819b15a81d6ad53370948e5f984f..84eff85e98484c9701e203bb1fa61435ee88bab4 100644
|
||||||
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
|
||||||
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
|
||||||
|
@@ -69,6 +69,14 @@ public class CraftInventoryCustom extends CraftInventory {
|
||||||
|
}
|
||||||
|
// Paper end
|
||||||
|
|
||||||
|
+ // Slice start
|
||||||
|
+ public void setLocation(Location location) {
|
||||||
|
+ if (this.inventory instanceof MinecraftInventory minecraftInventory) {
|
||||||
|
+ minecraftInventory.location = location;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ // Slice end
|
||||||
|
+
|
||||||
|
static class MinecraftInventory implements Container {
|
||||||
|
private final NonNullList<ItemStack> items;
|
||||||
|
private int maxStack = MAX_STACK;
|
||||||
|
@@ -77,6 +85,7 @@ public class CraftInventoryCustom extends CraftInventory {
|
||||||
|
private final net.kyori.adventure.text.Component adventure$title; // Paper
|
||||||
|
private InventoryType type;
|
||||||
|
private final InventoryHolder owner;
|
||||||
|
+ private Location location; // Slice
|
||||||
|
|
||||||
|
// Paper start
|
||||||
|
public MinecraftInventory(InventoryHolder owner, InventoryType type, net.kyori.adventure.text.Component title) {
|
||||||
|
@@ -239,7 +248,7 @@ public class CraftInventoryCustom extends CraftInventory {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Location getLocation() {
|
||||||
|
- return null;
|
||||||
|
+ return location;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Paper start
|
||||||
Reference in New Issue
Block a user