0
0
mirror of https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git synced 2025-04-06 20:04:32 +00:00
Files
2025-03-26 03:05:00 +11:00

59 lines
2.7 KiB
Diff

--- a/net/minecraft/world/level/TicketStorage.java
+++ b/net/minecraft/world/level/TicketStorage.java
@@ -28,6 +28,10 @@
import net.minecraft.world.level.saveddata.SavedDataType;
import org.slf4j.Logger;
+// CraftBukkit start
+import java.util.Objects;
+// CraftBukkit end
+
public class TicketStorage extends PersistentBase {
private static final int INITIAL_TICKET_LIST_CAPACITY = 4;
@@ -95,7 +99,7 @@
Long2ObjectMap.Entry<List<Ticket>> long2objectmap_entry = (Entry) objectiterator.next();
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(long2objectmap_entry.getLongKey());
- for (Ticket ticket : (List) long2objectmap_entry.getValue()) {
+ for (Ticket ticket : long2objectmap_entry.getValue()) { // CraftBukkit - decompile error
biconsumer.accept(chunkcoordintpair, ticket);
}
}
@@ -108,7 +112,7 @@
while (objectiterator.hasNext()) {
Long2ObjectMap.Entry<List<Ticket>> long2objectmap_entry = (Entry) objectiterator.next();
- for (Ticket ticket : (List) long2objectmap_entry.getValue()) {
+ for (Ticket ticket : long2objectmap_entry.getValue()) { // CraftBukkit - decompile error
this.addTicket(long2objectmap_entry.getLongKey(), ticket);
}
}
@@ -180,7 +184,7 @@
}
private static boolean isTicketSameTypeAndLevel(Ticket ticket, Ticket ticket1) {
- return ticket1.getType() == ticket.getType() && ticket1.getTicketLevel() == ticket.getTicketLevel();
+ return ticket1.getType() == ticket.getType() && ticket1.getTicketLevel() == ticket.getTicketLevel() && Objects.equals(ticket.key, ticket1.key); // CraftBukkit
}
public int getTicketLevelAt(long i, boolean flag) {
@@ -361,7 +365,7 @@
while (objectiterator.hasNext()) {
Long2ObjectMap.Entry<List<Ticket>> long2objectmap_entry = (Entry) objectiterator.next();
- for (Ticket ticket : (List) long2objectmap_entry.getValue()) {
+ for (Ticket ticket : long2objectmap_entry.getValue()) { // CraftBukkit - decompile error
if (ticket.getType() == tickettype) {
list.add(Pair.of(ticket, long2objectmap_entry.getLongKey()));
}
@@ -397,7 +401,7 @@
while (objectiterator.hasNext()) {
Long2ObjectMap.Entry<List<Ticket>> long2objectmap_entry = (Entry) objectiterator.next();
- for (Ticket ticket : (List) long2objectmap_entry.getValue()) {
+ for (Ticket ticket : long2objectmap_entry.getValue()) { // CraftBukkit - decompile error
if (predicate.test(ticket)) {
longopenhashset.add(long2objectmap_entry.getLongKey());
break;