|
139 | 139 | + public static java.util.Collection<org.bukkit.plugin.Plugin> getPluginChunkTickets(net.minecraft.server.level.ServerLevel world,
|
140 | 140 | + int x, int z) {
|
141 | 141 | + net.minecraft.server.level.DistanceManager chunkDistanceManager = world.getChunkSource().chunkMap.distanceManager;
|
142 |
| -+ net.minecraft.util.SortedArraySet<net.minecraft.server.level.Ticket<?>> tickets = chunkDistanceManager.tickets.get(ChunkPos.asLong(x, z)); |
| 142 | ++ List<net.minecraft.server.level.Ticket> tickets = chunkDistanceManager.ticketStorage.tickets.get(ChunkPos.asLong(x, z)); |
143 | 143 | +
|
144 | 144 | + if (tickets == null) {
|
145 | 145 | + return java.util.Collections.emptyList();
|
146 | 146 | + }
|
147 | 147 | +
|
148 | 148 | + com.google.common.collect.ImmutableList.Builder<org.bukkit.plugin.Plugin> ret = com.google.common.collect.ImmutableList.builder();
|
149 |
| -+ for (net.minecraft.server.level.Ticket<?> ticket : tickets) { |
| 149 | ++ for (net.minecraft.server.level.Ticket ticket : tickets) { |
150 | 150 | + if (ticket.getType() == net.minecraft.server.level.TicketType.PLUGIN_TICKET) {
|
151 | 151 | + ret.add((org.bukkit.plugin.Plugin) ticket.key);
|
152 | 152 | + }
|
|
159 | 159 | + Map<org.bukkit.plugin.Plugin, com.google.common.collect.ImmutableList.Builder<Chunk>> ret = new HashMap<>();
|
160 | 160 | + net.minecraft.server.level.DistanceManager chunkDistanceManager = world.getChunkSource().chunkMap.distanceManager;
|
161 | 161 | +
|
162 |
| -+ for (it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry<net.minecraft.util.SortedArraySet<net.minecraft.server.level.Ticket<?>>> chunkTickets : chunkDistanceManager.tickets.long2ObjectEntrySet()) { |
| 162 | ++ for (it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry<List<net.minecraft.server.level.Ticket>> chunkTickets : chunkDistanceManager.ticketStorage.tickets.long2ObjectEntrySet()) { |
163 | 163 | + long chunkKey = chunkTickets.getLongKey();
|
164 |
| -+ net.minecraft.util.SortedArraySet<net.minecraft.server.level.Ticket<?>> tickets = chunkTickets.getValue(); |
| 164 | ++ List<net.minecraft.server.level.Ticket> tickets = chunkTickets.getValue(); |
165 | 165 | +
|
166 | 166 | + org.bukkit.Chunk chunk = null;
|
167 |
| -+ for (net.minecraft.server.level.Ticket<?> ticket : tickets) { |
| 167 | ++ for (net.minecraft.server.level.Ticket ticket : tickets) { |
168 | 168 | + if (ticket.getType() != net.minecraft.server.level.TicketType.PLUGIN_TICKET) {
|
169 | 169 | + continue;
|
170 | 170 | + }
|
|
0 commit comments