mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 09:27:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly Paper Changes: 9a7ca3db Updated Upstream (Bukkit/CraftBukkit/Spigot)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 846acefc7a33c752d574f2ca0876f917afda04ba Mon Sep 17 00:00:00 2001
|
||||
From d0753522c812ed12669f90b13afa74d3a83f4f36 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Fri, 14 Dec 2018 21:53:58 -0800
|
||||
Subject: [PATCH] Tuinity Server Patches
|
||||
@@ -3751,7 +3751,7 @@ index 55f9f4e6e7..d3c616e72d 100644
|
||||
this.a(ChunkCoordIntPair.a, i, j, flag);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
||||
index 73d1570765..6826c0369c 100644
|
||||
index 0244768f76..a56cffbbb2 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@@ -4053,8 +4053,8 @@ index 73d1570765..6826c0369c 100644
|
||||
+ com.tuinity.tuinity.util.TickThread.softEnsureTickThread("Async ticket remove"); // Tuinity
|
||||
Ticket<T> target = new Ticket<>(ticketType, ticketLevel, ticketIdentifier);
|
||||
|
||||
for (java.util.Iterator<ArraySetSorted<Ticket<?>>> iterator = this.tickets.values().iterator(); iterator.hasNext();) {
|
||||
@@ -327,6 +474,222 @@ public abstract class ChunkMapDistance {
|
||||
for (java.util.Iterator<Entry<ArraySetSorted<Ticket<?>>>> iterator = this.tickets.long2ObjectEntrySet().fastIterator(); iterator.hasNext();) {
|
||||
@@ -332,6 +479,222 @@ public abstract class ChunkMapDistance {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4277,7 +4277,7 @@ index 73d1570765..6826c0369c 100644
|
||||
class c extends ChunkMapDistance.b {
|
||||
|
||||
private int e = 0;
|
||||
@@ -344,7 +707,7 @@ public abstract class ChunkMapDistance {
|
||||
@@ -349,7 +712,7 @@ public abstract class ChunkMapDistance {
|
||||
}
|
||||
|
||||
public void a(int i) {
|
||||
@@ -4286,7 +4286,7 @@ index 73d1570765..6826c0369c 100644
|
||||
|
||||
while (objectiterator.hasNext()) {
|
||||
it.unimi.dsi.fastutil.longs.Long2ByteMap.Entry it_unimi_dsi_fastutil_longs_long2bytemap_entry = (it.unimi.dsi.fastutil.longs.Long2ByteMap.Entry) objectiterator.next();
|
||||
@@ -425,7 +788,7 @@ public abstract class ChunkMapDistance {
|
||||
@@ -430,7 +793,7 @@ public abstract class ChunkMapDistance {
|
||||
|
||||
class b extends ChunkMap {
|
||||
|
||||
@@ -9267,7 +9267,7 @@ index f70468adab..2be7962bc5 100644
|
||||
public void restart() {
|
||||
org.spigotmc.RestartCommand.restart();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 1a5ee34103..339ec053c7 100644
|
||||
index 051506fce8..4db397d9f9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -3,6 +3,7 @@ package org.bukkit.craftbukkit;
|
||||
@@ -9278,7 +9278,7 @@ index 1a5ee34103..339ec053c7 100644
|
||||
import it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -287,9 +288,9 @@ public class CraftWorld implements World {
|
||||
@@ -291,9 +292,9 @@ public class CraftWorld implements World {
|
||||
}
|
||||
public int getTileEntityCount() {
|
||||
// We don't use the full world tile entity list, so we must iterate chunks
|
||||
@@ -9290,7 +9290,7 @@ index 1a5ee34103..339ec053c7 100644
|
||||
net.minecraft.server.Chunk chunk = playerchunk.getChunk();
|
||||
if (chunk == null) {
|
||||
continue;
|
||||
@@ -304,7 +305,7 @@ public class CraftWorld implements World {
|
||||
@@ -308,7 +309,7 @@ public class CraftWorld implements World {
|
||||
public int getChunkCount() {
|
||||
int ret = 0;
|
||||
|
||||
@@ -9299,7 +9299,7 @@ index 1a5ee34103..339ec053c7 100644
|
||||
if (chunkHolder.getChunk() != null) {
|
||||
++ret;
|
||||
}
|
||||
@@ -428,8 +429,8 @@ public class CraftWorld implements World {
|
||||
@@ -432,8 +433,8 @@ public class CraftWorld implements World {
|
||||
|
||||
@Override
|
||||
public Chunk[] getLoadedChunks() {
|
||||
@@ -9310,7 +9310,7 @@ index 1a5ee34103..339ec053c7 100644
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -458,6 +459,7 @@ public class CraftWorld implements World {
|
||||
@@ -462,6 +463,7 @@ public class CraftWorld implements World {
|
||||
net.minecraft.server.IChunkAccess chunk = world.getChunkProvider().getChunkAt(x, z, ChunkStatus.FULL, false);
|
||||
if (chunk != null) {
|
||||
world.getChunkProvider().removeTicket(TicketType.PLUGIN, chunk.getPos(), 1, Unit.INSTANCE);
|
||||
@@ -9318,7 +9318,7 @@ index 1a5ee34103..339ec053c7 100644
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1090,16 +1092,16 @@ public class CraftWorld implements World {
|
||||
@@ -1094,16 +1096,16 @@ public class CraftWorld implements World {
|
||||
|
||||
@Override
|
||||
public List<Entity> getEntities() {
|
||||
@@ -9338,7 +9338,7 @@ index 1a5ee34103..339ec053c7 100644
|
||||
list.add(bukkitEntity);
|
||||
}
|
||||
}
|
||||
@@ -1110,16 +1112,16 @@ public class CraftWorld implements World {
|
||||
@@ -1114,16 +1116,16 @@ public class CraftWorld implements World {
|
||||
|
||||
@Override
|
||||
public List<LivingEntity> getLivingEntities() {
|
||||
@@ -9358,7 +9358,7 @@ index 1a5ee34103..339ec053c7 100644
|
||||
list.add((LivingEntity) bukkitEntity);
|
||||
}
|
||||
}
|
||||
@@ -1140,7 +1142,7 @@ public class CraftWorld implements World {
|
||||
@@ -1144,7 +1146,7 @@ public class CraftWorld implements World {
|
||||
public <T extends Entity> Collection<T> getEntitiesByClass(Class<T> clazz) {
|
||||
Collection<T> list = new ArrayList<T>();
|
||||
|
||||
@@ -9367,7 +9367,7 @@ index 1a5ee34103..339ec053c7 100644
|
||||
if (entity instanceof net.minecraft.server.Entity) {
|
||||
if (((net.minecraft.server.Entity) entity).shouldBeRemoved) continue; // Paper
|
||||
Entity bukkitEntity = ((net.minecraft.server.Entity) entity).getBukkitEntity();
|
||||
@@ -1151,7 +1153,7 @@ public class CraftWorld implements World {
|
||||
@@ -1155,7 +1157,7 @@ public class CraftWorld implements World {
|
||||
|
||||
Class<?> bukkitClass = bukkitEntity.getClass();
|
||||
|
||||
@@ -9376,7 +9376,7 @@ index 1a5ee34103..339ec053c7 100644
|
||||
list.add((T) bukkitEntity);
|
||||
}
|
||||
}
|
||||
@@ -1164,7 +1166,7 @@ public class CraftWorld implements World {
|
||||
@@ -1168,7 +1170,7 @@ public class CraftWorld implements World {
|
||||
public Collection<Entity> getEntitiesByClasses(Class<?>... classes) {
|
||||
Collection<Entity> list = new ArrayList<Entity>();
|
||||
|
||||
@@ -9385,7 +9385,7 @@ index 1a5ee34103..339ec053c7 100644
|
||||
if (entity instanceof net.minecraft.server.Entity) {
|
||||
if (((net.minecraft.server.Entity) entity).shouldBeRemoved) continue; // Paper
|
||||
Entity bukkitEntity = ((net.minecraft.server.Entity) entity).getBukkitEntity();
|
||||
@@ -1177,7 +1179,7 @@ public class CraftWorld implements World {
|
||||
@@ -1181,7 +1183,7 @@ public class CraftWorld implements World {
|
||||
|
||||
for (Class<?> clazz : classes) {
|
||||
if (clazz.isAssignableFrom(bukkitClass)) {
|
||||
@@ -9394,7 +9394,7 @@ index 1a5ee34103..339ec053c7 100644
|
||||
list.add(bukkitEntity);
|
||||
}
|
||||
break;
|
||||
@@ -2454,10 +2456,43 @@ public class CraftWorld implements World {
|
||||
@@ -2467,10 +2469,43 @@ public class CraftWorld implements World {
|
||||
// Spigot start
|
||||
@Override
|
||||
public int getViewDistance() {
|
||||
|
||||
Reference in New Issue
Block a user