SPIGOT-7313: More accurately edit data on Jukeboxes

By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
CraftBukkit/Spigot
2023-03-29 19:23:41 +11:00
parent 8a53e8b4eb
commit 26ae05b48f
2 changed files with 65 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/entity/TileEntityJukeBox.java
+++ b/net/minecraft/world/level/block/entity/TileEntityJukeBox.java
@@ -24,6 +24,13 @@
@@ -24,14 +24,57 @@
import net.minecraft.world.phys.Vec3D;
import net.minecraft.world.ticks.ContainerSingleItem;
@@ -14,10 +14,14 @@
public class TileEntityJukeBox extends TileEntity implements Clearable, ContainerSingleItem {
private static final int SONG_END_PADDING = 20;
@@ -32,6 +39,42 @@
private long tickCount;
private long recordStartedTick;
private boolean isPlaying;
private final NonNullList<ItemStack> items;
private int ticksSinceLastEvent;
- private long tickCount;
- private long recordStartedTick;
- private boolean isPlaying;
+ public long tickCount;
+ public long recordStartedTick;
+ public boolean isPlaying;
+ // CraftBukkit start - add fields and methods
+ public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
+ private int maxStack = MAX_STACK;