diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 4873623f02..79acd898f2 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1,4 +1,4 @@ -From 554942503174382dace3707a50aae22d61ee67b9 Mon Sep 17 00:00:00 2001 +From adfc95d1a4ac2ca834bc3a0e9f61e9e0cc1cd4e8 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 04:00:11 -0600 Subject: [PATCH] Timings v2 @@ -1001,7 +1001,7 @@ index e8a90e01f5..0956eff603 100644 private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); public final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 32981c4422..0e09adf7dc 100644 +index 32981c4422..4365383dd7 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1,5 +1,7 @@ @@ -1038,7 +1038,7 @@ index 32981c4422..0e09adf7dc 100644 this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime); this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); } -@@ -773,21 +774,26 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose +@@ -773,21 +774,24 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose } timings.tileEntityPending.stopTiming(); // Spigot @@ -1050,7 +1050,6 @@ index 32981c4422..0e09adf7dc 100644 public void a(Consumer consumer, Entity entity) { try { - SpigotTimings.tickEntityTimer.startTiming(); // Spigot -+ timings.tickEntities.startTiming(); + entity.tickTimer.startTiming(); + // Spigot end consumer.accept(entity); @@ -1063,7 +1062,6 @@ index 32981c4422..0e09adf7dc 100644 throw new ReportedException(crashreport); + } finally { + entity.tickTimer.stopTiming(); -+ timings.tickEntities.stopTiming(); } } diff --git a/Spigot-Server-Patches/0026-Prevent-tile-entity-and-entity-crashes.patch b/Spigot-Server-Patches/0026-Prevent-tile-entity-and-entity-crashes.patch index f29f667827..1a1c74e9e4 100644 --- a/Spigot-Server-Patches/0026-Prevent-tile-entity-and-entity-crashes.patch +++ b/Spigot-Server-Patches/0026-Prevent-tile-entity-and-entity-crashes.patch @@ -1,11 +1,11 @@ -From e9336f239ad726749027441ad2da420dc2cff752 Mon Sep 17 00:00:00 2001 +From 117c8483ca3eabf584569c5b05cafe378a0e7bf7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 1 Mar 2016 23:52:34 -0600 Subject: [PATCH] Prevent tile entity and entity crashes diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index a833781e59..1307152997 100644 +index 0956eff603..e79e256138 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -199,7 +199,12 @@ public abstract class TileEntity implements KeyedObject { // Paper @@ -23,7 +23,7 @@ index a833781e59..1307152997 100644 } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 85056a7b1f..3cbaeb387b 100644 +index b8366aa11b..aa0fab786f 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -714,11 +714,13 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose @@ -45,7 +45,7 @@ index 85056a7b1f..3cbaeb387b 100644 } // Spigot start finally { -@@ -787,11 +789,12 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose +@@ -786,11 +788,12 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose // Spigot end consumer.accept(entity); } catch (Throwable throwable) { @@ -62,7 +62,7 @@ index 85056a7b1f..3cbaeb387b 100644 + // Paper end } finally { entity.tickTimer.stopTiming(); - timings.tickEntities.stopTiming(); + } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch b/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch index ee31d362bf..7fbfb35891 100644 --- a/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch @@ -1,4 +1,4 @@ -From 2e9da15e3005f8d0b5628a9a60efd967505c0c03 Mon Sep 17 00:00:00 2001 +From 39793650e302a903c286fa369bf9508d150a2a8a Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 03:15:41 -0600 Subject: [PATCH] Add exception reporting event @@ -216,7 +216,7 @@ index 0a1d342c13..347608531f 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 17d1dc93bc..f3f10ca60e 100644 +index e003246ea2..1809f7eecc 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -2,6 +2,9 @@ package net.minecraft.server; @@ -242,7 +242,7 @@ index 17d1dc93bc..f3f10ca60e 100644 tilesThisCycle--; this.tileEntityListTick.remove(tileTickPosition--); continue; -@@ -790,8 +796,10 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose +@@ -789,8 +795,10 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose consumer.accept(entity); } catch (Throwable throwable) { // Paper start - Prevent tile entity and entity crashes diff --git a/Spigot-Server-Patches/0090-Remove-unused-World-Tile-Entity-List.patch b/Spigot-Server-Patches/0090-Remove-unused-World-Tile-Entity-List.patch index bfedbb52f1..5b82b98b02 100644 --- a/Spigot-Server-Patches/0090-Remove-unused-World-Tile-Entity-List.patch +++ b/Spigot-Server-Patches/0090-Remove-unused-World-Tile-Entity-List.patch @@ -1,4 +1,4 @@ -From fed3d57aa296361eb8c18936c92dfaf460b47240 Mon Sep 17 00:00:00 2001 +From 4e8a370e5466397c0d45a6af7c606a2f73c444a5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 13 Apr 2016 00:25:28 -0400 Subject: [PATCH] Remove unused World Tile Entity List @@ -6,7 +6,7 @@ Subject: [PATCH] Remove unused World Tile Entity List Massive hit to performance and it is completely unnecessary. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index cde463c5a5..f6cb4d45eb 100644 +index bb99fc506e..946a7365ca 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -40,7 +40,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose @@ -57,7 +57,7 @@ index cde463c5a5..f6cb4d45eb 100644 this.a(tileentity1); } // CraftBukkit end -@@ -1089,7 +1089,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose +@@ -1087,7 +1087,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose } else { if (tileentity != null) { this.tileEntityListPending.remove(tileentity); diff --git a/Spigot-Server-Patches/0262-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/Spigot-Server-Patches/0262-Option-to-prevent-armor-stands-from-doing-entity-loo.patch index 7a7cf3ce60..1c49cd4b87 100644 --- a/Spigot-Server-Patches/0262-Option-to-prevent-armor-stands-from-doing-entity-loo.patch +++ b/Spigot-Server-Patches/0262-Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -1,4 +1,4 @@ -From ac6df6a38235e42c919ac37242f083db8e1ae93d Mon Sep 17 00:00:00 2001 +From e328a8bc7b298b7bd9d6d6ca7ffb3a65c983903b Mon Sep 17 00:00:00 2001 From: Hugo Manrique Date: Mon, 23 Jul 2018 12:57:39 +0200 Subject: [PATCH] Option to prevent armor stands from doing entity lookups @@ -21,10 +21,10 @@ index 83e54cb904..f06bb3ae19 100644 private void maxEntityCollision() { maxCollisionsPerEntity = getInt( "max-entity-collisions", this.spigotConfig.getInt("max-entity-collisions", 8) ); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index f476f326f1..d08bd6d963 100644 +index 8dca442abe..b3d0a0d856 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -873,6 +873,14 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose +@@ -871,6 +871,14 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose } } diff --git a/Spigot-Server-Patches/0341-Optimize-redstone-algorithm.patch b/Spigot-Server-Patches/0341-Optimize-redstone-algorithm.patch index 7a10c35cf0..0914165dd0 100644 --- a/Spigot-Server-Patches/0341-Optimize-redstone-algorithm.patch +++ b/Spigot-Server-Patches/0341-Optimize-redstone-algorithm.patch @@ -1,4 +1,4 @@ -From 5bc9aafd6254b8c030fd87507fae28834f3f2d8b Mon Sep 17 00:00:00 2001 +From c46547a16395bf56e8ef17b64eea21a7b6fddb30 Mon Sep 17 00:00:00 2001 From: theosib Date: Thu, 27 Sep 2018 01:43:35 -0600 Subject: [PATCH] Optimize redstone algorithm @@ -1124,7 +1124,7 @@ index 7ce9cdb853..6b5015ce5f 100644 c(iblockdata, world, blockposition); world.a(blockposition, false); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 26f3b47208..1eb689c62a 100644 +index 0887707380..4afbd0f1c5 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -594,6 +594,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose @@ -1135,7 +1135,7 @@ index 26f3b47208..1eb689c62a 100644 public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) { if (!this.isClientSide) { IBlockData iblockdata = this.getType(blockposition); -@@ -1340,6 +1341,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose +@@ -1338,6 +1339,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose return this.getBlockFacePower(blockposition.down(), EnumDirection.DOWN) > 0 ? true : (this.getBlockFacePower(blockposition.up(), EnumDirection.UP) > 0 ? true : (this.getBlockFacePower(blockposition.north(), EnumDirection.NORTH) > 0 ? true : (this.getBlockFacePower(blockposition.south(), EnumDirection.SOUTH) > 0 ? true : (this.getBlockFacePower(blockposition.west(), EnumDirection.WEST) > 0 ? true : this.getBlockFacePower(blockposition.east(), EnumDirection.EAST) > 0)))); } diff --git a/Spigot-Server-Patches/0379-Optimize-Captured-TileEntity-Lookup.patch b/Spigot-Server-Patches/0379-Optimize-Captured-TileEntity-Lookup.patch index 32836637c2..1966b8d45d 100644 --- a/Spigot-Server-Patches/0379-Optimize-Captured-TileEntity-Lookup.patch +++ b/Spigot-Server-Patches/0379-Optimize-Captured-TileEntity-Lookup.patch @@ -1,4 +1,4 @@ -From b3340b4aa1abc117157dc79b4c9658bddaa321ee Mon Sep 17 00:00:00 2001 +From a741c7f97d9b029f6c6db9e58a904ca39ea47b39 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 6 Apr 2019 10:16:48 -0400 Subject: [PATCH] Optimize Captured TileEntity Lookup @@ -10,10 +10,10 @@ Optimize to check if the captured list even has values in it, and also to just do a get call since the value can never be null. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index f1552f23ea..ef080f9571 100644 +index 59f4b3262d..dcd66943fb 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1087,12 +1087,13 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose +@@ -1085,12 +1085,13 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose return null; } else { // CraftBukkit start