* Updated Upstream and Sidestream(s) (Paper/Tuinity/Airplane/Purpur/Empirecraft)

Upstream/An Sidestream has released updates that appears to apply and compile correctly
This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing.

Paper Changes:
fbae9dbe0 [Auto] Updated Upstream (Bukkit/CraftBukkit)
ac4a33aab [Auto] Updated Upstream (Bukkit)
c1e07158b [Auto] Updated Upstream (Bukkit/CraftBukkit)
5e4b88e95 Fix dangling sout
23afda179 basic hostname validation
0fb8bdf0e Updated Upstream (Bukkit/CraftBukkit) (#5508)
88ab784da [Auto] Updated Upstream (CraftBukkit)
ca7111d5f Fix PlayerItemConsumeEvent cancelling (fixes #4682) (#5383)
06fb560dc Add support for tab completing and highlighting console input from the Brigadier command tree (#5437)
0a9b89c7a Fix occasional light gen issues for neighbor blocks (#5500)
a08be1ec7 [Auto] Updated Upstream (CraftBukkit)

Tuinity Changes:
7d36676 Fix light source locking
f1ec0c2 Add concurrency check to ProtoChunk light sources
159d146 Improvements to chunk loader system

Airplane Changes:
3b3cde7 Correctly use DEAR values, fix config reloading
dd60919 Updated Upstream (Tuinity)

Purpur Changes:
5674cdc Updated Upstream (Paper)

Empirecraft Changes:
efda8c5b Updated Paper

* Updated Upstream and Sidestream(s) (Paper/Tuinity)

Upstream/An Sidestream has released updates that appears to apply and compile correctly
This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing.

Paper Changes:
39bf5b525 Update teams known as code owners

Tuinity Changes:
b12d0cc Replace ticket level propagator
42df8e1 Correctly handle recursion for chunkholder updates
73eb2a8 Do not copy visible chunks
8a4f3be Do not schedule poi task for each block write on chunk gen

* Multithreaded Entity Tracker fixup
This commit is contained in:
Simon Gardling 2021-04-21 17:26:49 -04:00 committed by GitHub
parent 939f275446
commit c1a03b89af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
110 changed files with 980 additions and 314 deletions

View File

@ -151,6 +151,7 @@ # Patches
| server | Consolidate flush calls for entity tracker packets | Spottedleaf | |
| server | Controllable Minecarts | William Blake Galbreath | |
| server | Copy passenger list in enderTeleportTo | Spottedleaf | |
| server | Correctly handle recursion for chunkholder updates | Spottedleaf | |
| server | Cows eat mushrooms | William Blake Galbreath | |
| server | Crying obsidian valid for portal frames | William Blake Galbreath | |
| server | Custom Locale Support | Zoe | |
@ -169,10 +170,12 @@ # Patches
| server | Distance manager tick timings | Spottedleaf | |
| server | Do not allow the server to unload chunks at request of | Spottedleaf | |
| server | Do not allow ticket level changes while unloading | Spottedleaf | |
| server | Do not copy visible chunks | Spottedleaf | |
| server | Do not load chunks during a crash report | Spottedleaf | |
| server | Do not retain playerchunkmap instance in light thread factory | Spottedleaf | |
| server | Do not run close logic for inventories on chunk unload | Spottedleaf | |
| server | Do not run raytrace logic for AIR | Spottedleaf | |
| server | Do not schedule poi task for each block write on chunk gen | Spottedleaf | |
| server | Do not update TE's in generating chunks | Spottedleaf | |
| server | Don't allow StructureLocateEvent to change worlds | Spottedleaf | |
| server | Don't get entity equipment if not needed | Paul Sauve | |
@ -279,6 +282,7 @@ # Patches
| server | Movement options for armor stands | Mariell Hoversholm | |
| server | Multi-Threaded Server Ticking Vanilla | Spottedleaf | |
| server | Multi-Threaded ticking CraftBukkit | Spottedleaf | |
| server | Multithreaded Entity Tracker fixup | Simon Gardling | |
| server | Multithreaded entity tracking | Paul Sauve | |
| server | Name craft scheduler threads according to the plugin using | Spottedleaf | |
| server | New nbt cache | Hugo Planque | ishland |
@ -362,6 +366,7 @@ # Patches
| server | Remove streams | Paul Sauve | |
| server | Remove streams for villager AI | Spottedleaf | |
| server | Replace player chunk loader system | Spottedleaf | |
| server | Replace ticket level propagator | Spottedleaf | |
| server | Revert MC-4 fix | Spottedleaf | |
| server | Revert getChunkAt(Async) retaining chunks for long periods of | Spottedleaf | |
| server | Rework PlayerChunk main thread checks | Spottedleaf | |

2
Paper

@ -1 +1 @@
Subproject commit 606cdac609441c2234ca30f0abb99eb98521a4c0
Subproject commit 39bf5b525d819e50a18a241f3ebaf388a571619c

View File

@ -53,6 +53,7 @@ subprojects {
maven("https://nexus.velocitypowered.com/repository/velocity-artifacts-snapshots/")
maven("https://libraries.minecraft.net")
maven("https://repo.codemc.io/repository/maven-public/")
maven("https://jitpack.io")
mavenLocal()
maven("${rootProjectDir}/.repository")
}

View File

@ -72,10 +72,10 @@ index 7063f1da3654b382e26b0093ad5d0ff04a2b38c2..b9c5479e5561f8fe68ea8f94fbf4e64d
return history != null ? TextComponent.ofChildren(updateMessage, Component.newline(), history) : updateMessage;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 02d8a8f13d81c47316f704fb700afd0214a5f546..ca10d901ebd56bdee54f3c8cf607a5a34cd79f32 100644
index 7b0b416c73c8914f3c8c570f2020490ef2babf64..246fcc9b40152964810ceef356ecb2eee3551135 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1636,7 +1636,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1646,7 +1646,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
public String getServerModName() {

View File

@ -55,7 +55,7 @@ index cc566784c7dd21cc2c44e0f351347f657e57ddcf..e9e7fcf2b63febe2a7d055826fabb86b
return d0 == 0.0D ? 0 : (d0 > 0.0D ? 1 : -1);
}
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index d933323d57a2a7ff283408f12d4650699f8177e7..d1afe52dfd2da1d168a62aa339b48fb044e7ff50 100644
index 96cc46a26eef701b0579f3407e67af9176e1743b..5c7ce20609a1c18687696581a76f21a1b182ea7c 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -111,6 +111,7 @@ import net.minecraft.world.phys.AxisAlignedBB;

View File

@ -23,7 +23,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index fcf9af44702f34d75185eee0b3259fe0e57001b1..c2711c2d5405a5ddcf99ce7a4fbc997b403bd2f2 100644
index e3481eb71972c82edd892a99d1136c8248fb0f8c..9e71e6c331c60d55220399cee4381367113f596a 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -1212,7 +1212,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {

View File

@ -46,7 +46,7 @@ index fe040615ff03478a20cdf8376f89a6b7d100ba61..207a9c3928aad7c6e89a120b54d87e00
boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index c2711c2d5405a5ddcf99ce7a4fbc997b403bd2f2..78443d5bf8f1f297cf68a88d8caf8e8abc9cdba7 100644
index 9e71e6c331c60d55220399cee4381367113f596a..ab1cf52d7faa93feba9dd2efd9479b2d72771778 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -1202,6 +1202,8 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@ -77,7 +77,7 @@ index c2711c2d5405a5ddcf99ce7a4fbc997b403bd2f2..78443d5bf8f1f297cf68a88d8caf8e8a
// Tuinity start - optimise chunk ice snow ticking
BiomeBase[] biomeCache = this.biomeBaseCache;
diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
index df35ae12ecbe88ab396bed9850ef80433ff42fd4..7474c070598bc093e06f02f19d49f3a6fa6b3d4e 100644
index fc07e2014e961da5d97095c4ee6f972e2ece3ec3..8f5809756b4fb358f1207c1d61c5cbe6df3fff00 100644
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
@@ -99,6 +99,18 @@ public class Chunk implements IChunkAccess {

View File

@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index d1afe52dfd2da1d168a62aa339b48fb044e7ff50..5c983a441cd2a06eae6e79bc07ba5440d294574b 100644
index 5c7ce20609a1c18687696581a76f21a1b182ea7c..74f80b6af18c0b91d9613384ca6bafd9c89f23a4 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -910,11 +910,13 @@ public abstract class EntityLiving extends Entity {

View File

@ -27,37 +27,43 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/src/main/java/gg/airplane/AirplaneConfig.java b/src/main/java/gg/airplane/AirplaneConfig.java
index ab019b577002677a4ce788106f8e5a1d7757a2ae..946e476e1ca8c3ced119c64a05643c8c64760724 100644
index ab019b577002677a4ce788106f8e5a1d7757a2ae..0e452ea9c5d098326d22a20aa67e423f85843db7 100644
--- a/src/main/java/gg/airplane/AirplaneConfig.java
+++ b/src/main/java/gg/airplane/AirplaneConfig.java
@@ -47,4 +47,30 @@ public class AirplaneConfig {
@@ -47,4 +47,36 @@ public class AirplaneConfig {
}
}
+
+ public static int maximumActivationPrio = 20;
+ public static int activationDistanceMod = 9;
+ public static boolean dynamicVillagerBehavior = true;
+ public static boolean dynamicPiglinBehavior = true;
+ public static boolean dynamicHoglinBehavior = true;
+ public static int startDistance;
+ public static int startDistanceSquared;
+ public static int maximumActivationPrio;
+ public static int activationDistanceMod;
+ public static boolean dynamicVillagerBehavior;
+ public static boolean dynamicPiglinBehavior;
+ public static boolean dynamicHoglinBehavior;
+
+ private static void dynamicActivationRange() {
+ config.setComment("activation-range", "Optimizes how entities act when", "they're far away from the player");
+
+ maximumActivationPrio = config.getInt("activation-range.max-tick-freq", maximumActivationPrio,
+ startDistance = config.getInt("activation-range.start-distance", 12,
+ "This value determines how far away an entity has to be",
+ "from the player to start being effected by DEAR.");
+ startDistanceSquared = startDistance * startDistance;
+ maximumActivationPrio = config.getInt("activation-range.max-tick-freq", 20,
+ "This value defines how often in ticks, the furthest entity",
+ "will get their pathfinders and behaviors ticked. 20 = 1s");
+ activationDistanceMod = config.getInt("activation-range.activation-dist-mod", activationDistanceMod,
+ activationDistanceMod = config.getInt("activation-range.activation-dist-mod", 8,
+ "This value defines how much distance modifies an entity's",
+ "tick frequency. freq = (distanceToPlayer^2) / (2^value)",
+ "If you want further away entities to tick less often, use 8.",
+ "If you want further away entities to tick more often, try 10.");
+ "If you want further away entities to tick less often, use 7.",
+ "If you want further away entities to tick more often, try 9.");
+
+ config.setComment("behavior-activation", "A list of entities to use the dynamic activation range", "to modify how often their behaviors are ticked");
+
+ dynamicVillagerBehavior = config.getBoolean("behavior-activation.villager", dynamicVillagerBehavior);
+ dynamicPiglinBehavior = config.getBoolean("behavior-activation.piglin", dynamicPiglinBehavior);
+ dynamicHoglinBehavior = config.getBoolean("behavior-activation.hoglin", dynamicHoglinBehavior);
+ dynamicVillagerBehavior = config.getBoolean("behavior-activation.villager", true);
+ dynamicPiglinBehavior = config.getBoolean("behavior-activation.piglin", true);
+ dynamicHoglinBehavior = config.getBoolean("behavior-activation.hoglin", true);
+ }
+
}
@ -105,7 +111,7 @@ index aae13c2e6c2a30b69c33417932c6a4d0aefeb7f5..f4440a5c4aedb1d7d303517f86a07c85
this.world.getMethodProfiler().exit();
this.world.getMethodProfiler().enter("navigation");
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java
index 637928664f8c7b1c694a234e507c20724294e450..f303c5d6b2e55fc9fd8b49ec21121805e7351034 100644
index 637928664f8c7b1c694a234e507c20724294e450..02e8288473138dcea008d6157318758e8d7ee3be 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java
@@ -44,9 +44,14 @@ public class PathfinderGoalSelector {
@ -116,7 +122,7 @@ index 637928664f8c7b1c694a234e507c20724294e450..f303c5d6b2e55fc9fd8b49ec21121805
- incRate();
- return getCurRate() % getTickRate() == 0;
+ public boolean inactiveTick(int tickRate) { // Airplane - take tick rate
+ tickRate = Math.max(tickRate, getTickRate()); // Airplane
+ tickRate = Math.min(tickRate, getTickRate()); // Airplane
+ if (this.curRate++ % tickRate != 0) { // Airplane - use tick rate / increment curRate every tick
+ //incRate();
+ return false;
@ -194,7 +200,7 @@ index 2d0b83923d58cc7b6918b4e2ff2bece13ca26899..d8028675fc82883d716bcfb44431ca6a
if (this.bF) {
this.bF = false;
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 5c2eaca0bc63c7880ee928aba6a24761737aa649..6c4c4580faef39e48de5af4db003cf2e3b8a99b5 100644
index 5c2eaca0bc63c7880ee928aba6a24761737aa649..8b36ca5062f8e0e8bd58aa506e91704a747de81b 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -47,6 +47,9 @@ import net.minecraft.world.entity.schedule.Activity;
@ -225,23 +231,19 @@ index 5c2eaca0bc63c7880ee928aba6a24761737aa649..6c4c4580faef39e48de5af4db003cf2e
{
// Paper start
Entity[] rawData = chunk.entities.getRawData();
@@ -249,11 +252,19 @@ public class ActivationRange
@@ -249,6 +252,15 @@ public class ActivationRange
//for ( Entity entity : (Collection<Entity>) slice )
// Paper end
{
+ // Airplane start
+ Vec3D entityVec = entity.getPositionVector();
+ double diffX = playerVec.x - entityVec.x, diffY = playerVec.y - entityVec.y, diffZ = playerVec.z - entityVec.z;
+ int priority = Math.max(1, (int) (diffX * diffX + diffY * diffY + diffZ * diffZ) >> gg.airplane.AirplaneConfig.activationDistanceMod);
+ int squaredDistance = (int) (diffX * diffX + diffY * diffY + diffZ * diffZ);
+ entity.activatedPriority = squaredDistance > gg.airplane.AirplaneConfig.startDistanceSquared ?
+ Math.max(1, Math.min(squaredDistance >> gg.airplane.AirplaneConfig.activationDistanceMod, gg.airplane.AirplaneConfig.maximumActivationPrio)) :
+ 1;
+ // Airplane end
+
if (MinecraftServer.currentTick > entity.activatedTick) {
if (entity.defaultActivationState || entity.activationType.boundingBox.c(entity.getBoundingBox())) { // Paper
entity.activatedTick = MinecraftServer.currentTick;
}
+ entity.activatedPriority = Math.min(gg.airplane.AirplaneConfig.maximumActivationPrio, priority);
+ } else {
+ entity.activatedPriority = Math.min(gg.airplane.AirplaneConfig.maximumActivationPrio, Math.min(priority, entity.activatedPriority));
}
+ // Airplane end
}
}
}

View File

@ -20,10 +20,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/pom.xml b/pom.xml
index a148af69be216d2869538d402d9a0d12c81b5df6..8a73569a4927e046940e5c12ad75ab071ea8aa91 100644
index a148af69be216d2869538d402d9a0d12c81b5df6..c917f825378dd16a329105b4e7fcc8882755bc5a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -173,8 +173,23 @@
@@ -173,6 +173,13 @@
<version>fe3dbb4420</version>
<scope>compile</scope>
</dependency>
@ -36,36 +36,26 @@ index a148af69be216d2869538d402d9a0d12c81b5df6..8a73569a4927e046940e5c12ad75ab07
+ </dependency>
</dependencies>
+ <repositories>
+ <!-- Airplane - Flare -->
+ <repository>
+ <id>jitpack.io</id>
+ <url>https://jitpack.io</url>
+ </repository>
+ </repositories>
+
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
<build>
<finalName>tuinity-${minecraft.version}</finalName>
diff --git a/src/main/java/gg/airplane/AirplaneConfig.java b/src/main/java/gg/airplane/AirplaneConfig.java
index 946e476e1ca8c3ced119c64a05643c8c64760724..a77e628518920e84b03a8a00e1308a9a53a00896 100644
index 0e452ea9c5d098326d22a20aa67e423f85843db7..7ec84ef1d1cbb1fabf4c590a2f2c1da3cc181010 100644
--- a/src/main/java/gg/airplane/AirplaneConfig.java
+++ b/src/main/java/gg/airplane/AirplaneConfig.java
@@ -73,4 +73,27 @@ public class AirplaneConfig {
dynamicHoglinBehavior = config.getBoolean("behavior-activation.hoglin", dynamicHoglinBehavior);
@@ -79,4 +79,27 @@ public class AirplaneConfig {
dynamicHoglinBehavior = config.getBoolean("behavior-activation.hoglin", true);
}
+
+ public static String profileWebUrl = "https://flare.airplane.gg";
+ public static String profileWebUrl;
+
+ private static void profilerOptions() {
+ config.setComment("flare", "Configures Flare, the built-in profiler");
+
+ profileWebUrl = config.getString("flare.url", profileWebUrl, "Sets the server to use for profiles.");
+ profileWebUrl = config.getString("flare.url", "https://flare.airplane.gg", "Sets the server to use for profiles.");
+ }
+
+
+ public static String accessToken = "";
+ public static String accessToken;
+
+ private static void airplaneWebServices() {
+ config.setComment("web-services", "Options for connecting to Airplane's online utilities");

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Reduce entity chunk ticking checks from 3 to 1
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index 78443d5bf8f1f297cf68a88d8caf8e8abc9cdba7..10dcb8066493ddb2895e60f5d8d6f241c5f474fa 100644
index ab1cf52d7faa93feba9dd2efd9479b2d72771778..e2bfb1423f6b24514cf7ea364be8bf5f554e0a5f 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -1083,11 +1083,12 @@ public class WorldServer extends World implements GeneratorAccessSeed {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Disable the Snooper
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 16c20b3e7dcbbdb08e8c2a15074495eacc001e70..f31b49381d1a70f66406dc6d048f84b45257c860 100644
index 5e2c7f3bf9aa99b10260454b9957caff81a7cd26..7fa91a3cb0d48396d106a4a729533f95e91562c0 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1440,6 +1440,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1450,6 +1450,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
//} // Paper
this.methodProfiler.enter("snooper");
@ -17,7 +17,7 @@ index 16c20b3e7dcbbdb08e8c2a15074495eacc001e70..f31b49381d1a70f66406dc6d048f84b4
if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.ticks > 100) { // Spigot
this.snooper.a();
}
@@ -1447,6 +1449,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1457,6 +1459,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && this.ticks % 6000 == 0) { // Spigot
this.snooper.b();
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Don't wake up entities when damage event is cancelled
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 82d3aaaf9bbb493d54f6bf2d34edafc5498aee88..59ba2332cd250c3bfff7505cd02be346ae0f38c7 100644
index be709c961cd85c1db32fb49c71c63814cbe6bd23..890326cf415a7c5b0d62e9597895d3060ba12d7a 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -1214,9 +1214,12 @@ public abstract class EntityLiving extends Entity {

View File

@ -661,7 +661,7 @@ index d1757f3d456ff9efce26ce8baa1d16d896908cc2..a5db52386e11e4b5511ae417a0e7ac92
TASK(ChatColor.GREEN),
CHALLENGE(ChatColor.DARK_PURPLE),
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
index 85ff6ce3bf75ab78f066a508d130def5913fff0e..c1f9114d1c0ac3457461c9326420a4afc00ce970 100644
index 08e6f1741685f54506c8a4ff29bbd30f62cf8e45..8efd2669bd5e3dfa47ff8fcb858333210eb5c201 100644
--- a/src/main/java/org/bukkit/block/Block.java
+++ b/src/main/java/org/bukkit/block/Block.java
@@ -183,6 +183,9 @@ public interface Block extends Metadatable {
@ -1045,17 +1045,19 @@ index 9a99b8ca1ec9c3c88b29275c88b1221e1b22bcef..f1763f75d5f223ef70b968e463361673
/**
diff --git a/src/main/java/org/bukkit/entity/Shulker.java b/src/main/java/org/bukkit/entity/Shulker.java
index 3441bdb7fcb99dab67bfe9dad5ed989009e443ad..52927a7d84a2bfcae04526f38bf5efd75b3459bb 100644
index 274d6131c893630dbc5e22aa2684d89e5a2c6c72..4507fa13689cd393f41c9f0c4a73362491f34c76 100644
--- a/src/main/java/org/bukkit/entity/Shulker.java
+++ b/src/main/java/org/bukkit/entity/Shulker.java
@@ -2,4 +2,7 @@ package org.bukkit.entity;
@@ -2,6 +2,9 @@ package org.bukkit.entity;
import org.bukkit.material.Colorable;
+/**
+ * Represents a shulker
+ */
public interface Shulker extends Golem, Colorable {}
public interface Shulker extends Golem, Colorable {
/**
diff --git a/src/main/java/org/bukkit/entity/ShulkerBullet.java b/src/main/java/org/bukkit/entity/ShulkerBullet.java
index 4623e0d767b343cbdc6fcf20b3b2ff7ff14863cf..ca3f98a8272bab3c9f57f59b077b206c6503de80 100644
--- a/src/main/java/org/bukkit/entity/ShulkerBullet.java

View File

@ -42,10 +42,10 @@ index be408aebbccbda46e8aa82ef337574137cfa0096..739839314fd8a88b5fca8b9678e1df07
private final boolean threadRestricted;
diff --git a/src/main/java/gg/airplane/AirplaneConfig.java b/src/main/java/gg/airplane/AirplaneConfig.java
index a77e628518920e84b03a8a00e1308a9a53a00896..5a20ad857b7c550281000e8d94dac78d72591f31 100644
index 7ec84ef1d1cbb1fabf4c590a2f2c1da3cc181010..b9118cc08ac38e0813d0677700d3d7dcf9b74159 100644
--- a/src/main/java/gg/airplane/AirplaneConfig.java
+++ b/src/main/java/gg/airplane/AirplaneConfig.java
@@ -96,4 +96,17 @@ public class AirplaneConfig {
@@ -102,4 +102,17 @@ public class AirplaneConfig {
}
@ -316,12 +316,12 @@ index 67ca28463f5add7c18f7f16b918c3f36f8feeeda..37e64e24ca3a90370cdf12e5ff9cd1fc
if (this.tracker instanceof EntityPlayer) {
((EntityPlayer) this.tracker).playerConnection.sendPacket(packet);
diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
index d7eede51f1c4ebbe8e00b16efd6331c87db53bb4..585dbb250d975d2e9c34af26b9d5927ce734b407 100644
index b28995ecfd7f45e6b6197be96c418aa0d05d3383..bb5ebacf99238223b84f3663af3ab9c6c60332eb 100644
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
@@ -785,6 +785,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
return (PlayerChunk) (this.hasPendingVisibleUpdate ? this.pendingVisibleChunks.get(i) : ((ProtectedVisibleChunksMap)this.visibleChunks).safeGet(i));
// Paper end
@@ -763,6 +763,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
return this.updatingChunks.getVisibleAsync(i);
// Tuinity end - Don't copy
}
+ // Airplane start - since neither map can be updated during tracker tick, it's safe to allow direct retrieval here
+ private PlayerChunk trackerGetVisibleChunk(long i) {
@ -331,7 +331,7 @@ index d7eede51f1c4ebbe8e00b16efd6331c87db53bb4..585dbb250d975d2e9c34af26b9d5927c
protected final IntSupplier getPrioritySupplier(long i) { return c(i); } // Paper - OBFHELPER
protected IntSupplier c(long i) {
@@ -2188,10 +2193,30 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -2158,10 +2163,30 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
entity.tracker = null; // Paper - We're no longer tracked
}
@ -362,7 +362,7 @@ index d7eede51f1c4ebbe8e00b16efd6331c87db53bb4..585dbb250d975d2e9c34af26b9d5927c
com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet.Iterator<Chunk> iterator = this.world.getChunkProvider().entityTickingChunks.iterator();
try {
while (iterator.hasNext()) {
@@ -2457,7 +2482,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
@@ -2427,7 +2452,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
public class EntityTracker {
final EntityTrackerEntry trackerEntry; // Paper - private -> package private
@ -371,7 +371,7 @@ index d7eede51f1c4ebbe8e00b16efd6331c87db53bb4..585dbb250d975d2e9c34af26b9d5927c
private final int trackingDistance;
private SectionPosition e;
// Paper start
@@ -2476,7 +2501,9 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
@@ -2446,7 +2471,9 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
// Paper start - use distance map to optimise tracker
com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<EntityPlayer> lastTrackerCandidates;
@ -382,7 +382,7 @@ index d7eede51f1c4ebbe8e00b16efd6331c87db53bb4..585dbb250d975d2e9c34af26b9d5927c
com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<EntityPlayer> oldTrackerCandidates = this.lastTrackerCandidates;
this.lastTrackerCandidates = newTrackerCandidates;
@@ -2517,7 +2544,13 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
@@ -2487,7 +2514,13 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
return this.tracker.getId();
}
@ -397,7 +397,7 @@ index d7eede51f1c4ebbe8e00b16efd6331c87db53bb4..585dbb250d975d2e9c34af26b9d5927c
Iterator iterator = this.trackedPlayers.iterator();
while (iterator.hasNext()) {
@@ -2529,6 +2562,12 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
@@ -2499,6 +2532,12 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
}
public void broadcastIncludingSelf(Packet<?> packet) {
@ -410,7 +410,7 @@ index d7eede51f1c4ebbe8e00b16efd6331c87db53bb4..585dbb250d975d2e9c34af26b9d5927c
this.broadcast(packet);
if (this.tracker instanceof EntityPlayer) {
((EntityPlayer) this.tracker).playerConnection.sendPacket(packet);
@@ -2555,8 +2594,8 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
@@ -2525,8 +2564,8 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
}
@ -421,7 +421,7 @@ index d7eede51f1c4ebbe8e00b16efd6331c87db53bb4..585dbb250d975d2e9c34af26b9d5927c
if (entityplayer != this.tracker) {
// Paper start - remove allocation of Vec3D here
//Vec3D vec3d = entityplayer.getPositionVector().d(this.tracker.getPositionVector()); // MC-155077, SPIGOT-5113
@@ -2572,7 +2611,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
@@ -2542,7 +2581,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
if (!flag1) {
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(this.tracker.chunkX, this.tracker.chunkZ);
@ -431,7 +431,7 @@ index d7eede51f1c4ebbe8e00b16efd6331c87db53bb4..585dbb250d975d2e9c34af26b9d5927c
if (playerchunk != null && playerchunk.getSendingChunk() != null && PlayerChunkMap.this.playerChunkManager.isChunkSent(entityplayer, MathHelper.floor(this.tracker.locX()) >> 4, MathHelper.floor(this.tracker.locZ()) >> 4)) { // Paper - no-tick view distance // Tuinity - don't broadcast in chunks the player hasn't received
flag1 = PlayerChunkMap.b(chunkcoordintpair, entityplayer, false) <= PlayerChunkMap.this.viewDistance;
diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
index 7474c070598bc093e06f02f19d49f3a6fa6b3d4e..c07fb5ca761c0f2067bd103026ded618a8620947 100644
index 8f5809756b4fb358f1207c1d61c5cbe6df3fff00..2e8eb0bb8fb4f7ce6b92fe01a81327da30e614ae 100644
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
@@ -111,6 +111,26 @@ public class Chunk implements IChunkAccess {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Rebrand
diff --git a/pom.xml b/pom.xml
index 8a73569a4927e046940e5c12ad75ab071ea8aa91..cea712b94bb32ccda2895670859839d660bd0748 100644
index c917f825378dd16a329105b4e7fcc8882755bc5a..6fe8dad8df109531f2b38fbfcb58b6807dbb8cf0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,8 +39,10 @@
@ -21,9 +21,9 @@ index 8a73569a4927e046940e5c12ad75ab071ea8aa91..cea712b94bb32ccda2895670859839d6
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
@@ -190,6 +192,14 @@
</repository>
</repositories>
@@ -182,6 +184,14 @@
</dependency>
</dependencies>
+ <repositories>
+ <!-- Purpur - Snapshots -->
@ -36,7 +36,7 @@ index 8a73569a4927e046940e5c12ad75ab071ea8aa91..cea712b94bb32ccda2895670859839d6
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
<build>
<finalName>tuinity-${minecraft.version}</finalName>
@@ -369,8 +379,15 @@
@@ -361,8 +371,15 @@
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>ecj</artifactId>
@ -54,18 +54,18 @@ index 8a73569a4927e046940e5c12ad75ab071ea8aa91..cea712b94bb32ccda2895670859839d6
</plugin>
<plugin>
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
index 89eeb9d202405747409e65fcf226d95379987e29..4d9e685c691a37078ff7452e50ab8c13999dbe10 100644
index ad87b575a0261200b280884e054a59e3ce59c41c..e56ebeaaa12494817d31099eed54ef2c50b98b9e 100644
--- a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
+++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
@@ -17,7 +17,7 @@ public final class PaperConsole extends SimpleTerminalConsole {
@@ -19,7 +19,7 @@ public final class PaperConsole extends SimpleTerminalConsole {
@Override
protected LineReader buildReader(LineReaderBuilder builder) {
return super.buildReader(builder
builder
- .appName("Paper")
+ .appName("Purpur") // Purpur
.variable(LineReader.HISTORY_FILE, java.nio.file.Paths.get(".console_history"))
.completer(new ConsoleCommandCompleter(this.server))
);
.option(LineReader.Option.COMPLETE_IN_WORD, true);
diff --git a/src/main/java/gg/airplane/compat/ServerConfigurations.java b/src/main/java/gg/airplane/compat/ServerConfigurations.java
index f4976428bc721319d2926e97cbe0f64c6e9e503c..044ad28bd1fd1c1e25061f9f811fc10baf7f5f72 100644
--- a/src/main/java/gg/airplane/compat/ServerConfigurations.java
@ -92,10 +92,10 @@ index 3bc5cd1e53dd7c94b948e7f57f0dc8e073e349b0..87891161f5b06bb8be0e2016b490484e
throwable = throwable1;
throw throwable1;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index ca10d901ebd56bdee54f3c8cf607a5a34cd79f32..4f602f0448585b95b8b2b05006f0fa9f9c57ba43 100644
index 246fcc9b40152964810ceef356ecb2eee3551135..8620bbcc7c555e4760777397063f0392c9acc35e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1636,7 +1636,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1646,7 +1646,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
public String getServerModName() {

View File

@ -29,7 +29,7 @@ index b480bd3044370b8eb733166f0c4b737344475993..4d8740678049aa749b42618470e9cc83
metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> {
Map<String, Map<String, Integer>> map = new HashMap<>();
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index c56e7fb18f9a56c8025eb70a524f028b5942da37..4b9fdb4f04b333ce32f7fca8f279bf989e6fd728 100644
index efc1e42d606e1c9feb1a4871c0714933ae92a1b2..a0ed8ed1d6b89a4f10dff645e09eaff303fb3f8a 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -118,6 +118,11 @@ public class PaperConfig {

View File

@ -64,7 +64,7 @@ index fd6dbbf619b828c4ef3d00f8dc30d3893007db7b..7e388dcca2d4e78b49d5fc5fce0b962e
return this.serverStatisticManager;
}
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index 10dcb8066493ddb2895e60f5d8d6f241c5f474fa..368aadca86f3775eabe8cf7ec76b7305a6871bd5 100644
index e2bfb1423f6b24514cf7ea364be8bf5f554e0a5f..18d70aff974d756a62a8f9f0e6c52f89ef1fa2c8 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -1002,7 +1002,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@ -86,10 +86,10 @@ index 10dcb8066493ddb2895e60f5d8d6f241c5f474fa..368aadca86f3775eabe8cf7ec76b7305
} else if (entityplayer.isSleeping()) {
++j;
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index 83ad913e46f44aabb41b7e441cba2ef2f7bcbc46..400d682a3b314705501cd652593317e8fe096db7 100644
index 80b77cdffd64690bb9066b8745ea0ee08d60a7a4..e58bbd4c1b59293ddf58d0f7cf37a629f5cc96d6 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -397,6 +397,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -399,6 +399,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
if (this.player.F() > 0L && this.minecraftServer.getIdleTimeout() > 0 && SystemUtils.getMonotonicMillis() - this.player.F() > (long) (this.minecraftServer.getIdleTimeout() * 1000 * 60)) {
@ -102,7 +102,7 @@ index 83ad913e46f44aabb41b7e441cba2ef2f7bcbc46..400d682a3b314705501cd652593317e8
this.player.resetIdleTimer(); // CraftBukkit - SPIGOT-854
this.disconnect(new ChatMessage("multiplayer.disconnect.idling"));
}
@@ -672,6 +678,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -674,6 +680,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
this.lastYaw = to.getYaw();
this.lastPitch = to.getPitch();
@ -111,7 +111,7 @@ index 83ad913e46f44aabb41b7e441cba2ef2f7bcbc46..400d682a3b314705501cd652593317e8
// Skip the first time we do this
if (true) { // Spigot - don't skip any move events
Location oldTo = to.clone();
@@ -1414,7 +1422,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1416,7 +1424,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
if (!this.player.H() && d11 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative() && this.player.playerInteractManager.getGameMode() != EnumGamemode.SPECTATOR) { // Spigot
flag1 = true; // Tuinity - diff on change, this should be moved wrongly
@ -120,7 +120,7 @@ index 83ad913e46f44aabb41b7e441cba2ef2f7bcbc46..400d682a3b314705501cd652593317e8
}
this.player.setLocation(d4, d5, d6, f, f1);
@@ -1464,6 +1472,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1466,6 +1474,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
this.lastYaw = to.getYaw();
this.lastPitch = to.getPitch();
@ -289,7 +289,7 @@ index 45e786565ac988abadffda2e7ba3ff1e2880b786..f4052aaa2235894b996d65c569a083f1
+ // Purpur end
}
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 6c4c4580faef39e48de5af4db003cf2e3b8a99b5..dc2d880ded328f8377c207ce15f604ec5c25176c 100644
index 8b36ca5062f8e0e8bd58aa506e91704a747de81b..c94cd5a95f28190e88d31b522035fc7c74a2ac33 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -207,6 +207,7 @@ public class ActivationRange

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable server mod name
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 4f602f0448585b95b8b2b05006f0fa9f9c57ba43..ccccd3fffb9027469d545f586b15c045b5698b63 100644
index 8620bbcc7c555e4760777397063f0392c9acc35e..83b98a18a8b726621068b5fd2bed046852dccf2d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1636,7 +1636,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1646,7 +1646,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
public String getServerModName() {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] LivingEntity safeFallDistance
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 5c983a441cd2a06eae6e79bc07ba5440d294574b..b987cee913bf909fa0daa6280376838e9429fe5d 100644
index 74f80b6af18c0b91d9613384ca6bafd9c89f23a4..2777bd3ea82b214fc15c5ce3ce47c90c1e5fe538 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -228,6 +228,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Lagging threshold
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index ccccd3fffb9027469d545f586b15c045b5698b63..22ca3082fff5a630fe7d6a5ec1e70f5675a5a8bc 100644
index 83b98a18a8b726621068b5fd2bed046852dccf2d..a75a8322829f36045243d5fd61d28b126af1f0af 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -279,6 +279,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -16,7 +16,7 @@ index ccccd3fffb9027469d545f586b15c045b5698b63..22ca3082fff5a630fe7d6a5ec1e70f56
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
// Spigot end
@@ -1104,6 +1105,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1114,6 +1115,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
recentTps[1] = tps5.getAverage();
recentTps[2] = tps15.getAverage();
// Paper end

View File

@ -67,10 +67,10 @@ index 7e388dcca2d4e78b49d5fc5fce0b962e74839fa3..e875671ce985199bc37de131280935a8
public Scoreboard getScoreboard() {
return getBukkitEntity().getScoreboard().getHandle();
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index 400d682a3b314705501cd652593317e8fe096db7..f1ebb59f328bffa80a5b9b6504535e711c1d5c9b 100644
index e58bbd4c1b59293ddf58d0f7cf37a629f5cc96d6..7955d1d8cbb836be55d194d66152eb49fee27e49 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -1894,6 +1894,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1896,6 +1896,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
PlayerConnectionUtils.ensureMainThread(packetplayinresourcepackstatus, this, this.player.getWorldServer());
// Paper start
PlayerResourcePackStatusEvent.Status packStatus = PlayerResourcePackStatusEvent.Status.values()[packetplayinresourcepackstatus.status.ordinal()];

View File

@ -17,10 +17,10 @@ index b4c37287362907b8507d156b978ba5b9d961bb7b..9e6e6636539702507abb78515e002819
return this.a;
}
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index f1ebb59f328bffa80a5b9b6504535e711c1d5c9b..ac36ca9251e3acb663c62ad7af05bfaf2fd68f5c 100644
index 7955d1d8cbb836be55d194d66152eb49fee27e49..1e7ae4a3947f2714159a6b93ef7d79541a6e070d 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -231,6 +231,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -233,6 +233,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
private long lastKeepAlive = SystemUtils.getMonotonicMillis(); private void setLastPing(long lastPing) { this.lastKeepAlive = lastPing;}; private long getLastPing() { return this.lastKeepAlive;}; // Paper - OBFHELPER
private boolean awaitingKeepAlive; private void setPendingPing(boolean isPending) { this.awaitingKeepAlive = isPending;}; private boolean isPendingPing() { return this.awaitingKeepAlive;}; // Paper - OBFHELPER
private long h; private void setKeepAliveID(long keepAliveID) { this.h = keepAliveID;}; private long getKeepAliveID() {return this.h; }; // Paper - OBFHELPER
@ -28,7 +28,7 @@ index f1ebb59f328bffa80a5b9b6504535e711c1d5c9b..ac36ca9251e3acb663c62ad7af05bfaf
// CraftBukkit start - multithreaded fields
private volatile int chatThrottle;
private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle");
@@ -365,6 +366,21 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -367,6 +368,21 @@ public class PlayerConnection implements PacketListenerPlayIn {
long currentTime = SystemUtils.getMonotonicMillis();
long elapsedTime = currentTime - this.getLastPing();
@ -50,7 +50,7 @@ index f1ebb59f328bffa80a5b9b6504535e711c1d5c9b..ac36ca9251e3acb663c62ad7af05bfaf
if (this.isPendingPing()) {
if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected
PlayerConnection.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getName()); // more info
@@ -3065,6 +3081,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -3078,6 +3094,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
@Override
public void a(PacketPlayInKeepAlive packetplayinkeepalive) {

View File

@ -38,7 +38,7 @@ index f4440a5c4aedb1d7d303517f86a07c856dd1309b..7443fe924486404931c11793acc67e2f
float f = difficultydamagescaler.d();
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index b987cee913bf909fa0daa6280376838e9429fe5d..7720cf9dcbc5a9680c68f47aef08ff1c3b154022 100644
index 2777bd3ea82b214fc15c5ce3ce47c90c1e5fe538..f5bc04059c24f57530653c8845cfe4daa5fed843 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -261,6 +261,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Zombie horse naturally spawn
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index 368aadca86f3775eabe8cf7ec76b7305a6871bd5..446dc23e9b16314b80767ce12b82f993f48824f6 100644
index 18d70aff974d756a62a8f9f0e6c52f89ef1fa2c8..c49b049351c36878238e65eb9cbf949a682e4a7d 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -96,6 +96,7 @@ import net.minecraft.world.entity.ai.village.poi.VillagePlace;

View File

@ -17,7 +17,7 @@ index b7c72eaf5715a30bb8f82891f9830f9f62ec03c9..c8071e2909c03bd8eafb92fbf8fd8701
this.setPositionRotation(entity.locX(), entity.locY(), entity.locZ(), entity.yaw, entity.pitch);
}
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 7720cf9dcbc5a9680c68f47aef08ff1c3b154022..ee42f3d97c3453bacfe0be40ee99f08649d44acf 100644
index f5bc04059c24f57530653c8845cfe4daa5fed843..5cdefe2a1b4085e3aae7dbbb751cfd368593ebd7 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -176,7 +176,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -17,10 +17,10 @@ index e875671ce985199bc37de131280935a859253954..ba71636527f173dfc5ddae9ef0f7c73d
this.playerConnection.sendPacket(new PacketPlayOutOpenSignEditor(tileentitysign.getPosition()));
}
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index ac36ca9251e3acb663c62ad7af05bfaf2fd68f5c..f45bbf7a4ab4d841a12270c1399fb09538b9fe90 100644
index 1e7ae4a3947f2714159a6b93ef7d79541a6e070d..d2896d49b4b3cb0a6cf64ee29233ff59b8fba45d 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -3059,6 +3059,15 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -3072,6 +3072,15 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
}
// Paper end

View File

@ -50,7 +50,7 @@ index ba71636527f173dfc5ddae9ef0f7c73d0423d9b3..c2e987808ae5ccb23cc7bcc5221faea1
if (!flag && isSpawnInvulnerable() && damagesource != DamageSource.OUT_OF_WORLD) { // Purpur
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index ee42f3d97c3453bacfe0be40ee99f08649d44acf..09c00dae1d25878a7d55bdc2498b7d6e325dc45a 100644
index 5cdefe2a1b4085e3aae7dbbb751cfd368593ebd7..f1781c2100bf3a8fa7123b66f9ab682177d6490e 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -194,9 +194,9 @@ public abstract class EntityLiving extends Entity {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Disable loot drops on death by cramming
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 09c00dae1d25878a7d55bdc2498b7d6e325dc45a..f338c3fc638d76eb6850573517c6123584bc7e04 100644
index f1781c2100bf3a8fa7123b66f9ab682177d6490e..906791fc6180e011ce029ac95a63c92553f0377e 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -1598,8 +1598,10 @@ public abstract class EntityLiving extends Entity {

View File

@ -17,7 +17,7 @@ index c8071e2909c03bd8eafb92fbf8fd8701642df1f9..7c9fc120d2b58ca969b8a0ff9619e96f
public void f(double d0, double d1, double d2) {
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index f338c3fc638d76eb6850573517c6123584bc7e04..7d1b5c992521ae1dae94d3e658d73491387e1d98 100644
index 906791fc6180e011ce029ac95a63c92553f0377e..6fb4b06df010c3099a1af3b145749ea439a4aa39 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -2597,7 +2597,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Skip events if there's no listeners
diff --git a/src/main/java/net/minecraft/commands/CommandDispatcher.java b/src/main/java/net/minecraft/commands/CommandDispatcher.java
index a70e0761aeddee8fafff971b5cbd0422ab560fb5..6fc5ee06c3bed8d9aa0e13dd7fa8d70ff6711f85 100644
index 988d1c9e9f4f29325043eb083123d12dd5f8081d..c25440e810e61bcdc299a0caebaec54b6862dd3c 100644
--- a/src/main/java/net/minecraft/commands/CommandDispatcher.java
+++ b/src/main/java/net/minecraft/commands/CommandDispatcher.java
@@ -362,6 +362,7 @@ public class CommandDispatcher {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable TPS Catchup
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 22ca3082fff5a630fe7d6a5ec1e70f5675a5a8bc..9cc171e17e0d5d8f60a6d229eb2d39fb9181412f 100644
index a75a8322829f36045243d5fd61d28b126af1f0af..ab2424a868a3d29af96f36ce037f1ab9b9b2a635 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1122,7 +1122,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1132,7 +1132,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.a(this::canSleepForTick);
this.methodProfiler.exitEnter("nextTickWait");
this.X = true;

View File

@ -27,7 +27,7 @@ index dc6bc1910ad0f9b27144d5750078c3ca607d03d3..e8be35f836ede2630d44902e99a21489
setListData(vector);
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 9cc171e17e0d5d8f60a6d229eb2d39fb9181412f..fd32bd05973785c4fc64849a8b7a96551a3223b9 100644
index ab2424a868a3d29af96f36ce037f1ab9b9b2a635..cdddae4ff5178112d4523079144803f2694267d5 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -278,7 +278,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -39,7 +39,7 @@ index 9cc171e17e0d5d8f60a6d229eb2d39fb9181412f..fd32bd05973785c4fc64849a8b7a9655
public boolean lagging = false; // Purpur
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
// Spigot end
@@ -1005,6 +1005,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1015,6 +1015,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
private static final long MAX_CATCHUP_BUFFER = TICK_TIME * TPS * 60L;
private long lastTick = 0;
private long catchupTime = 0;
@ -47,7 +47,7 @@ index 9cc171e17e0d5d8f60a6d229eb2d39fb9181412f..fd32bd05973785c4fc64849a8b7a9655
public final RollingAverage tps1 = new RollingAverage(60);
public final RollingAverage tps5 = new RollingAverage(60 * 5);
public final RollingAverage tps15 = new RollingAverage(60 * 15);
@@ -1097,13 +1098,17 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1107,13 +1108,17 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
{
final long diff = curTime - tickSection;
java.math.BigDecimal currentTps = TPS_BASE.divide(new java.math.BigDecimal(diff), 30, java.math.RoundingMode.HALF_UP);

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Implement elytra settings
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 7d1b5c992521ae1dae94d3e658d73491387e1d98..35936f4651484c495a43529638d79b5df65b82ee 100644
index 6fb4b06df010c3099a1af3b145749ea439a4aa39..e2124f60b37436d2514f92e180e914b4d4a8470c 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -2955,7 +2955,16 @@ public abstract class EntityLiving extends Entity {

View File

@ -42,10 +42,10 @@ index f63ec5fa5a1cb34f4809a06a29d01603efb178f1..b773480baef218d0aab2f524e7e305c1
int i;
int j;
diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
index 585dbb250d975d2e9c34af26b9d5927ce734b407..58d2f1a10186e889bdd2249724a7f21f3a0a6a6e 100644
index bb5ebacf99238223b84f3663af3ab9c6c60332eb..9097884f71d7986c8185a4b2b2a65b8c66fa7354 100644
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
@@ -2481,7 +2481,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
@@ -2451,7 +2451,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
public class EntityTracker {

View File

@ -5,14 +5,14 @@ Subject: [PATCH] Add /ping command
diff --git a/src/main/java/net/minecraft/commands/CommandDispatcher.java b/src/main/java/net/minecraft/commands/CommandDispatcher.java
index 6fc5ee06c3bed8d9aa0e13dd7fa8d70ff6711f85..e8fe4984fdc67536561a1ad08b328a30b30b8717 100644
index c25440e810e61bcdc299a0caebaec54b6862dd3c..2566c5ea7ba2bbeed43ba74944c038b53f7f9fde 100644
--- a/src/main/java/net/minecraft/commands/CommandDispatcher.java
+++ b/src/main/java/net/minecraft/commands/CommandDispatcher.java
@@ -191,6 +191,7 @@ public class CommandDispatcher {
CommandIdleTimeout.a(this.b);
CommandStop.a(this.b);
CommandWhitelist.a(this.b);
+ net.pl3x.purpur.command.PingCommand.register(getDispatcher()); // Purpur
+ net.pl3x.purpur.command.PingCommand.register(dispatcher()); // Purpur
}
if (commanddispatcher_servertype.d) {
@ -29,14 +29,6 @@ index 6fc5ee06c3bed8d9aa0e13dd7fa8d70ff6711f85..e8fe4984fdc67536561a1ad08b328a30
public static <T> RequiredArgumentBuilder<CommandListenerWrapper, T> a(String s, ArgumentType<T> argumenttype) {
return RequiredArgumentBuilder.argument(s, argumenttype);
}
@@ -441,6 +444,7 @@ public class CommandDispatcher {
};
}
+ public com.mojang.brigadier.CommandDispatcher<CommandListenerWrapper> getDispatcher() { return a(); } // Purpur - OBFHELPER
public com.mojang.brigadier.CommandDispatcher<CommandListenerWrapper> a() {
return this.b;
}
diff --git a/src/main/java/net/minecraft/commands/CommandListenerWrapper.java b/src/main/java/net/minecraft/commands/CommandListenerWrapper.java
index 8402af32cc476d7f468842eb4f34c7521d72bcc8..4480fe75cfad35a5104b5116c5ec2c80d18f15f5 100644
--- a/src/main/java/net/minecraft/commands/CommandListenerWrapper.java

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Allow color codes in books
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index f45bbf7a4ab4d841a12270c1399fb09538b9fe90..38273c73610b23ba75db658763cbb2e4c4871d58 100644
index d2896d49b4b3cb0a6cf64ee29233ff59b8fba45d..d309552f56f5ea695d57a95ed0a091f4c383ca34 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -1209,7 +1209,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1211,7 +1211,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
if (itemstack.getItem() == Items.WRITABLE_BOOK) {
NBTTagList nbttaglist = new NBTTagList();
@ -18,7 +18,7 @@ index f45bbf7a4ab4d841a12270c1399fb09538b9fe90..38273c73610b23ba75db658763cbb2e4
ItemStack old = itemstack.cloneItemStack(); // CraftBukkit
itemstack.a("pages", (NBTBase) nbttaglist);
this.player.inventory.setItem(i, CraftEventFactory.handleEditBookEvent(player, i, old, itemstack)); // CraftBukkit // Paper - Don't ignore result (see other callsite for handleEditBookEvent)
@@ -1227,13 +1228,14 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1229,13 +1230,14 @@ public class PlayerConnection implements PacketListenerPlayIn {
itemstack1.setTag(nbttagcompound.clone());
}
@ -35,7 +35,7 @@ index f45bbf7a4ab4d841a12270c1399fb09538b9fe90..38273c73610b23ba75db658763cbb2e4
ChatComponentText chatcomponenttext = new ChatComponentText(s1);
String s2 = IChatBaseComponent.ChatSerializer.a((IChatBaseComponent) chatcomponenttext);
@@ -1245,6 +1247,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1247,6 +1249,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Entity lifespan
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index 38273c73610b23ba75db658763cbb2e4c4871d58..d30a9ef98cbe214c0258e7d5e8527ff8fd956ddd 100644
index d309552f56f5ea695d57a95ed0a091f4c383ca34..77e7f3f33b13050ff383458ae294906c5ff77476 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -2455,6 +2455,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -2457,6 +2457,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
boolean triggerLeashUpdate = itemInHand != null && itemInHand.getItem() == Items.LEAD && entity instanceof EntityInsentient;
Item origItem = this.player.inventory.getItemInHand() == null ? null : this.player.inventory.getItemInHand().getItem();
PlayerInteractEntityEvent event;

View File

@ -36,7 +36,7 @@ index 97f82ac9fb8f91aea11660ad6d7284faed8e9434..8e76c11e6bec5357322ea906af9e30f7
+ // Purpur end
}
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 35936f4651484c495a43529638d79b5df65b82ee..a2073fd6fc5c2a5fd2835445019c7ecf86c5eb47 100644
index e2124f60b37436d2514f92e180e914b4d4a8470c..f4407cd0865b0e4861930645615c057d11079034 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -45,6 +45,7 @@ import net.minecraft.network.syncher.DataWatcher;

View File

@ -21,7 +21,7 @@ index b9e252c3db715c288493d5b98fc20d84de46c4e4..cdb7a97ecececa78a200acc898535d33
public boolean villagerUseBrainTicksOnlyWhenLagging = true;
public boolean villagerCanBeLeashed = false;
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index dc2d880ded328f8377c207ce15f604ec5c25176c..5881497825b3c11ce5d23e4f609fd769ba6a76e1 100644
index c94cd5a95f28190e88d31b522035fc7c74a2ac33..d04a21b93374c287b271deb6618b984abc8831bb 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -11,6 +11,7 @@ import net.minecraft.world.entity.EntityLiving;
@ -32,7 +32,7 @@ index dc2d880ded328f8377c207ce15f604ec5c25176c..5881497825b3c11ce5d23e4f609fd769
import net.minecraft.world.entity.boss.EntityComplexPart;
import net.minecraft.world.entity.boss.enderdragon.EntityEnderCrystal;
import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon;
@@ -386,6 +387,7 @@ public class ActivationRange
@@ -387,6 +388,7 @@ public class ActivationRange
*/
public static boolean checkIfActive(Entity entity)
{

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Totems work in inventory
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index a2073fd6fc5c2a5fd2835445019c7ecf86c5eb47..451a28b1950bad61de7181a2fb89549063d8e2bf 100644
index f4407cd0865b0e4861930645615c057d11079034..8930ab8a39c50eaa84372f0e8caf8b92789bb0c4 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -1426,6 +1426,19 @@ public abstract class EntityLiving extends Entity {

View File

@ -18,7 +18,7 @@ index 5e672a0660d0aceffcdb26d185590ca18aa4f023..4b171a2a60e24947e884f8988920f335
}
final Object val = config.get(key);
diff --git a/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
index d29b537bbe4f852162b720d6b23b741829af21f9..c3669383050241df97e25c89d80720ad446c690d 100644
index e1dc7c1025e19f7393a45719af8fe7aae016184d..dd45a896998e4d5637ef0dd08f2b72d6b6f891de 100644
--- a/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
+++ b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
@@ -1,5 +1,6 @@

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add no-random-tick block list
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index 446dc23e9b16314b80767ce12b82f993f48824f6..f63c096218b7d984b1930667766021324ac72345 100644
index c49b049351c36878238e65eb9cbf949a682e4a7d..50fac6013f14ddd427f51ba78ecf101df43f5b4a 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -532,14 +532,14 @@ public class WorldServer extends World implements GeneratorAccessSeed {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Ridables
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index fd32bd05973785c4fc64849a8b7a96551a3223b9..45cb8681fd0942084b56eb8d45390c2dbc8a4f3d 100644
index cdddae4ff5178112d4523079144803f2694267d5..f6637353fb358e7720edabc355ea036d37d039ca 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1530,6 +1530,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1540,6 +1540,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
WorldServer worldserver = (WorldServer) iterator.next();
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
worldserver.hasEntityMoveEvent = EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
@ -88,7 +88,7 @@ index 8e76c11e6bec5357322ea906af9e30f71e5718be..86bd39af6e3240b82f5afd6e7c554471
public void playerTick() {
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index f63c096218b7d984b1930667766021324ac72345..e4f08e0da995cfe8c8540a167bad246ce131e010 100644
index 50fac6013f14ddd427f51ba78ecf101df43f5b4a..8d1debb8152176581041a14e28cfcca8f92ae261 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -216,6 +216,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@ -100,10 +100,10 @@ index f63c096218b7d984b1930667766021324ac72345..e4f08e0da995cfe8c8540a167bad246c
return new Throwable(entity + " Added to world at " + new java.util.Date());
}
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index d30a9ef98cbe214c0258e7d5e8527ff8fd956ddd..e39e46cf3cb646dd100b698cbc6d4f9b6896696d 100644
index 77e7f3f33b13050ff383458ae294906c5ff77476..cbd8b1b98256847795aca1a7b08f7eb3f9e232a7 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -2464,6 +2464,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -2466,6 +2466,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
this.server.getPluginManager().callEvent(event);
@ -419,7 +419,7 @@ index c9136f1b54ff0620a621b703b4e7487f4a63b01d..8b7f840bb1b24996b40c9bef85f4c1e9
+ // Purpur end
}
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 451a28b1950bad61de7181a2fb89549063d8e2bf..c0a6bbe570e95f4449b404b21855860c7aba057a 100644
index 8930ab8a39c50eaa84372f0e8caf8b92789bb0c4..bcf1d77f627e800b9dbbfd7f9ed99887e2aca714 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -559,7 +559,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Allow toggling special MobSpawners per world
In vanilla, these are all hardcoded on for world type 0 (overworld) and hardcoded off for every other world type. Default config behaviour matches this.
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index e4f08e0da995cfe8c8540a167bad246ce131e010..b374460bdb4c4dd0ed3d85380734ae39bc17fdd9 100644
index 8d1debb8152176581041a14e28cfcca8f92ae261..373b4c24e105c343f9ba125514853a0d0dbdc524 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -92,6 +92,7 @@ import net.minecraft.world.entity.EnumCreatureType;

View File

@ -18,7 +18,7 @@ index 3086ee023685781d94e2fb99fc8dff5264f01165..74c1047305cac5673e274096709c757e
public PacketPlayOutUpdateTime() {}
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index b374460bdb4c4dd0ed3d85380734ae39bc17fdd9..3588bd1e5dc9ad862086dc3f96f99cbb98250162 100644
index 373b4c24e105c343f9ba125514853a0d0dbdc524..9a2cc5dfcfaefc8a257a85c0bc09456074ff76c2 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -64,6 +64,7 @@ import net.minecraft.network.protocol.game.PacketPlayOutExplosion;

View File

@ -5,15 +5,15 @@ Subject: [PATCH] Add demo command
diff --git a/src/main/java/net/minecraft/commands/CommandDispatcher.java b/src/main/java/net/minecraft/commands/CommandDispatcher.java
index e8fe4984fdc67536561a1ad08b328a30b30b8717..a551636c2c59e68a5abb1cd5611c1d5c7e36f514 100644
index 2566c5ea7ba2bbeed43ba74944c038b53f7f9fde..d402a896a0094e6c379d71c63d744b4ee443c097 100644
--- a/src/main/java/net/minecraft/commands/CommandDispatcher.java
+++ b/src/main/java/net/minecraft/commands/CommandDispatcher.java
@@ -191,6 +191,7 @@ public class CommandDispatcher {
CommandIdleTimeout.a(this.b);
CommandStop.a(this.b);
CommandWhitelist.a(this.b);
+ net.pl3x.purpur.command.DemoCommand.register(getDispatcher()); // Purpur
net.pl3x.purpur.command.PingCommand.register(getDispatcher()); // Purpur
+ net.pl3x.purpur.command.DemoCommand.register(dispatcher()); // Purpur
net.pl3x.purpur.command.PingCommand.register(dispatcher()); // Purpur
}
diff --git a/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutGameStateChange.java b/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutGameStateChange.java

View File

@ -7,7 +7,7 @@ Configurable chance to spawn a wolf that is rabid.
Rabid wolves attack all players, mobs, and animals.
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index c0a6bbe570e95f4449b404b21855860c7aba057a..04ae8af914e65ae9725d276a9dcc24893cbcabb9 100644
index bcf1d77f627e800b9dbbfd7f9ed99887e2aca714..c957122f8463fc1eae632730a64bec7f8b0d1055 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -2200,6 +2200,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -5,22 +5,22 @@ Subject: [PATCH] Implement TPSBar
diff --git a/src/main/java/net/minecraft/commands/CommandDispatcher.java b/src/main/java/net/minecraft/commands/CommandDispatcher.java
index a551636c2c59e68a5abb1cd5611c1d5c7e36f514..b7663a3d64ae5202abb93eabba6ec013bae96334 100644
index d402a896a0094e6c379d71c63d744b4ee443c097..3bcaafb1fe3af67fce2be1f62c7f1aa86ebd51ef 100644
--- a/src/main/java/net/minecraft/commands/CommandDispatcher.java
+++ b/src/main/java/net/minecraft/commands/CommandDispatcher.java
@@ -193,6 +193,7 @@ public class CommandDispatcher {
CommandWhitelist.a(this.b);
net.pl3x.purpur.command.DemoCommand.register(getDispatcher()); // Purpur
net.pl3x.purpur.command.PingCommand.register(getDispatcher()); // Purpur
+ net.pl3x.purpur.command.TPSBarCommand.register(getDispatcher()); // Purpur
net.pl3x.purpur.command.DemoCommand.register(dispatcher()); // Purpur
net.pl3x.purpur.command.PingCommand.register(dispatcher()); // Purpur
+ net.pl3x.purpur.command.TPSBarCommand.register(dispatcher()); // Purpur
}
if (commanddispatcher_servertype.d) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 45cb8681fd0942084b56eb8d45390c2dbc8a4f3d..16c20b3e7dcbbdb08e8c2a15074495eacc001e70 100644
index f6637353fb358e7720edabc355ea036d37d039ca..5e2c7f3bf9aa99b10260454b9957caff81a7cd26 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -979,6 +979,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -989,6 +989,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.safeShutdown(flag, false);
}
public void safeShutdown(boolean flag, boolean isRestarting) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] PlayerBookTooLargeEvent
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index e39e46cf3cb646dd100b698cbc6d4f9b6896696d..f9a232cbc5dc55f3de2286037ca526b15c0842ba 100644
index cbd8b1b98256847795aca1a7b08f7eb3f9e232a7..0fc053def9e632543c3ba54e5a700518efba95d8 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -1121,6 +1121,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1123,6 +1123,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
NBTTagList pageList = testStack.getTag().getList("pages", 8);
if (pageList.size() > 100) {
PlayerConnection.LOGGER.warn(this.player.getName() + " tried to send a book with too many pages");
@ -16,7 +16,7 @@ index e39e46cf3cb646dd100b698cbc6d4f9b6896696d..f9a232cbc5dc55f3de2286037ca526b1
minecraftServer.scheduleOnMain(() -> this.disconnect("Book too large!"));
return;
}
@@ -1133,6 +1134,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1135,6 +1136,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
int byteLength = testString.getBytes(java.nio.charset.StandardCharsets.UTF_8).length;
if (byteLength > 256 * 4) {
PlayerConnection.LOGGER.warn(this.player.getName() + " tried to send a book with with a page too large!");
@ -24,7 +24,7 @@ index e39e46cf3cb646dd100b698cbc6d4f9b6896696d..f9a232cbc5dc55f3de2286037ca526b1
minecraftServer.scheduleOnMain(() -> this.disconnect("Book too large!"));
return;
}
@@ -1156,6 +1158,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1158,6 +1160,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
if (byteTotal > byteAllowed) {
PlayerConnection.LOGGER.warn(this.player.getName() + " tried to send too large of a book. Book Size: " + byteTotal + " - Allowed: "+ byteAllowed + " - Pages: " + pageList.size());

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Add mobGriefing bypass to everything affected
This adds the "bypass-mob-griefing" world config option to everything that is affected by the gamerule.
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 04ae8af914e65ae9725d276a9dcc24893cbcabb9..1757e44ecb9d23fd0ca6f7e7f9c07509b377675f 100644
index c957122f8463fc1eae632730a64bec7f8b0d1055..52bd6b4a3bcd44166bd4c897756fe06b19120907 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -1571,7 +1571,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -19,7 +19,7 @@ index 63d93060b350069040876aaacb91c853d674ea7b..e9793954c872baacfe7be80ecf3888e8
}
return;
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 1757e44ecb9d23fd0ca6f7e7f9c07509b377675f..26ae5f5d0b8acfd173e3401aa07bc6fcdc860978 100644
index 52bd6b4a3bcd44166bd4c897756fe06b19120907..f59d18195bf40f5589d50cee8d074005e98416a6 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -2977,6 +2977,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Dont run with scissors!
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index f9a232cbc5dc55f3de2286037ca526b15c0842ba..1e64c2467c1c96e93f6843a9f7283baf2bd33a61 100644
index 0fc053def9e632543c3ba54e5a700518efba95d8..7abd1e47b6f3bed48228ed6dc2a6a27a877e03c2 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -1545,6 +1545,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1547,6 +1547,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
this.player.fallDistance = 0.0F;
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] One Punch Man!
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 26ae5f5d0b8acfd173e3401aa07bc6fcdc860978..2c5280fe13fa962cfa514b41b1da15c019e30715 100644
index f59d18195bf40f5589d50cee8d074005e98416a6..cbfaa40c327fefe416c4c751846bcf278a36144a 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -2019,6 +2019,23 @@ public abstract class EntityLiving extends Entity {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Config for skipping night
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index 3588bd1e5dc9ad862086dc3f96f99cbb98250162..80b08904143b7656aa125a396bbd2866370c8906 100644
index 9a2cc5dfcfaefc8a257a85c0bc09456074ff76c2..1b15216d6a03c1031d2bbea2e0243a0de9a9199f 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -1028,7 +1028,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {

View File

@ -18,7 +18,7 @@ index d321616b7f726f4ff307b46ced9efce6cc20b82f..c20787a20cf6f273092d2b7ef0d7d90a
public Iterable<ItemStack> bn() {
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 2c5280fe13fa962cfa514b41b1da15c019e30715..82d3aaaf9bbb493d54f6bf2d34edafc5498aee88 100644
index cbfaa40c327fefe416c4c751846bcf278a36144a..be709c961cd85c1db32fb49c71c63814cbe6bd23 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -394,7 +394,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -8,7 +8,7 @@ Add per player no-tick, tick, and send view distances.
Also add send view distance to World.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 4c80a999fcc4d656c047b96cb549782c693b33cd..226c9a1fc49b11a9dd7653c695f7031bb51c3a41 100644
index 98512bddbb0c8bd6a3f487c60b1ec77b274b991e..3da0b1405de508b1b2e1b941c87c0f0ac0ff1e1a 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -3517,6 +3517,26 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad

View File

@ -40,10 +40,10 @@ index a0f53c9eff04a40780b3ba568dbfc5bbe9bd8504..3bc5cd1e53dd7c94b948e7f57f0dc8e0
throwable = throwable1;
throw throwable1;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 0db00322ebf600245bf9311e547c8c743a60a173..e3253796c70b990e000ed1073f4070fe07a3f845 100644
index 8ee622108cebff2bba8a44fb255a3b6c03ed0220..bfd0d8e3e7b6409b8ef7620ef147120480878c51 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1569,7 +1569,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1579,7 +1579,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
public String getServerModName() {

View File

@ -937,10 +937,10 @@ index 0000000000000000000000000000000000000000..be408aebbccbda46e8aa82ef33757413
+}
diff --git a/src/main/java/com/tuinity/tuinity/util/misc/Delayed26WayDistancePropagator3D.java b/src/main/java/com/tuinity/tuinity/util/misc/Delayed26WayDistancePropagator3D.java
new file mode 100644
index 0000000000000000000000000000000000000000..155d10994f2d7df9ac927d955d99016fe304360f
index 0000000000000000000000000000000000000000..9cc49e8e4ad841df2b38dc37ec761bf360f5a357
--- /dev/null
+++ b/src/main/java/com/tuinity/tuinity/util/misc/Delayed26WayDistancePropagator3D.java
@@ -0,0 +1,295 @@
@@ -0,0 +1,300 @@
+package com.tuinity.tuinity.util.misc;
+
+import it.unimi.dsi.fastutil.HashCommon;
@ -1062,11 +1062,13 @@ index 0000000000000000000000000000000000000000..155d10994f2d7df9ac927d955d99016f
+ this.levelRemoveWorkQueueBitset |= (1L << level);
+ }
+
+ public void propagateUpdates() {
+ public boolean propagateUpdates() {
+ if (this.updatedSources.isEmpty()) {
+ return;
+ return false;
+ }
+
+ boolean ret = false;
+
+ for (final LongIterator iterator = this.updatedSources.iterator(); iterator.hasNext();) {
+ final long coordinate = iterator.nextLong();
+
@ -1076,6 +1078,7 @@ index 0000000000000000000000000000000000000000..155d10994f2d7df9ac927d955d99016f
+ if (currentLevel == updatedSource) {
+ continue;
+ }
+ ret = true;
+
+ if (updatedSource > currentLevel) {
+ // level increase
@ -1096,6 +1099,8 @@ index 0000000000000000000000000000000000000000..155d10994f2d7df9ac927d955d99016f
+
+ // now we propagate the decreases (which will then re-propagate clobbered sources)
+ this.propagateDecreases();
+
+ return ret;
+ }
+
+ protected void propagateIncreases() {
@ -1238,10 +1243,10 @@ index 0000000000000000000000000000000000000000..155d10994f2d7df9ac927d955d99016f
+}
diff --git a/src/main/java/com/tuinity/tuinity/util/misc/Delayed8WayDistancePropagator2D.java b/src/main/java/com/tuinity/tuinity/util/misc/Delayed8WayDistancePropagator2D.java
new file mode 100644
index 0000000000000000000000000000000000000000..606417a8aeaca2682595f417bba8e9d411999da9
index 0000000000000000000000000000000000000000..cdd3c4032c1d6b34a10ba415bd4d0e377aa9af3c
--- /dev/null
+++ b/src/main/java/com/tuinity/tuinity/util/misc/Delayed8WayDistancePropagator2D.java
@@ -0,0 +1,713 @@
@@ -0,0 +1,718 @@
+package com.tuinity.tuinity.util.misc;
+
+import it.unimi.dsi.fastutil.HashCommon;
@ -1622,11 +1627,13 @@ index 0000000000000000000000000000000000000000..606417a8aeaca2682595f417bba8e9d4
+ this.levelRemoveWorkQueueBitset |= (1L << level);
+ }
+
+ public void propagateUpdates() {
+ public boolean propagateUpdates() {
+ if (this.updatedSources.isEmpty()) {
+ return;
+ return false;
+ }
+
+ boolean ret = false;
+
+ for (final LongIterator iterator = this.updatedSources.iterator(); iterator.hasNext();) {
+ final long coordinate = iterator.nextLong();
+
@ -1636,6 +1643,7 @@ index 0000000000000000000000000000000000000000..606417a8aeaca2682595f417bba8e9d4
+ if (currentLevel == updatedSource) {
+ continue;
+ }
+ ret = true;
+
+ if (updatedSource > currentLevel) {
+ // level increase
@ -1656,6 +1664,8 @@ index 0000000000000000000000000000000000000000..606417a8aeaca2682595f417bba8e9d4
+
+ // now we propagate the decreases (which will then re-propagate clobbered sources)
+ this.propagateDecreases();
+
+ return ret;
+ }
+
+ protected void propagateIncreases() {
@ -2024,7 +2034,7 @@ index 1d72af9cace7aa8f1d20c7c1c5be621f533e2dad..006e7076932f6be576a64da09c4d84ca
public static <T> void mergeSortedSets(final java.util.function.Consumer<T> consumer, final java.util.Comparator<? super T> comparator, final java.util.SortedSet<T>...sets) {
final ObjectRBTreeSet<T> all = new ObjectRBTreeSet<>(comparator);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e3253796c70b990e000ed1073f4070fe07a3f845..dda93749eef9cd63e47ffe269b839512fe4db695 100644
index bfd0d8e3e7b6409b8ef7620ef147120480878c51..dafd5c368036afa4516da7eac04ddb7c649e8b97 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -267,6 +267,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -2035,7 +2045,7 @@ index e3253796c70b990e000ed1073f4070fe07a3f845..dda93749eef9cd63e47ffe269b839512
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
public boolean serverAutoSave = false; // Paper
@@ -1088,6 +1089,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1098,6 +1099,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.lastOverloadTime = this.nextTick;
}
@ -2043,7 +2053,7 @@ index e3253796c70b990e000ed1073f4070fe07a3f845..dda93749eef9cd63e47ffe269b839512
if ( ++MinecraftServer.currentTick % SAMPLE_INTERVAL == 0 )
{
final long diff = curTime - tickSection;
@@ -1474,6 +1476,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1484,6 +1486,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
midTickLoadChunks(); // Paper
worldserver.timings.doTick.startTiming(); // Spigot
worldserver.doTick(booleansupplier);

View File

@ -262,10 +262,10 @@ index 0000000000000000000000000000000000000000..0f66484a80d3cc7caaf8a111bd50229e
+}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index dda93749eef9cd63e47ffe269b839512fe4db695..f6d443d0193ceea1b3248b66cb198be04822e9e7 100644
index dafd5c368036afa4516da7eac04ddb7c649e8b97..419d17d0eb9426e4f3f9f97a504e567401d175f3 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1072,6 +1072,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1082,6 +1082,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// Paper end
PaperJvmChecker.checkJvm(); // Paper jvm version nag

View File

@ -247,7 +247,7 @@ index 3c804c7b20a14ea6e510810e2be10c1cc89ff5c1..47da7efffde2e6d63c1a064b950abf81
return new TicketType<>(s, comparator, 0L);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 62513d3acb930c4c9fa3d875a1fc94bb4d948951..69b776b0a7e254a84fcf50784cde30629488a2d9 100644
index 05098332d83b1abfaa0a6d3bd4a9e801ea90d2ad..8484542c108b69a310b19806db5e32a04e3ee991 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -505,6 +505,7 @@ public class CraftWorld implements World {

View File

@ -35,7 +35,7 @@ index 5aa558bd05c4ab735730263f220478c36a4ba0fd..6473b951788a3ecbeee4811ea0288ff4
}
\ No newline at end of file
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 69b776b0a7e254a84fcf50784cde30629488a2d9..4356d30353cc856c53731e9f10885d74a62027d2 100644
index 8484542c108b69a310b19806db5e32a04e3ee991..7e377eb7ad2710b2541eaab0885c07c56602a1f6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -342,6 +342,14 @@ public class CraftWorld implements World {

View File

@ -18,10 +18,10 @@ index 4666d6582535d6e49c5bd40d4fcdcdfe07590aa9..b870cca05f0ba354e6976a7051123563
// re-schedule eventually
toTick.tickState = STATE_SCHEDULED;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index f6d443d0193ceea1b3248b66cb198be04822e9e7..5c909b776e111d6bd9e2429f25fed121bb391219 100644
index 419d17d0eb9426e4f3f9f97a504e567401d175f3..dae8824a6034cdaaecbedeba5e05c62f4565583f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1105,7 +1105,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1115,7 +1115,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// Paper end
tickSection = curTime;
}
@ -30,7 +30,7 @@ index f6d443d0193ceea1b3248b66cb198be04822e9e7..5c909b776e111d6bd9e2429f25fed121
// Spigot end
//MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit // Paper - don't overwrite current tick time
@@ -1198,6 +1198,76 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1208,6 +1208,76 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
// Paper end
@ -107,7 +107,7 @@ index f6d443d0193ceea1b3248b66cb198be04822e9e7..5c909b776e111d6bd9e2429f25fed121
private void executeModerately() {
this.executeAll();
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
@@ -1211,22 +1281,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1221,22 +1291,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
});
}
@ -131,7 +131,7 @@ index f6d443d0193ceea1b3248b66cb198be04822e9e7..5c909b776e111d6bd9e2429f25fed121
@Override
public TickTask postToMainThread(Runnable runnable) {
@@ -1253,6 +1308,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1263,6 +1318,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
private boolean bb() {
if (super.executeNext()) {
@ -139,7 +139,7 @@ index f6d443d0193ceea1b3248b66cb198be04822e9e7..5c909b776e111d6bd9e2429f25fed121
return true;
} else {
if (this.canSleepForTick()) {
@@ -1320,7 +1376,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1330,7 +1386,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// Paper start - move oversleep into full server tick
isOversleep = true;MinecraftTimings.serverOversleep.startTiming();
this.awaitTasks(() -> {
@ -148,7 +148,7 @@ index f6d443d0193ceea1b3248b66cb198be04822e9e7..5c909b776e111d6bd9e2429f25fed121
return !this.canOversleep();
});
isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
@@ -1411,16 +1467,16 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1421,16 +1477,16 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
protected void b(BooleanSupplier booleansupplier) {
@ -168,7 +168,7 @@ index f6d443d0193ceea1b3248b66cb198be04822e9e7..5c909b776e111d6bd9e2429f25fed121
this.methodProfiler.exitEnter("levels");
Iterator iterator = this.getWorlds().iterator();
@@ -1431,7 +1487,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1441,7 +1497,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
processQueue.remove().run();
}
MinecraftTimings.processQueueTimer.stopTiming(); // Spigot
@ -177,7 +177,7 @@ index f6d443d0193ceea1b3248b66cb198be04822e9e7..5c909b776e111d6bd9e2429f25fed121
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
// Send time updates to everyone, it will get the right time from the world the player is in.
// Paper start - optimize time updates
@@ -1474,7 +1530,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1484,7 +1540,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.methodProfiler.enter("tick");
try {
@ -186,7 +186,7 @@ index f6d443d0193ceea1b3248b66cb198be04822e9e7..5c909b776e111d6bd9e2429f25fed121
worldserver.timings.doTick.startTiming(); // Spigot
worldserver.doTick(booleansupplier);
// Tuinity start
@@ -1483,7 +1539,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1493,7 +1549,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
// Tuinity end
worldserver.timings.doTick.stopTiming(); // Spigot

View File

@ -248,10 +248,10 @@ index 006e7076932f6be576a64da09c4d84ca4a15f5dd..e832ea0497b2d6af7556bda7f6728e72
0, 2, 60L, TimeUnit.SECONDS,
new LinkedBlockingQueue<Runnable>(),
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 5c909b776e111d6bd9e2429f25fed121bb391219..d7e1c830764973c31dff8311a79e617d8f283a53 100644
index dae8824a6034cdaaecbedeba5e05c62f4565583f..29677908376e111abead33b42920e07aeb1d4b02 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1441,6 +1441,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1451,6 +1451,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
// Paper end

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Reduce allocation rate from crammed entities
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 21341eeb8148be119fbc1dd370c1beaf70a319e0..d933323d57a2a7ff283408f12d4650699f8177e7 100644
index 2537c9fcf155253da53ada3829c3caca765f35f4..96cc46a26eef701b0579f3407e67af9176e1743b 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -2973,7 +2973,11 @@ public abstract class EntityLiving extends Entity {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Improve paper prevent moving into unloaded chunk check
Check the AABB of the move
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index e6ea84ba098b4d77bc68e99862992a10ef4585b5..0b2a94d44a7321369dcb0a96529ff35366d98e09 100644
index 6ad075907d56a8f41ca3a7b82ff90a6d3ad9f1d4..de6e6152795f4f01c8b79def423f1cb59906a7f7 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -568,7 +568,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -570,7 +570,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
speed *= 2f; // TODO: Get the speed of the vehicle instead of the player
// Paper start - Prevent moving into unloaded chunks
@ -20,7 +20,7 @@ index e6ea84ba098b4d77bc68e99862992a10ef4585b5..0b2a94d44a7321369dcb0a96529ff353
this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity));
return;
}
@@ -1287,7 +1289,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1289,7 +1291,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
speed = player.abilities.walkSpeed * 10f;
}
// Paper start - Prevent moving into unloaded chunks

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Revert getChunkAt(Async) retaining chunks for long periods of
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 4356d30353cc856c53731e9f10885d74a62027d2..01821015a0737dd770524bf77c8cb46d0ff6562e 100644
index 7e377eb7ad2710b2541eaab0885c07c56602a1f6..996042cfe0bbb49675bc5fcb84dc2c5fa79d95a3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -423,14 +423,7 @@ public class CraftWorld implements World {
@ -25,7 +25,7 @@ index 4356d30353cc856c53731e9f10885d74a62027d2..01821015a0737dd770524bf77c8cb46d
}
// Paper start
@@ -2596,7 +2589,7 @@ public class CraftWorld implements World {
@@ -2589,7 +2582,7 @@ public class CraftWorld implements World {
}
return this.world.getChunkProvider().getChunkAtAsynchronously(x, z, gen, urgent).thenComposeAsync((either) -> {
net.minecraft.world.level.chunk.Chunk chunk = (net.minecraft.world.level.chunk.Chunk) either.left().orElse(null);

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Optimise collision checking in player move packet handling
Move collision logic to just the hasNewCollision call instead of getCubes + hasNewCollision
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index 0b2a94d44a7321369dcb0a96529ff35366d98e09..40a7f69e5e14078977ef615abf3a0f1f61d76f9f 100644
index de6e6152795f4f01c8b79def423f1cb59906a7f7..878c5342ca524768fbe2874b54bc12574852cefa 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -583,12 +583,14 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -585,12 +585,14 @@ public class PlayerConnection implements PacketListenerPlayIn {
return;
}
@ -25,7 +25,7 @@ index 0b2a94d44a7321369dcb0a96529ff35366d98e09..40a7f69e5e14078977ef615abf3a0f1f
double d11 = d7;
d6 = d3 - entity.locX();
@@ -602,16 +604,25 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -604,16 +606,25 @@ public class PlayerConnection implements PacketListenerPlayIn {
boolean flag1 = false;
if (d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot
@ -55,7 +55,7 @@ index 0b2a94d44a7321369dcb0a96529ff35366d98e09..40a7f69e5e14078977ef615abf3a0f1f
entity.setLocation(d0, d1, d2, f, f1);
player.setLocation(d0, d1, d2, this.player.yaw, this.player.pitch); // CraftBukkit
this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity));
@@ -697,7 +708,32 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -699,7 +710,32 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
private boolean a(Entity entity) {
@ -89,7 +89,7 @@ index 0b2a94d44a7321369dcb0a96529ff35366d98e09..40a7f69e5e14078977ef615abf3a0f1f
}
@Override
@@ -1219,7 +1255,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1221,7 +1257,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
if (this.teleportPos != null) {
@ -98,7 +98,7 @@ index 0b2a94d44a7321369dcb0a96529ff35366d98e09..40a7f69e5e14078977ef615abf3a0f1f
this.A = this.e;
this.a(this.teleportPos.x, this.teleportPos.y, this.teleportPos.z, this.player.yaw, this.player.pitch);
}
@@ -1306,7 +1342,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1308,7 +1344,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
}
@ -107,7 +107,7 @@ index 0b2a94d44a7321369dcb0a96529ff35366d98e09..40a7f69e5e14078977ef615abf3a0f1f
d7 = d4 - this.o;
d8 = d5 - this.p;
@@ -1345,6 +1381,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1347,6 +1383,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
this.player.move(EnumMoveType.PLAYER, new Vec3D(d7, d8, d9));
@ -115,7 +115,7 @@ index 0b2a94d44a7321369dcb0a96529ff35366d98e09..40a7f69e5e14078977ef615abf3a0f1f
this.player.setOnGround(packetplayinflying.b()); // CraftBukkit - SPIGOT-5810, SPIGOT-5835: reset by this.player.move
// Paper start - prevent position desync
if (this.teleportPos != null) {
@@ -1364,12 +1401,23 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1366,12 +1403,23 @@ public class PlayerConnection implements PacketListenerPlayIn {
boolean flag1 = false;
if (!this.player.H() && d11 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative() && this.player.playerInteractManager.getGameMode() != EnumGamemode.SPECTATOR) { // Spigot
@ -141,7 +141,7 @@ index 0b2a94d44a7321369dcb0a96529ff35366d98e09..40a7f69e5e14078977ef615abf3a0f1f
this.a(d0, d1, d2, f, f1);
} else {
// CraftBukkit start - fire PlayerMoveEvent
@@ -1456,6 +1504,26 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1458,6 +1506,26 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
}

View File

@ -22,7 +22,7 @@ index e50731723d266ba65b2163df2e935afb8b013a93..a6736d15282715d920bab85eb92074cd
}
value.append("},");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 01821015a0737dd770524bf77c8cb46d0ff6562e..b0801ca77620753ab61dba62429ce76e95aaba8f 100644
index 996042cfe0bbb49675bc5fcb84dc2c5fa79d95a3..0128a24f1de7468ff60ba2de0ed825ff62363f6b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -720,6 +720,30 @@ public class CraftWorld implements World {

View File

@ -11,10 +11,10 @@ gui. It looks like during sigint shutdown there can be some
deadlock between the server thread and awt shutdown thread here.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d7e1c830764973c31dff8311a79e617d8f283a53..02d8a8f13d81c47316f704fb700afd0214a5f546 100644
index 29677908376e111abead33b42920e07aeb1d4b02..7b0b416c73c8914f3c8c570f2020490ef2babf64 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -868,10 +868,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -878,10 +878,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
org.spigotmc.WatchdogThread.doStop(); // Paper
if (!isMainThread()) {
MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PAPER)");

View File

@ -110,10 +110,10 @@ index 12313a37ceeb6a0b6a539c38fdba67e5e43d7413..848eb25ed0640db61a0f28bc26ddabd0
updateLight(sender, world, lightengine, queue);
diff --git a/src/main/java/com/tuinity/tuinity/chunk/light/BlockStarLightEngine.java b/src/main/java/com/tuinity/tuinity/chunk/light/BlockStarLightEngine.java
new file mode 100644
index 0000000000000000000000000000000000000000..2b939fabcc4cc45d697bfa2f3cda7fc64a4de8ca
index 0000000000000000000000000000000000000000..331f0ae05384b29ceb59f2846c52a2194658bb39
--- /dev/null
+++ b/src/main/java/com/tuinity/tuinity/chunk/light/BlockStarLightEngine.java
@@ -0,0 +1,277 @@
@@ -0,0 +1,289 @@
+package com.tuinity.tuinity.chunk.light;
+
+import net.minecraft.core.BlockPosition;
@ -125,6 +125,7 @@ index 0000000000000000000000000000000000000000..2b939fabcc4cc45d697bfa2f3cda7fc6
+import net.minecraft.world.level.block.state.IBlockData;
+import net.minecraft.world.level.chunk.IChunkAccess;
+import net.minecraft.world.level.chunk.ILightAccess;
+import net.minecraft.world.level.chunk.ProtoChunk;
+import net.minecraft.world.level.chunk.ProtoChunkExtension;
+import net.minecraft.world.phys.shapes.VoxelShape;
+import net.minecraft.world.phys.shapes.VoxelShapes;
@ -134,6 +135,7 @@ index 0000000000000000000000000000000000000000..2b939fabcc4cc45d697bfa2f3cda7fc6
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+public final class BlockStarLightEngine extends StarLightEngine {
+
@ -347,7 +349,17 @@ index 0000000000000000000000000000000000000000..2b939fabcc4cc45d697bfa2f3cda7fc6
+
+ return ret.iterator();
+ } else {
+ return chunk.getLightSources().iterator();
+ if (chunk instanceof ProtoChunk) {
+ ProtoChunk protoChunk = (ProtoChunk)chunk;
+ protoChunk.lockLightSources();
+ try {
+ return new ArrayList<>(chunk.getLightSources().collect(Collectors.toList())).iterator();
+ } finally {
+ protoChunk.releaseLightSources();
+ }
+ } else {
+ return new ArrayList<>(chunk.getLightSources().collect(Collectors.toList())).iterator();
+ }
+ }
+ }
+
@ -4447,7 +4459,7 @@ index f7e9a151ffbbb64cb8f8bc1d37516d7979277b17..980063ada85d7e9660a625d67b2f6a82
this.playerConnection.sendPacket(new PacketPlayOutUpdateHealth(this.getBukkitEntity().getScaledHealth(), this.foodData.getFoodLevel(), this.foodData.getSaturationLevel())); // CraftBukkit
this.lastHealthSent = this.getHealth();
diff --git a/src/main/java/net/minecraft/server/level/LightEngineThreaded.java b/src/main/java/net/minecraft/server/level/LightEngineThreaded.java
index 0b80569648c1df01aab52d0b8d47028cda925d86..4d651cc21a9cb2fdeabff62d8978c3ec4abe2f68 100644
index 0b80569648c1df01aab52d0b8d47028cda925d86..ad584ba21c6e201b778f32cea6d7cc5bf67f9746 100644
--- a/src/main/java/net/minecraft/server/level/LightEngineThreaded.java
+++ b/src/main/java/net/minecraft/server/level/LightEngineThreaded.java
@@ -2,6 +2,11 @@ package net.minecraft.server.level;
@ -4775,7 +4787,7 @@ index 0b80569648c1df01aab52d0b8d47028cda925d86..4d651cc21a9cb2fdeabff62d8978c3ec
+ LightEngineThreaded.this.queueUpdate();
+ }).whenComplete((IChunkAccess chunk, Throwable throwable) -> {
+ if (throwable != null && !(throwable instanceof ThreadDeath)) {
+ LOGGER.fatal("Failed to light chunk " + ichunkaccess.getPos().toString() + " in world '" + this.theLightEngine.getWorld().getWorld().getName() + "'");
+ LOGGER.fatal("Failed to light chunk " + ichunkaccess.getPos().toString() + " in world '" + this.theLightEngine.getWorld().getWorld().getName() + "'", throwable);
+ }
+ });
+ }
@ -5191,10 +5203,19 @@ index 0fec15e141051863dbf51a2b3e1ace5028cd2fc1..d7757e60402be9939fc2d90ad79b2bb7
public String toString() {
diff --git a/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java b/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java
index 72c258ae5c3cc93e42b86af9426b5e9715dc1599..692658893f9d33938fc4fed854ad31c14c920e95 100644
index 72c258ae5c3cc93e42b86af9426b5e9715dc1599..c90f530b9cf556da950d8f61156159941815bd99 100644
--- a/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java
@@ -66,6 +66,54 @@ public class ProtoChunk implements IChunkAccess {
@@ -54,7 +54,7 @@ public class ProtoChunk implements IChunkAccess {
private final Map<BlockPosition, NBTTagCompound> i;
private final ChunkSection[] j;
private final List<NBTTagCompound> k;
- private final List<BlockPosition> l;
+ private final List<BlockPosition> l; private final java.util.concurrent.atomic.AtomicBoolean lightSourcesLocked = new java.util.concurrent.atomic.AtomicBoolean(); // Tuinity - warn when light sources are accessed while locked
private final ShortList[] m;
private final Map<StructureGenerator<?>, StructureStart<?>> n;
private final Map<StructureGenerator<?>, LongSet> o;
@@ -66,6 +66,73 @@ public class ProtoChunk implements IChunkAccess {
private volatile boolean u;
final World world; // Paper - Anti-Xray - Add world // Paper - private -> default
@ -5244,12 +5265,49 @@ index 72c258ae5c3cc93e42b86af9426b5e9715dc1599..692658893f9d33938fc4fed854ad31c1
+ this.blockEmptinessMap = emptinessMap;
+ }
+
+ private void checkLightSourceLock() {
+ if (!this.lightSourcesLocked.get()) {
+ return;
+ }
+
+ IllegalStateException thr = new IllegalStateException("Concurrent access of light sources by thread '" + Thread.currentThread().getName() + "'");
+ LOGGER.fatal(thr.getMessage(), thr);
+ throw thr;
+ }
+
+ public void lockLightSources() {
+ if (this.lightSourcesLocked.getAndSet(true)) {
+ throw new IllegalStateException("Light sources is already locked!");
+ }
+ }
+
+ public void releaseLightSources() {
+ this.lightSourcesLocked.set(false);
+ }
+ // Tuinity end - rewrite light engine
+
// Paper start - Anti-Xray - Add world
@Deprecated public ProtoChunk(ChunkCoordIntPair chunkcoordintpair, ChunkConverter chunkconverter) { this(chunkcoordintpair, chunkconverter, null); } // Notice for updates: Please make sure this constructor isn't used anywhere
public ProtoChunk(ChunkCoordIntPair chunkcoordintpair, ChunkConverter chunkconverter, World world) {
@@ -191,7 +239,7 @@ public class ProtoChunk implements IChunkAccess {
@@ -170,7 +237,9 @@ public class ProtoChunk implements IChunkAccess {
}
public void k(BlockPosition blockposition) {
+ this.checkLightSourceLock(); // Tuinity - make sure we don't access this concurrently
this.l.add(blockposition.immutableCopy());
+ this.checkLightSourceLock(); // Tuinity - make sure we don't access this concurrently
}
@Nullable
@@ -185,13 +254,15 @@ public class ProtoChunk implements IChunkAccess {
return iblockdata;
} else {
if (iblockdata.f() > 0) {
+ this.checkLightSourceLock(); // Tuinity - make sure we don't access this concurrently
this.l.add(new BlockPosition((i & 15) + this.getPos().d(), j, (k & 15) + this.getPos().e()));
+ this.checkLightSourceLock(); // Tuinity - make sure we don't access this concurrently
}
ChunkSection chunksection = this.a(j >> 4);
IBlockData iblockdata1 = chunksection.setType(i & 15, j & 15, k & 15, iblockdata);

View File

@ -1032,7 +1032,7 @@ index 0000000000000000000000000000000000000000..0d577aa1c7868ce89c3902535adcb554
+ }
+}
diff --git a/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
index edb9b246bf327f67a8500f77f81b46eb9e04c9b0..d29b537bbe4f852162b720d6b23b741829af21f9 100644
index edb9b246bf327f67a8500f77f81b46eb9e04c9b0..e1dc7c1025e19f7393a45719af8fe7aae016184d 100644
--- a/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
+++ b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
@@ -244,6 +244,25 @@ public final class TuinityConfig {
@ -1049,12 +1049,12 @@ index edb9b246bf327f67a8500f77f81b46eb9e04c9b0..d29b537bbe4f852162b720d6b23b7418
+
+ private static void newPlayerChunkManagement() {
+ playerMinChunkLoadRadius = TuinityConfig.getInt("player-chunks.min-load-radius", 2);
+ playerMaxConcurrentChunkSends = TuinityConfig.getDouble("player-chunks.max-concurrent-sends", 15.0);
+ playerMaxConcurrentChunkSends = TuinityConfig.getDouble("player-chunks.max-concurrent-sends", 5.0);
+ playerMaxConcurrentChunkLoads = TuinityConfig.getDouble("player-chunks.max-concurrent-loads", -6.0);
+ playerAutoConfigureSendViewDistance = TuinityConfig.getBoolean("player-chunks.autoconfig-send-distance", true);
+ // this costs server bandwidth. latest phosphor or starlight on the client fixes mc162253 anyways.
+ enableMC162253Workaround = TuinityConfig.getBoolean("player-chunks.enable-mc162253-workaround", true);
+ playerTargetChunkSendRate = TuinityConfig.getDouble("player-chunks.target-chunk-send-rate", 81.0 * 20.0);
+ playerTargetChunkSendRate = TuinityConfig.getDouble("player-chunks.target-chunk-send-rate", -35.0);
+ playerFrustumPrioritisation = TuinityConfig.getBoolean("player-chunks.enable-frustum-priority", false);
+ }
+
@ -1661,7 +1661,7 @@ index a802c45538943b570ca0daa3a40607dc80e696eb..af01f5d635eada7175b9d7fdb47a6553
// Paper end - per player view distance
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
index d6b34c6abebeac8445da3e76f341066952182e2b..df35ae12ecbe88ab396bed9850ef80433ff42fd4 100644
index d6b34c6abebeac8445da3e76f341066952182e2b..fc07e2014e961da5d97095c4ee6f972e2ece3ec3 100644
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
@@ -406,12 +406,12 @@ public class Chunk implements IChunkAccess {
@ -1680,7 +1680,7 @@ index d6b34c6abebeac8445da3e76f341066952182e2b..df35ae12ecbe88ab396bed9850ef8043
}
});
}
@@ -419,31 +419,7 @@ public class Chunk implements IChunkAccess {
@@ -419,31 +419,18 @@ public class Chunk implements IChunkAccess {
// this code handles the chunk sending
if (!areNeighboursLoaded(bitsetBefore, 1) && areNeighboursLoaded(bitsetAfter, 1)) {
@ -1709,11 +1709,22 @@ index d6b34c6abebeac8445da3e76f341066952182e2b..df35ae12ecbe88ab396bed9850ef8043
- }
- })));
- }
+ chunkMap.playerChunkManager.onChunkSendReady(this.loc.x, this.loc.z); // Tuinity - replace old player chunk loading system
+ // Tuinity start - replace old player chunk loading system
+ chunkProviderServer.serverThreadQueue.execute(() -> {
+ if (!Chunk.this.areNeighboursLoaded(1)) {
+ return;
+ }
+ Chunk.this.A();
+ if (!Chunk.this.areNeighboursLoaded(1)) {
+ return;
+ }
+ chunkMap.playerChunkManager.onChunkSendReady(this.loc.x, this.loc.z);
+ });
+ // Tuinity end - replace old player chunk loading system
}
// Paper end - no-tick view distance
}
@@ -1027,6 +1003,7 @@ public class Chunk implements IChunkAccess {
@@ -1027,6 +1014,7 @@ public class Chunk implements IChunkAccess {
// Paper end - neighbour cache
org.bukkit.Server server = this.world.getServer();
((WorldServer)this.world).getChunkProvider().addLoadedChunk(this); // Paper
@ -1739,10 +1750,10 @@ index 3fe1508b091e1fd0325eae50138d02fa6445c9ff..a19a26a88f247d359354902efeece992
return new Vec3D((double) baseblockposition.getX() + 0.5D, (double) baseblockposition.getY() + 0.5D, (double) baseblockposition.getZ() + 0.5D);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index b0801ca77620753ab61dba62429ce76e95aaba8f..91005e112950d79e1120e5595570970b94cd3c67 100644
index 0128a24f1de7468ff60ba2de0ed825ff62363f6b..09cef73a92679e47c8670e4e4c1ba988878aee24 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2638,14 +2638,14 @@ public class CraftWorld implements World {
@@ -2631,14 +2631,14 @@ public class CraftWorld implements World {
throw new IllegalArgumentException("View distance " + viewDistance + " is out of range of [2, 32]");
}
PlayerChunkMap chunkMap = getHandle().getChunkProvider().playerChunkMap;
@ -1759,7 +1770,7 @@ index b0801ca77620753ab61dba62429ce76e95aaba8f..91005e112950d79e1120e5595570970b
}
@Override
@@ -2654,11 +2654,22 @@ public class CraftWorld implements World {
@@ -2647,11 +2647,22 @@ public class CraftWorld implements World {
throw new IllegalArgumentException("View distance " + viewDistance + " is out of range of [2, 32]");
}
PlayerChunkMap chunkMap = getHandle().getChunkProvider().playerChunkMap;

View File

@ -7,10 +7,10 @@ Subject: [PATCH] Stop large move vectors in player packet handling from
Looks like we need to check three vectors, not two. fun.
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index 40a7f69e5e14078977ef615abf3a0f1f61d76f9f..83ad913e46f44aabb41b7e441cba2ef2f7bcbc46 100644
index 878c5342ca524768fbe2874b54bc12574852cefa..80b77cdffd64690bb9066b8745ea0ee08d60a7a4 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -540,6 +540,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -542,6 +542,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
double currDeltaZ = toZ - fromZ;
double d10 = Math.max(d6 * d6 + d7 * d7 + d8 * d8, (currDeltaX * currDeltaX + currDeltaY * currDeltaY + currDeltaZ * currDeltaZ) - 1);
// Paper end - fix large move vectors killing the server
@ -23,7 +23,7 @@ index 40a7f69e5e14078977ef615abf3a0f1f61d76f9f..83ad913e46f44aabb41b7e441cba2ef2
// CraftBukkit start - handle custom speeds and skipped ticks
@@ -586,9 +592,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -588,9 +594,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
//boolean flag = worldserver.getCubes(entity, entity.getBoundingBox().shrink(0.0625D)); // Tuinity - replace with different checks
AxisAlignedBB oldBox = entity.getBoundingBox(); // Tuinity - copy from player movement packet
@ -36,7 +36,7 @@ index 40a7f69e5e14078977ef615abf3a0f1f61d76f9f..83ad913e46f44aabb41b7e441cba2ef2
entity.move(EnumMoveType.PLAYER, new Vec3D(d6, d7, d8));
boolean didCollide = toX != entity.locX() || toY != entity.locY() || toZ != entity.locZ(); // Tuinity - needed here as the difference in Y can be reset - also note: this is only a guess at whether collisions took place, floating point errors can make this true when it shouldn't be...
double d11 = d7;
@@ -1293,6 +1299,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1295,6 +1301,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
double currDeltaZ = toZ - prevZ;
double d11 = Math.max(d7 * d7 + d8 * d8 + d9 * d9, (currDeltaX * currDeltaX + currDeltaY * currDeltaY + currDeltaZ * currDeltaZ) - 1);
// Paper end - fix large move vectors killing the server
@ -49,7 +49,7 @@ index 40a7f69e5e14078977ef615abf3a0f1f61d76f9f..83ad913e46f44aabb41b7e441cba2ef2
if (this.player.isSleeping()) {
if (d11 > 1.0D) {
@@ -1344,9 +1356,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1346,9 +1358,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
AxisAlignedBB axisalignedbb = this.player.getBoundingBox(); // Tuinity - diff on change, should be old AABB

View File

@ -0,0 +1,41 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Tue, 20 Apr 2021 18:04:54 -0700
Subject: [PATCH] Do not schedule poi task for each block write on chunk gen
Most of the time optional == optional1, so we shouldn't
schedule a task for each write.
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index fcf9af44702f34d75185eee0b3259fe0e57001b1..e3481eb71972c82edd892a99d1136c8248fb0f8c 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -2707,14 +2707,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
Optional<VillagePlaceType> optional1 = VillagePlaceType.b(iblockdata1);
// Paper start
- BlockPosition blockposition1 = blockposition.immutableCopy();
- this.getMinecraftServer().execute(() -> {
- if (!optional.isPresent() && this.getPoiStorage().test(blockposition1, com.google.common.base.Predicates.alwaysTrue())) {
- this.getPoiStorage().remove(blockposition1);
- }
- });
+ // Tuinity - oh god not for each block set
if (!Objects.equals(optional, optional1)) {
- //BlockPosition blockposition1 = blockposition.immutableCopy();
+ BlockPosition blockposition1 = blockposition.immutableCopy(); // Tuinity - oh god not for each block set
// Paper end
optional.ifPresent((villageplacetype) -> {
@@ -2725,6 +2720,11 @@ public class WorldServer extends World implements GeneratorAccessSeed {
});
optional1.ifPresent((villageplacetype) -> {
this.getMinecraftServer().execute(() -> {
+ // Tuinity start - remove POIs before inserting, better version of paper's diff
+ if (!optional.isPresent() && this.getPoiStorage().test(blockposition1, com.google.common.base.Predicates.alwaysTrue())) {
+ this.getPoiStorage().remove(blockposition1);
+ }
+ // Tuinity end - remove POIs before inserting, better version of paper's diff
this.y().a(blockposition1, villageplacetype);
PacketDebug.a(this, blockposition1);
});

View File

@ -0,0 +1,210 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Sun, 21 Mar 2021 11:22:10 -0700
Subject: [PATCH] Do not copy visible chunks
For servers with a lot of chunk holders, copying for each
tickDistanceManager call can take up quite a bit in
the function. I saw approximately 1/3rd of the function
on the copy.
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
index 848eb25ed0640db61a0f28bc26ddabd0444e9ed4..ec2b9995f1bf0f6cf029df7bfac526c2672acf3a 100644
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
@@ -407,7 +407,7 @@ public class PaperCommand extends Command {
int ticking = 0;
int entityTicking = 0;
- for (PlayerChunk chunk : world.getChunkProvider().playerChunkMap.updatingChunks.values()) {
+ for (PlayerChunk chunk : world.getChunkProvider().playerChunkMap.updatingChunks.getUpdatingMap().values()) { // Tuinity - change updating chunks map
if (chunk.getFullChunkIfCached() == null) {
continue;
}
diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
index d7eede51f1c4ebbe8e00b16efd6331c87db53bb4..b28995ecfd7f45e6b6197be96c418aa0d05d3383 100644
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
@@ -116,8 +116,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
private static final Logger LOGGER = LogManager.getLogger();
public static final int GOLDEN_TICKET = 33 + ChunkStatus.b();
// Paper start - faster copying
- public final Long2ObjectLinkedOpenHashMap<PlayerChunk> updatingChunks = new com.destroystokyo.paper.util.map.Long2ObjectLinkedOpenHashMapFastCopy<>(); // Paper - faster copying
- public final Long2ObjectLinkedOpenHashMap<PlayerChunk> visibleChunks = new ProtectedVisibleChunksMap(); // Paper - faster copying
+ // Tuinity start - Don't copy
+ public final com.destroystokyo.paper.util.map.QueuedChangesMapLong2Object<PlayerChunk> updatingChunks = new com.destroystokyo.paper.util.map.QueuedChangesMapLong2Object<>();
+ // Tuinity end - Don't copy
private class ProtectedVisibleChunksMap extends com.destroystokyo.paper.util.map.Long2ObjectLinkedOpenHashMapFastCopy<PlayerChunk> {
@Override
@@ -140,8 +141,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
}
// Paper end
- public final com.destroystokyo.paper.util.map.Long2ObjectLinkedOpenHashMapFastCopy<PlayerChunk> pendingVisibleChunks = new com.destroystokyo.paper.util.map.Long2ObjectLinkedOpenHashMapFastCopy<PlayerChunk>(); // Paper - this is used if the visible chunks is updated while iterating only
- public transient com.destroystokyo.paper.util.map.Long2ObjectLinkedOpenHashMapFastCopy<PlayerChunk> visibleChunksClone; // Paper - used for async access of visible chunks, clone and cache only when needed
+ // Tuinity - Don't copy
private final Long2ObjectLinkedOpenHashMap<PlayerChunk> pendingUnload;
public final LongSet loadedChunks; // Paper - private -> public
public final WorldServer world;
@@ -735,7 +735,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@Nullable
public PlayerChunk getUpdatingChunk(long i) { // Paper
- return (PlayerChunk) this.updatingChunks.get(i);
+ return this.updatingChunks.getUpdating(i); // Tuinity - Don't copy
}
// Paper start - remove cloning of visible chunks unless accessed as a collection async
@@ -743,47 +743,25 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
private boolean isIterating = false;
private boolean hasPendingVisibleUpdate = false;
public void forEachVisibleChunk(java.util.function.Consumer<PlayerChunk> consumer) {
- org.spigotmc.AsyncCatcher.catchOp("forEachVisibleChunk");
- boolean prev = isIterating;
- isIterating = true;
- try {
- for (PlayerChunk value : this.visibleChunks.values()) {
- consumer.accept(value);
- }
- } finally {
- this.isIterating = prev;
- if (!this.isIterating && this.hasPendingVisibleUpdate) {
- ((ProtectedVisibleChunksMap)this.visibleChunks).copyFrom(this.pendingVisibleChunks);
- this.pendingVisibleChunks.clear();
- this.hasPendingVisibleUpdate = false;
- }
- }
+ throw new UnsupportedOperationException(); // Tuinity - Don't copy
}
public Long2ObjectLinkedOpenHashMap<PlayerChunk> getVisibleChunks() {
- if (Thread.currentThread() == this.world.serverThread) {
- return this.visibleChunks;
- } else {
- synchronized (this.visibleChunks) {
- if (DEBUG_ASYNC_VISIBLE_CHUNKS) new Throwable("Async getVisibleChunks").printStackTrace();
- if (this.visibleChunksClone == null) {
- this.visibleChunksClone = this.hasPendingVisibleUpdate ? this.pendingVisibleChunks.clone() : ((ProtectedVisibleChunksMap)this.visibleChunks).clone();
- }
- return this.visibleChunksClone;
- }
+ // Tuinity start - Don't copy (except in rare cases)
+ synchronized (this.updatingChunks) {
+ return this.updatingChunks.getVisibleMap().clone();
}
+ // Tuinity end - Don't copy (except in rare cases)
}
// Paper end
@Nullable
public PlayerChunk getVisibleChunk(long i) { // Paper - protected -> public
- // Paper start - mt safe get
- if (Thread.currentThread() != this.world.serverThread) {
- synchronized (this.visibleChunks) {
- return (PlayerChunk) (this.hasPendingVisibleUpdate ? this.pendingVisibleChunks.get(i) : ((ProtectedVisibleChunksMap)this.visibleChunks).safeGet(i));
- }
+ // Tuinity start - Don't copy
+ if (Thread.currentThread() == this.world.serverThread) {
+ return this.updatingChunks.getVisible(i);
}
- return (PlayerChunk) (this.hasPendingVisibleUpdate ? this.pendingVisibleChunks.get(i) : ((ProtectedVisibleChunksMap)this.visibleChunks).safeGet(i));
- // Paper end
+ return this.updatingChunks.getVisibleAsync(i);
+ // Tuinity end - Don't copy
}
protected final IntSupplier getPrioritySupplier(long i) { return c(i); } // Paper - OBFHELPER
@@ -911,7 +889,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
this.getVillagePlace().dequeueUnload(playerchunk.location.pair()); // Tuinity - unload POI data
- this.updatingChunks.put(i, playerchunk);
+ this.updatingChunks.queueUpdate(i, playerchunk); // Tuinity - Don't copy
this.updatingChunksModified = true;
}
@@ -1064,7 +1042,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
while (longiterator.hasNext()) { // Spigot
long j = longiterator.nextLong();
longiterator.remove(); // Spigot
- PlayerChunk playerchunk = (PlayerChunk) this.updatingChunks.remove(j);
+ PlayerChunk playerchunk = this.updatingChunks.queueRemove(j); // Tuinity - Don't copy
if (playerchunk != null) {
this.pendingUnload.put(j, playerchunk);
@@ -1218,19 +1196,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
if (!this.updatingChunksModified) {
return false;
} else {
- // Paper start - stop cloning visibleChunks
- synchronized (this.visibleChunks) {
- if (isIterating) {
- hasPendingVisibleUpdate = true;
- this.pendingVisibleChunks.copyFrom((com.destroystokyo.paper.util.map.Long2ObjectLinkedOpenHashMapFastCopy<PlayerChunk>)this.updatingChunks);
- } else {
- hasPendingVisibleUpdate = false;
- this.pendingVisibleChunks.clear();
- ((ProtectedVisibleChunksMap)this.visibleChunks).copyFrom((com.destroystokyo.paper.util.map.Long2ObjectLinkedOpenHashMapFastCopy<PlayerChunk>)this.updatingChunks);
- this.visibleChunksClone = null;
- }
+ // Tuinity start - Don't copy
+ synchronized (this.updatingChunks) {
+ this.updatingChunks.performUpdates();
}
- // Paper end
+ // Tuinity end - Don't copy
this.updatingChunksModified = false;
return true;
@@ -1701,7 +1671,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
public int d() {
- return this.visibleChunks.size();
+ return this.updatingChunks.getVisibleMap().size(); // Tuinity - Don't copy
}
protected PlayerChunkMap.a e() {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 09cef73a92679e47c8670e4e4c1ba988878aee24..f7b17db87e351e8218d7865c3f9a0162892ca269 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -298,7 +298,7 @@ public class CraftWorld implements World {
public int getTileEntityCount() {
return net.minecraft.server.MCUtil.ensureMain(() -> {
// We don't use the full world tile entity list, so we must iterate chunks
- Long2ObjectLinkedOpenHashMap<PlayerChunk> chunks = world.getChunkProvider().playerChunkMap.visibleChunks;
+ Long2ObjectLinkedOpenHashMap<PlayerChunk> chunks = world.getChunkProvider().playerChunkMap.updatingChunks.getVisibleMap(); // Tuinity - change updating chunks map
int size = 0;
for (PlayerChunk playerchunk : chunks.values()) {
net.minecraft.world.level.chunk.Chunk chunk = playerchunk.getChunk();
@@ -317,7 +317,7 @@ public class CraftWorld implements World {
return net.minecraft.server.MCUtil.ensureMain(() -> {
int ret = 0;
- for (PlayerChunk chunkHolder : world.getChunkProvider().playerChunkMap.visibleChunks.values()) {
+ for (PlayerChunk chunkHolder : world.getChunkProvider().playerChunkMap.updatingChunks.getVisibleMap().values()) { // Tuinity - change updating chunks map
if (chunkHolder.getChunk() != null) {
++ret;
}
@@ -471,13 +471,16 @@ public class CraftWorld implements World {
public Chunk[] getLoadedChunks() {
// Paper start
if (Thread.currentThread() != world.getMinecraftWorld().serverThread) {
- synchronized (world.getChunkProvider().playerChunkMap.visibleChunks) {
- Long2ObjectLinkedOpenHashMap<PlayerChunk> chunks = world.getChunkProvider().playerChunkMap.visibleChunks;
- return chunks.values().stream().map(PlayerChunk::getFullChunk).filter(Objects::nonNull).map(net.minecraft.world.level.chunk.Chunk::getBukkitChunk).toArray(Chunk[]::new);
+ // Tuinity start - change updating chunks map
+ Long2ObjectLinkedOpenHashMap<PlayerChunk> chunks;
+ synchronized (world.getChunkProvider().playerChunkMap.updatingChunks) {
+ chunks = world.getChunkProvider().playerChunkMap.updatingChunks.getVisibleMap().clone();
}
+ return chunks.values().stream().map(PlayerChunk::getFullChunk).filter(Objects::nonNull).map(net.minecraft.world.level.chunk.Chunk::getBukkitChunk).toArray(Chunk[]::new);
+ // Tuinity end - change updating chunks map
}
// Paper end
- Long2ObjectLinkedOpenHashMap<PlayerChunk> chunks = world.getChunkProvider().playerChunkMap.visibleChunks;
+ Long2ObjectLinkedOpenHashMap<PlayerChunk> chunks = world.getChunkProvider().playerChunkMap.updatingChunks.getVisibleMap(); // Tuinity - change updating chunks map
return chunks.values().stream().map(PlayerChunk::getFullChunk).filter(Objects::nonNull).map(net.minecraft.world.level.chunk.Chunk::getBukkitChunk).toArray(Chunk[]::new);
}

View File

@ -0,0 +1,37 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Sun, 21 Mar 2021 17:32:47 -0700
Subject: [PATCH] Correctly handle recursion for chunkholder updates
If a chunk ticket level is brought up while unloading it would
cause a recursive call which would handle the increase but then
the caller would think the chunk would be unloaded.
diff --git a/src/main/java/net/minecraft/server/level/PlayerChunk.java b/src/main/java/net/minecraft/server/level/PlayerChunk.java
index d9b134302f739efd93f50e93c8730b474f9a8ccf..63c2f6d3312d9005ef2f821456e3946f3a9a0c3b 100644
--- a/src/main/java/net/minecraft/server/level/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/level/PlayerChunk.java
@@ -599,8 +599,10 @@ public class PlayerChunk {
this.ticketLevel = i;
}
+ protected long updateCount; // Tuinity - correctly handle recursion
protected void a(PlayerChunkMap playerchunkmap) {
com.tuinity.tuinity.util.TickThread.ensureTickThread("Async ticket level update"); // Tuinity
+ long updateCount = ++this.updateCount; // Tuinity - correctly handle recursion
ChunkStatus chunkstatus = getChunkStatus(this.oldTicketLevel);
ChunkStatus chunkstatus1 = getChunkStatus(this.ticketLevel);
boolean flag = this.oldTicketLevel <= PlayerChunkMap.GOLDEN_TICKET;
@@ -630,6 +632,12 @@ public class PlayerChunk {
// Run callback right away if the future was already done
playerchunkmap.callbackExecutor.run();
+ // Tuinity start - correctly handle recursion
+ if (this.updateCount != updateCount) {
+ // something else updated ticket level for us.
+ return;
+ }
+ // Tuinity end - correctly handle recursion
}
// CraftBukkit end
CompletableFuture completablefuture;

View File

@ -0,0 +1,284 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Sun, 21 Mar 2021 16:25:42 -0700
Subject: [PATCH] Replace ticket level propagator
Mojang's propagator is slow, and this isn't surprising
given it's built on the same utilities the vanilla light engine
is built on. The simple propagator I wrote is approximately 4x
faster when simulating player movement. For a long time timing
reports have shown this function take up significant tick, (
approx 10% or more), and async sampling data shows the level
propagation alone takes up a significant amount. So this
should help with that. A big side effect is that mid-tick
will be more effective, since more time will be allocated
to actually processing chunk tasks vs the ticket level updates.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMapDistance.java b/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
index ad90735b5daa658cdd5467eadcb29183d018b1fd..a5fc023312c99e591fc269999c28a766a46f8849 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
@@ -8,6 +8,7 @@ import it.unimi.dsi.fastutil.longs.Long2ByteOpenHashMap;
import it.unimi.dsi.fastutil.longs.Long2IntMap;
import it.unimi.dsi.fastutil.longs.Long2IntMaps;
import it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap;
+import it.unimi.dsi.fastutil.longs.Long2IntLinkedOpenHashMap; // Tuinity
import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
import it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry;
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
@@ -40,7 +41,7 @@ public abstract class ChunkMapDistance {
private static final int b = 33 + ChunkStatus.a(ChunkStatus.FULL) - 2;
private final Long2ObjectMap<ObjectSet<EntityPlayer>> c = new Long2ObjectOpenHashMap();
public final Long2ObjectOpenHashMap<ArraySetSorted<Ticket<?>>> tickets = new Long2ObjectOpenHashMap();
- private final ChunkMapDistance.a ticketLevelTracker = new ChunkMapDistance.a(); final ChunkMapDistance.a getTicketTracker() { return this.ticketLevelTracker; } // Tuinity - OBFHELPER
+ //private final ChunkMapDistance.a ticketLevelTracker = new ChunkMapDistance.a(); final ChunkMapDistance.a getTicketTracker() { return this.ticketLevelTracker; } // Tuinity - OBFHELPER // Tuinity - replace ticket level propagator
public static final int MOB_SPAWN_RANGE = 8; // private final ChunkMapDistance.b f = new ChunkMapDistance.b(8); // Paper - no longer used
//private final ChunkMapDistance.c g = new ChunkMapDistance.c(33); // Tuinity - no longer used
// Paper start use a queue, but still keep unique requirement
@@ -77,7 +78,7 @@ public abstract class ChunkMapDistance {
return ticket.getTicketType() == type;
});
if (changed) {
- this.getTicketTracker().update(chunk, getLowestTicketLevel(tickets), false);
+ this.updateTicketLevel(chunk, getLowestTicketLevel(tickets)); // Tuinity - replace ticket level propagator
}
}
@@ -102,6 +103,45 @@ public abstract class ChunkMapDistance {
tickets.add(ticket); // re-add with new expire time and ticket level
}
// Tuinity end - delay chunk unloads
+ // Tuinity start - replace ticket level propagator
+ protected final Long2IntLinkedOpenHashMap ticketLevelUpdates = new Long2IntLinkedOpenHashMap() {
+ @Override
+ protected void rehash(int newN) {
+ // no downsizing allowed
+ if (newN < this.n) {
+ return;
+ }
+ super.rehash(newN);
+ }
+ };
+ protected final com.tuinity.tuinity.util.misc.Delayed8WayDistancePropagator2D ticketLevelPropagator = new com.tuinity.tuinity.util.misc.Delayed8WayDistancePropagator2D(
+ (long coordinate, byte oldLevel, byte newLevel) -> {
+ ChunkMapDistance.this.ticketLevelUpdates.putAndMoveToLast(coordinate, convertBetweenTicketLevels(newLevel));
+ }
+ );
+ // function for converting between ticket levels and propagator levels and vice versa
+ // the problem is the ticket level propagator will propagate from a set source down to zero, whereas mojang expects
+ // levels to propagate from a set value up to a maximum value. so we need to convert the levels we put into the propagator
+ // and the levels we get out of the propagator
+
+ // this maps so that GOLDEN_TICKET + 1 will be 0 in the propagator, GOLDEN_TICKET will be 1, and so on
+ // we need GOLDEN_TICKET+1 as 0 because anything >= GOLDEN_TICKET+1 should be unloaded
+ public static int convertBetweenTicketLevels(final int level) {
+ return PlayerChunkMap.GOLDEN_TICKET - level + 1;
+ }
+
+ protected final int getPropagatedTicketLevel(final long coordinate) {
+ return convertBetweenTicketLevels(this.ticketLevelPropagator.getLevel(coordinate));
+ }
+
+ protected final void updateTicketLevel(final long coordinate, final int ticketLevel) {
+ if (ticketLevel > PlayerChunkMap.GOLDEN_TICKET) {
+ this.ticketLevelPropagator.removeSource(coordinate);
+ } else {
+ this.ticketLevelPropagator.setSource(coordinate, convertBetweenTicketLevels(ticketLevel));
+ }
+ }
+ // Tuinity end - replace ticket level propagator
protected ChunkMapDistance(Executor executor, Executor executor1) {
executor1.getClass();
@@ -146,7 +186,7 @@ public abstract class ChunkMapDistance {
this.computeDelayedTicketFor(entry.getLongKey(), tempLevel[0], entry.getValue());
}
// Tuinity end - delay chunk unloads
- this.ticketLevelTracker.update(entry.getLongKey(), getLowestTicketLevel((ArraySetSorted) entry.getValue()), false);
+ this.updateTicketLevel(entry.getLongKey(), getLowestTicketLevel((ArraySetSorted) entry.getValue())); // Tuinity - replace ticket level propagator
}
if (((ArraySetSorted) entry.getValue()).isEmpty()) {
@@ -166,66 +206,99 @@ public abstract class ChunkMapDistance {
protected abstract boolean a(long i);
@Nullable
- protected abstract PlayerChunk b(long i);
+ protected abstract PlayerChunk b(long i); protected final PlayerChunk getUpdatingChunk(long i) { return this.b(i); } // Tuinity - OBFHELPER
@Nullable
- protected abstract PlayerChunk a(long i, int j, @Nullable PlayerChunk playerchunk, int k);
+ protected abstract PlayerChunk a(long i, int j, @Nullable PlayerChunk playerchunk, int k); protected final PlayerChunk updateTicketLevel(long coord, int newLevel, @Nullable PlayerChunk playerchunk, int oldLevel) { return this.a(coord, newLevel, playerchunk, oldLevel); } // Tuinity - OBFHELPER
+ protected long ticketLevelUpdateCount; // Tuinity - replace ticket level propagator
public boolean a(PlayerChunkMap playerchunkmap) {
com.tuinity.tuinity.util.TickThread.softEnsureTickThread("Cannot tick ChunkMapDistance off of the main-thread");// Tuinity
//this.f.a(); // Paper - no longer used
AsyncCatcher.catchOp("DistanceManagerTick"); // Paper
//this.g.a(); // Tuinity - no longer used
- int i = Integer.MAX_VALUE - this.ticketLevelTracker.a(Integer.MAX_VALUE);
- boolean flag = i != 0;
+ boolean flag = this.ticketLevelPropagator.propagateUpdates(); // Tuinity - replace ticket level propagator
if (flag) {
;
}
- // Paper start
- if (!this.pendingChunkUpdates.isEmpty()) {
- this.pollingPendingChunkUpdates = true; try {
- while(!this.pendingChunkUpdates.isEmpty()) {
- PlayerChunk remove = this.pendingChunkUpdates.remove();
- remove.isUpdateQueued = false;
- remove.a(playerchunkmap);
- }
- } finally { this.pollingPendingChunkUpdates = false; }
- // Paper end
- return true;
- } else {
- if (!this.l.isEmpty()) {
- LongIterator longiterator = this.l.iterator();
+ // Tuinity start - replace level propagator
+ if (!this.ticketLevelUpdates.isEmpty()) {
+ boolean oldPolling = this.pollingPendingChunkUpdates;
+ this.pollingPendingChunkUpdates = true;
+ try {
+ for (java.util.Iterator<Long2IntMap.Entry> iterator = this.ticketLevelUpdates.long2IntEntrySet().fastIterator(); iterator.hasNext(); ) {
+ Long2IntMap.Entry entry = iterator.next();
+ long key = entry.getLongKey();
+ int newLevel = entry.getIntValue();
+ PlayerChunk chunk = this.getUpdatingChunk(key);
- while (longiterator.hasNext()) {
- long j = longiterator.nextLong();
+ if (chunk == null && newLevel > PlayerChunkMap.GOLDEN_TICKET) {
+ // not loaded and it shouldn't be loaded!
+ continue;
+ }
- if (this.e(j).stream().anyMatch((ticket) -> {
- return ticket.getTicketType() == TicketType.PLAYER;
- })) {
- PlayerChunk playerchunk = playerchunkmap.getUpdatingChunk(j);
+ int currentLevel = chunk == null ? PlayerChunkMap.GOLDEN_TICKET + 1 : chunk.getTicketLevel();
- if (playerchunk == null) {
- throw new IllegalStateException();
+ if (currentLevel == newLevel) {
+ // nothing to do
+ continue;
+ }
+
+ this.updateTicketLevel(key, newLevel, chunk, currentLevel);
+ }
+
+ long recursiveCheck = ++this.ticketLevelUpdateCount;
+ while (!this.ticketLevelUpdates.isEmpty()) {
+ long key = this.ticketLevelUpdates.firstLongKey();
+ int newLevel = this.ticketLevelUpdates.removeFirstInt();
+ PlayerChunk chunk = this.getUpdatingChunk(key);
+
+ if (chunk == null) {
+ if (newLevel <= PlayerChunkMap.GOLDEN_TICKET) {
+ throw new IllegalStateException("Expected chunk holder to be created");
}
+ // not loaded and it shouldn't be loaded!
+ continue;
+ }
- CompletableFuture<Either<Chunk, PlayerChunk.Failure>> completablefuture = playerchunk.b();
+ int currentLevel = chunk.oldTicketLevel;
- completablefuture.thenAccept((either) -> {
- this.m.execute(() -> {
- this.k.a(ChunkTaskQueueSorter.a(() -> {
- }, j, false));
- });
- });
+ if (currentLevel == newLevel) {
+ // nothing to do
+ continue;
+ }
+
+ chunk.handleLevelUpdate(playerchunkmap);
+ if (recursiveCheck != this.ticketLevelUpdateCount) {
+ if (!this.ticketLevelUpdates.isEmpty()) {
+ throw new IllegalStateException("Recursive call should have processed updates");
+ }
+ break;
}
}
- this.l.clear();
+ for (;;) {
+ if (recursiveCheck != this.ticketLevelUpdateCount) {
+ break;
+ }
+ PlayerChunk pendingUpdate = this.pendingChunkUpdates.poll();
+ if (pendingUpdate == null) {
+ break;
+ }
+
+ pendingUpdate.handleLevelUpdate(playerchunkmap);
+ }
+ } finally {
+ this.pollingPendingChunkUpdates = oldPolling;
}
- return flag;
+ return true;
}
+
+ return flag;
+ // Tuinity end - replace level propagator
}
boolean pollingPendingChunkUpdates = false; // Paper
@@ -237,7 +310,7 @@ public abstract class ChunkMapDistance {
ticket1.a(this.currentTick);
if (ticket.b() < j) {
- this.ticketLevelTracker.update(i, ticket.b(), true);
+ this.updateTicketLevel(i, ticket.b()); // Tuinity - replace ticket level propagator
}
return ticket == ticket1; // CraftBukkit
@@ -263,7 +336,7 @@ public abstract class ChunkMapDistance {
}
int newLevel = getLowestTicketLevel(arraysetsorted); // Paper
- if (newLevel > oldLevel) this.ticketLevelTracker.update(i, newLevel, false); // Paper
+ if (newLevel > oldLevel) this.updateTicketLevel(i, newLevel); // Paper // Tuinity - replace ticket level propagator
return removed; // CraftBukkit
}
@@ -517,7 +590,7 @@ public abstract class ChunkMapDistance {
ArraySetSorted<Ticket<?>> tickets = entry.getValue();
if (tickets.remove(target)) {
// copied from removeTicket
- this.ticketLevelTracker.update(entry.getLongKey(), getLowestTicketLevel(tickets), false);
+ this.updateTicketLevel(entry.getLongKey(), getLowestTicketLevel(tickets)); // Tuinity - replace ticket level propagator
// can't use entry after it's removed
if (tickets.isEmpty()) {
diff --git a/src/main/java/net/minecraft/server/level/PlayerChunk.java b/src/main/java/net/minecraft/server/level/PlayerChunk.java
index 63c2f6d3312d9005ef2f821456e3946f3a9a0c3b..86f156587a0939b28c5cf6f64907255c1c4f8b35 100644
--- a/src/main/java/net/minecraft/server/level/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/level/PlayerChunk.java
@@ -55,7 +55,7 @@ public class PlayerChunk {
private volatile CompletableFuture<Either<Chunk, PlayerChunk.Failure>> entityTickingFuture; private volatile boolean isEntityTickingReady; // Paper - cache chunk ticking stage
private CompletableFuture<IChunkAccess> chunkSave;
public int oldTicketLevel;
- private int ticketLevel;
+ private int ticketLevel; public final void setTicketLevel(final int level) { this.ticketLevel = level; } // Tuinity - OBFHELPER
volatile int n; public final int getCurrentPriority() { return n; } // Paper - OBFHELPER - make volatile since this is concurrently accessed
public final ChunkCoordIntPair location; // Paper - private -> public
private boolean p;
@@ -600,6 +600,7 @@ public class PlayerChunk {
}
protected long updateCount; // Tuinity - correctly handle recursion
+ protected final void handleLevelUpdate(PlayerChunkMap playerchunkmap) { this.a(playerchunkmap); } // Tuinity - OBFHELPER
protected void a(PlayerChunkMap playerchunkmap) {
com.tuinity.tuinity.util.TickThread.ensureTickThread("Async ticket level update"); // Tuinity
long updateCount = ++this.updateCount; // Tuinity - correctly handle recursion

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Modify POM
diff --git a/pom.xml b/pom.xml
index cea712b94bb32ccda2895670859839d660bd0748..8f864ce333418e6eb617dd55a9e9f73887f981a6 100644
index 6fe8dad8df109531f2b38fbfcb58b6807dbb8cf0..48c53278ab9a02c614219e87fbe0a52f2c322e96 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,11 +1,11 @@
@ -106,15 +106,7 @@ index cea712b94bb32ccda2895670859839d660bd0748..8f864ce333418e6eb617dd55a9e9f738
</dependencies>
<repositories>
@@ -190,27 +205,37 @@
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
- </repositories>
-
- <repositories>
<!-- Purpur - Snapshots -->
<repository>
@@ -190,19 +205,32 @@
<id>purpur-snapshots</id>
<url>https://repo.pl3x.net/</url>
</repository>

View File

@ -27,18 +27,18 @@ index 4d8740678049aa749b42618470e9cc838555528d..159f72efe20f8fee940bd00ae7af00f0
metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> {
Map<String, Map<String, Integer>> map = new HashMap<>();
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
index 4d9e685c691a37078ff7452e50ab8c13999dbe10..0751ce5b578eff8b1dad44e976b656b6cfa7daf3 100644
index e56ebeaaa12494817d31099eed54ef2c50b98b9e..eb0509386feb156ae9c8ca0eb25c0120c9332b19 100644
--- a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
+++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
@@ -17,7 +17,7 @@ public final class PaperConsole extends SimpleTerminalConsole {
@@ -19,7 +19,7 @@ public final class PaperConsole extends SimpleTerminalConsole {
@Override
protected LineReader buildReader(LineReaderBuilder builder) {
return super.buildReader(builder
builder
- .appName("Purpur") // Purpur
+ .appName("Yatopia") // Yatopia
.variable(LineReader.HISTORY_FILE, java.nio.file.Paths.get(".console_history"))
.completer(new ConsoleCommandCompleter(this.server))
);
.option(LineReader.Option.COMPLETE_IN_WORD, true);
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
index 6355f246809982f6da34671be22066a83cfba42c..9a9e2692cc058ed3bcafd0cee37c4c9012e4a983 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java

View File

@ -9,7 +9,7 @@ Co-authored-by: Mykyta Komarnytskyy <nkomarn@hotmail.com>
Co-authored-by: Ivan Pekov <ivan@mrivanplays.com>
diff --git a/pom.xml b/pom.xml
index 8f864ce333418e6eb617dd55a9e9f73887f981a6..eb1c3ea442ca73317b18179ad7de3ce16a60d3d5 100644
index 48c53278ab9a02c614219e87fbe0a52f2c322e96..3a05118d764a6a934b4f834c3080e4ed20c227e9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -197,6 +197,12 @@

View File

@ -7,10 +7,10 @@ Original patch by:
Co-authored-by: tr7zw <tr7zw@live.de>
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index f31b49381d1a70f66406dc6d048f84b45257c860..78d462ca99da4f8d3bab94b081e8cd88699389cb 100644
index 7fa91a3cb0d48396d106a4a729533f95e91562c0..0ca3e2d7366ee295d369e87b7ce2edd84df68ab5 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1054,6 +1054,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1064,6 +1064,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// Paper End
// Spigot End
@ -19,7 +19,7 @@ index f31b49381d1a70f66406dc6d048f84b45257c860..78d462ca99da4f8d3bab94b081e8cd88
protected void w() {
try {
long serverStartTime = SystemUtils.getMonotonicNanos(); // Paper
@@ -1125,7 +1127,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1135,7 +1137,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.a(gameprofilertick);
this.methodProfiler.a();
this.methodProfiler.enter("tick");

View File

@ -60,7 +60,7 @@ index d710834422afa1d4336f68e2425aaffd64d444e2..26a3eeb58a7862e1efdf02d39a56f49b
playerconnection.sendPacket(new PacketPlayOutAbilities(entityplayer.abilities));
playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex));
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 59ba2332cd250c3bfff7505cd02be346ae0f38c7..d2113b48b996ffaa26bd037665935108b0a57f64 100644
index 890326cf415a7c5b0d62e9597895d3060ba12d7a..fa94b5da0b2ae83093305ad6be7fac8ec15ec46d 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -367,6 +367,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -59,7 +59,7 @@ index 27599f422be266ad2fdbda49617661801c2c1991..2457b240f3b49dbd5fe0eb603d86418f
}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index d2113b48b996ffaa26bd037665935108b0a57f64..d24daa68e7acdc76c35e41d6d6dc64399f1e25f2 100644
index fa94b5da0b2ae83093305ad6be7fac8ec15ec46d..1e326c5506dcd1dc4c5e5252a901c61485105eb3 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -3056,7 +3056,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add NBT API as a first-class lib
diff --git a/pom.xml b/pom.xml
index eb1c3ea442ca73317b18179ad7de3ce16a60d3d5..39488ce4694d0a1bac949d6d6bfd99569b2d035e 100644
index 3a05118d764a6a934b4f834c3080e4ed20c227e9..d0259f18488e1ecf0276865e0ff7958726a40033 100644
--- a/pom.xml
+++ b/pom.xml
@@ -379,6 +379,10 @@
@@ -374,6 +374,10 @@
<shadedPattern>net/minecraft/server/v${minecraft_version}/$2</shadedPattern>
<rawString>true</rawString>
</relocation>

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Modify default configs
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 4b9fdb4f04b333ce32f7fca8f279bf989e6fd728..992eb7b286becc03549136d031b677dbd6877c17 100644
index a0ed8ed1d6b89a4f10dff645e09eaff303fb3f8a..3115c6b308c1371f065dcbb60d9443f439e24560 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -206,7 +206,7 @@ public class PaperConfig {

View File

@ -65,7 +65,7 @@ index 8078e4f5b79eaada03508265ba6b81db636e822a..b2d26289a6f501b093ec229394f75864
};
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index d24daa68e7acdc76c35e41d6d6dc64399f1e25f2..5096afa6c11810decc4b4bd73867c48594b932b2 100644
index 1e326c5506dcd1dc4c5e5252a901c61485105eb3..cb4d336e0812ad44d0a936f875853440c556f8b7 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -2736,10 +2736,12 @@ public abstract class EntityLiving extends Entity {

View File

@ -9,7 +9,7 @@ Original code by JellySquid, licensed under GNU Lesser General Public License v3
you can find the original code on https://github.com/CaffeineMC/lithium-fabric/ (Yarn mappings)
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java
index f303c5d6b2e55fc9fd8b49ec21121805e7351034..0e76758fb85870d0030e7a06a384f6411080dd01 100644
index 02e8288473138dcea008d6157318758e8d7ee3be..10611b8c72b0c0c3202e9ae5b956974ec1a37aa3 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java
@@ -12,6 +12,7 @@ import java.util.stream.Stream;

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Optimize some stuff in WorldServer ticking
Replaced some streams and some array lists with glue lists
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index 80b08904143b7656aa125a396bbd2866370c8906..e6b9becb87130ee76ccdd087e3c8dee7b18898e4 100644
index 1b15216d6a03c1031d2bbea2e0243a0de9a9199f..66b5fdd78aa8d394795550aec1203a4de9e4143d 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -1007,12 +1007,21 @@ public class WorldServer extends World implements GeneratorAccessSeed {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Fix LightEngineThreaded memory leak
diff --git a/src/main/java/net/minecraft/server/level/LightEngineThreaded.java b/src/main/java/net/minecraft/server/level/LightEngineThreaded.java
index 4d651cc21a9cb2fdeabff62d8978c3ec4abe2f68..470a45d2a59abf9223166bfe5376c3fb3f5d212c 100644
index ad584ba21c6e201b778f32cea6d7cc5bf67f9746..229bc64e65696319a83a0f7a7ba6f75752de44cd 100644
--- a/src/main/java/net/minecraft/server/level/LightEngineThreaded.java
+++ b/src/main/java/net/minecraft/server/level/LightEngineThreaded.java
@@ -123,6 +123,8 @@ public class LightEngineThreaded extends LightEngine implements AutoCloseable {
@ -18,7 +18,7 @@ index 4d651cc21a9cb2fdeabff62d8978c3ec4abe2f68..470a45d2a59abf9223166bfe5376c3fb
return this.size == 0 && this.pendingTasks.isEmpty();
}
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index e6b9becb87130ee76ccdd087e3c8dee7b18898e4..7cedb4aaf4a002945866a0ca56eb9b0e7ae28de6 100644
index 66b5fdd78aa8d394795550aec1203a4de9e4143d..8e978b74e3f5573123fa831bc1e64c38c4cbd2e6 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -2055,6 +2055,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {

View File

@ -10,10 +10,10 @@ added.
These changes aim to reduce that load whenever you are using the /whitelist command.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 78d462ca99da4f8d3bab94b081e8cd88699389cb..df1d8aa345518101320a4ec0636c34ebb872ff98 100644
index 0ca3e2d7366ee295d369e87b7ce2edd84df68ab5..a317cd679a840d8e5c5a6f08ad760c53ebaf3edf 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2107,6 +2107,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -2117,6 +2117,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
return new DataPackConfiguration(list, list1);
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable flight checks
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index 1e64c2467c1c96e93f6843a9f7283baf2bd33a61..b3bb63559add154888b5e19f2304b5e4a8a9eacc 100644
index 7abd1e47b6f3bed48228ed6dc2a6a27a877e03c2..8bdea98d5519938d5da30cd603e6f6d828bed52c 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -326,7 +326,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -328,7 +328,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
++this.e;
this.processedMovePackets = this.receivedMovePackets;
if (this.B && !this.player.isSleeping()) {
@ -17,7 +17,7 @@ index 1e64c2467c1c96e93f6843a9f7283baf2bd33a61..b3bb63559add154888b5e19f2304b5e4
PlayerConnection.LOGGER.warn("{} was kicked for floating too long!", this.player.getDisplayName().getString());
this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickPlayerMessage); // Paper - use configurable kick message
return;
@@ -345,7 +345,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -347,7 +347,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
this.w = this.r.locY();
this.x = this.r.locZ();
if (this.D && this.player.getRootVehicle().getRidingPassenger() == this.player) {

View File

@ -8,10 +8,10 @@ Paper does alleviate this quite well by only firing if plugins are listening, bu
This patch implements a hard toggle for the event.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index df1d8aa345518101320a4ec0636c34ebb872ff98..d90deadd51fe2fadbd972f029204bee92640663d 100644
index a317cd679a840d8e5c5a6f08ad760c53ebaf3edf..75481bd6265054879877afb6c4686155c3caaf6d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1536,7 +1536,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1546,7 +1546,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
while (iterator.hasNext()) {
WorldServer worldserver = (WorldServer) iterator.next();

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable movement checks
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index b3bb63559add154888b5e19f2304b5e4a8a9eacc..b7624400644ae25b9316c2f1f7bcf0e436fbb3cb 100644
index 8bdea98d5519938d5da30cd603e6f6d828bed52c..85723157af127a334cb7a65effd2becc42f7d370 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -604,7 +604,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -606,7 +606,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
// Paper end
@ -17,7 +17,7 @@ index b3bb63559add154888b5e19f2304b5e4a8a9eacc..b7624400644ae25b9316c2f1f7bcf0e4
// CraftBukkit end
PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getDisplayName().getString(), this.player.getDisplayName().getString(), d6, d7, d8);
this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity));
@@ -631,7 +631,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -633,7 +633,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
d10 = d6 * d6 + d7 * d7 + d8 * d8;
boolean flag1 = false;
@ -26,7 +26,7 @@ index b3bb63559add154888b5e19f2304b5e4a8a9eacc..b7624400644ae25b9316c2f1f7bcf0e4
flag1 = true; // Tuinity - diff on change, this should be moved wrongly
PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved wrongly! {}", entity.getDisplayName().getString(), this.player.getDisplayName().getString(), Math.sqrt(d10));
}
@@ -1385,7 +1385,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1387,7 +1387,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
if (!this.player.H() && (!this.player.getWorldServer().getGameRules().getBoolean(GameRules.DISABLE_ELYTRA_MOVEMENT_CHECK) || !this.player.isGliding())) {
float f2 = this.player.isGliding() ? 300.0F : 100.0F;
@ -35,7 +35,7 @@ index b3bb63559add154888b5e19f2304b5e4a8a9eacc..b7624400644ae25b9316c2f1f7bcf0e4
// CraftBukkit end
PlayerConnection.LOGGER.warn("{} moved too quickly! {},{},{}", this.player.getDisplayName().getString(), d7, d8, d9);
this.a(this.player.locX(), this.player.locY(), this.player.locZ(), this.player.yaw, this.player.pitch);
@@ -1451,7 +1451,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1453,7 +1453,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
d11 = d7 * d7 + d8 * d8 + d9 * d9;
boolean flag1 = false;

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Optimised hallowen checker
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d90deadd51fe2fadbd972f029204bee92640663d..01775d93c5cc6eda99c0a7190b5ce43be36d52cc 100644
index 75481bd6265054879877afb6c4686155c3caaf6d..ee0b256632e23bc18f94cbcf478e9dc7fc2c50e9 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1464,6 +1464,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1474,6 +1474,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// Paper end
com.tuinity.tuinity.util.CachedLists.reset(); // Tuinity

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Preload ProtocolLib EnumWrappers
Currently, ProtocolLib load EnumWrappers lazily and causing memory effects issues. This patch preloads EnumWrappers to prevent further NPE.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 01775d93c5cc6eda99c0a7190b5ce43be36d52cc..ada7639c31fe6952f689bc2e437db57abe1b1037 100644
index ee0b256632e23bc18f94cbcf478e9dc7fc2c50e9..95922cdce7483f215aa139f280e20a8858955879 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1078,6 +1078,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1088,6 +1088,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// Paper end
PaperJvmChecker.checkJvm(); // Paper jvm version nag

View File

@ -8,10 +8,10 @@ The goal of this patch is to reduce I/O operations from the main thread while sa
Co-authored-by: ishland <ishlandmc@yeah.net>
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index ada7639c31fe6952f689bc2e437db57abe1b1037..0f7fec04ac5c46dec5947be337499f4f93df39f0 100644
index 95922cdce7483f215aa139f280e20a8858955879..2309e55be7d120dc5b97a985ded4ea4178e7d1ac 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -941,7 +941,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -951,7 +951,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
// Spigot start
MCUtil.asyncExecutor.shutdown(); // Paper

View File

@ -75,10 +75,10 @@ index 71a000edfab27c9965d1929af78582821d5af97a..5c5ac70b4dae5d51303ab974261055aa
LOGGER.error("Error whilst processing packet {} for {}[{}]", packet, networkmanager.getPlayer().getName(), networkmanager.getSocketAddress(), e);
} else {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 0f7fec04ac5c46dec5947be337499f4f93df39f0..89ddf0b9ac4a7aef44d15b5797ec54715a012260 100644
index 2309e55be7d120dc5b97a985ded4ea4178e7d1ac..6fd059412e07e1b3b2597b693df5a4f439ebe382 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1158,7 +1158,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1168,7 +1168,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
return;
}
// Paper end

View File

@ -55,7 +55,7 @@ index a33cbd6504fd0d5c5e50aa63009d70533c01f686..e4f8bb15201e89d0832e3bcdfcbc1266
if (valid && !this.isSpectator() || this.world.isLoaded(this.getChunkCoordinates())) { // Paper - don't tick dead players that are not in the world currently (pending respawn)
super.tick();
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index 7cedb4aaf4a002945866a0ca56eb9b0e7ae28de6..e054e98e413ed02b76e63b29c52bd70a559ad15d 100644
index 8e978b74e3f5573123fa831bc1e64c38c4cbd2e6..d7f95bd32842fdee0ce53fc97d31ffb3577cdc78 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -176,8 +176,9 @@ import org.bukkit.event.weather.LightningStrikeEvent;
@ -244,7 +244,7 @@ index 4492f2579da79bd58def922894f40422fbeaf54c..cd1f94e5c1c923ee9d8dd451406ac2be
if (fluid.a(tag)) {
double d2 = (double) ((float) i2 + fluid.getHeight(this.world, blockposition_mutableblockposition));
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 5096afa6c11810decc4b4bd73867c48594b932b2..c1d4dd2ba75115b1f53c4ce6a3b49bd840973b8e 100644
index cb4d336e0812ad44d0a936f875853440c556f8b7..a057be22f488f76b926c81dc5c63e7f9c3fb54a1 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -140,6 +140,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -342,7 +342,7 @@ index 5096afa6c11810decc4b4bd73867c48594b932b2..c1d4dd2ba75115b1f53c4ce6a3b49bd8
f = this.onGround ? f5 * 0.91F : 0.91F;
Vec3D vec3d6 = this.a(vec3d, f5);
@@ -3549,7 +3552,7 @@ public abstract class EntityLiving extends Entity {
@@ -3550,7 +3553,7 @@ public abstract class EntityLiving extends Entity {
while (!flag2 && blockposition.getY() > 0) {
BlockPosition blockposition1 = blockposition.down();
@ -351,7 +351,7 @@ index 5096afa6c11810decc4b4bd73867c48594b932b2..c1d4dd2ba75115b1f53c4ce6a3b49bd8
if (iblockdata.getMaterial().isSolid()) {
flag2 = true;
@@ -3644,7 +3647,7 @@ public abstract class EntityLiving extends Entity {
@@ -3645,7 +3648,7 @@ public abstract class EntityLiving extends Entity {
this.stopRiding();
}
@ -360,7 +360,7 @@ index 5096afa6c11810decc4b4bd73867c48594b932b2..c1d4dd2ba75115b1f53c4ce6a3b49bd8
if (iblockdata.getBlock() instanceof BlockBed) {
this.world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockBed.OCCUPIED, true), 3);
@@ -3663,7 +3666,7 @@ public abstract class EntityLiving extends Entity {
@@ -3664,7 +3667,7 @@ public abstract class EntityLiving extends Entity {
private boolean x() {
return (Boolean) this.getBedPosition().map((blockposition) -> {
@ -369,7 +369,7 @@ index 5096afa6c11810decc4b4bd73867c48594b932b2..c1d4dd2ba75115b1f53c4ce6a3b49bd8
}).orElse(false);
}
@@ -3673,7 +3676,7 @@ public abstract class EntityLiving extends Entity {
@@ -3674,7 +3677,7 @@ public abstract class EntityLiving extends Entity {
this.world.getClass();
optional.filter(world::isLoaded).ifPresent((blockposition) -> {

View File

@ -865,7 +865,7 @@ index a206a729b3afa01bf591fa4da1e5c14902da4778..716f91246c4a45fd49af806afd1781f1
return (int) (i << 22 >> 42);
}
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index e054e98e413ed02b76e63b29c52bd70a559ad15d..9ae4377bb9277ca15d2c56f3db880fe3d6435f4f 100644
index d7f95bd32842fdee0ce53fc97d31ffb3577cdc78..e6f85b07f731859c8b8c380afad699ccc1d6c3e8 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -177,6 +177,7 @@ import org.bukkit.event.world.TimeSkipEvent;
@ -906,7 +906,7 @@ index cd1f94e5c1c923ee9d8dd451406ac2bee360e9c3..7befe4263a2d046922438e1a9853f2d8
public Throwable addedToWorldStack; // Paper - entity debug
public CraftEntity getBukkitEntity() {
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index c1d4dd2ba75115b1f53c4ce6a3b49bd840973b8e..4cae70c41bbd977b6a5661e43a5ddd3694e89580 100644
index a057be22f488f76b926c81dc5c63e7f9c3fb54a1..a897ad3de8c18be8bb3c320950a7421477040e8a 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -141,9 +141,11 @@ import org.bukkit.event.player.PlayerItemConsumeEvent;
@ -1723,7 +1723,7 @@ index b6de70c3630d96d0782a657c0389ce03839d8c43..611066964d11b2da7ab6dd59c6083c5c
// Tuinity start - optimise culling shape cache for light
if (this.a != null && this.a.getCullingShapeCache() != null) {
diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
index c07fb5ca761c0f2067bd103026ded618a8620947..cbe21ec18561c991aa27dd48d536c78e358d5b0e 100644
index 2e8eb0bb8fb4f7ce6b92fe01a81327da30e614ae..34af81b75e7927cccc0d4aea1b80ab677ca31795 100644
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
@@ -68,6 +68,7 @@ import net.minecraft.world.level.material.FluidTypes;
@ -1734,7 +1734,7 @@ index c07fb5ca761c0f2067bd103026ded618a8620947..cbe21ec18561c991aa27dd48d536c78e
public class Chunk implements IChunkAccess {
@@ -852,6 +853,11 @@ public class Chunk implements IChunkAccess {
@@ -863,6 +864,11 @@ public class Chunk implements IChunkAccess {
if (!this.entitySlices[i].remove(entity)) { // Tuinity - optimise hard colliding entities // Tuinity - entities by class // Tuinity
return;
}
@ -1746,7 +1746,7 @@ index c07fb5ca761c0f2067bd103026ded618a8620947..cbe21ec18561c991aa27dd48d536c78e
if (entity instanceof EntityItem) {
itemCounts[i]--;
} else if (entity instanceof IInventory) {
@@ -861,6 +867,11 @@ public class Chunk implements IChunkAccess {
@@ -872,6 +878,11 @@ public class Chunk implements IChunkAccess {
this.markDirty(); // Paper
// Paper end
this.entities.remove(entity); // Paper

View File

@ -6,7 +6,7 @@ Subject: [PATCH] lithium entity
Co-authored-by: Hugo Planque <hookwood01@gmail.com>
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 4cae70c41bbd977b6a5661e43a5ddd3694e89580..29b30c159fae686a28f395d3e5a2236bc9237c1b 100644
index a897ad3de8c18be8bb3c320950a7421477040e8a..a182cb8d641dbf8756267901a682f8e3e2a4c67c 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -286,6 +286,10 @@ public abstract class EntityLiving extends Entity {

Some files were not shown because too many files have changed in this diff Show More