mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-21 18:16:05 +01:00
Updated Upstream and Sidestream(s) (Paper/Airplane/Purpur/Empirecraft/Origami) (#474)
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: b8020379c Extract Adventure Version into a variable, add reminder to update the linked JD on the homepage (#5422) 809466f2e Fix anchor respawn acting as a bed respawn when using the end portal (#5540) d219fd642 [Auto] Updated Upstream (Bukkit/CraftBukkit) db464b099 Implement methods to convert between Component and Brigadier's Message (#5542) 4047cffca Add PlayerBedFailEnterEvent (#4935) 70d697e6e Update Paperpclip 5ed771591 [CI-SKIP] Remove bad null annotation (#5538) 454a4c78e More World API (#3850) 869e02304 Add PlayerDeepSleepEvent (#5525) fb56fc35e fix non-dummy objectives not updating dc859a61f [CI-SKIP] [Auto] Rebuild Patches 7d1689f1a Add missing checkReachable check for shulker boxes (#5453) ba8eb3d4b Add missing Javadoc for COLORABLE MaterialTag (#5376) db801cbf3 Fix PlayerItemHeldEvent firing twice (#5534) 14de2b795 fix PigZombieAngerEvent cancellation (fixes #5319) (v2) (#5329) 86d684ad1 Add get-set drop chance to EntityEquipment (#5528) 33fb8cf63 Add consumeFuel to FurnaceBurnEvent (#5532) 9957f4630 Fix duplicating /give items on item drop cancel (#5536) d94882043 Fix legacyComposer not using AsyncChatEvent messages (#5509) 053bd82cc Don't print spawn load time when not loading spawn (#5467) a6d78caae Add isDeeplySleeping to HumanEntity (#5470) 711b7a80b Expose more Adventure serializers through PaperComponents (#5443) 3f63bde0c Set Area Effect Cloud Rotation (#5462) 3523f0fda Remove useless check on player interact cancellation (#5448) 6574d1aa8 fix #5526 - use correct type when sending message to clients dbfa833ec don't throw when loading TE with invalid keys a9525a6f7 Do not schedule poi task for each block write on chunk gen Airplane Changes: f5fb024 Temporarily revert patch 3c728a7 Oops, these 2 too 37a93e5 Your daily dose of 1-3% optimization patches bbd689a Remove useless check d8bdbc5 Reduce allocations for fire spreading 41051fd Redo reduction of entity chunk ticking check patch 31272d8 Flare Update 8f32713 Remove criterion patch 0fed2df Various patches that need to be reorganized later f78856b Updated Upstream (Tuinity) f7d6382 Flare Update 71d0799 Update gradle configuration 0f79774 Updated Upstream (Tuinity) Purpur Changes: 3dce975 Updated Upstream (Paper & Airplane) (#298) eb07368 Run GitHub Actions for pull requests e97d062 Updated Upstream (Paper, Tuinity, & Airplane) Empirecraft Changes: 2a021ede Updated Paper e963bb2c Add Paper MojangAPI to pom 6f5bf24e Updated Paper Origami Changes: 73ecdf1 Update Paper 73a3735 Item and exp merge improvements
This commit is contained in:
parent
ef9ed2f890
commit
61f261ee2a
11
PATCHES.md
11
PATCHES.md
@ -102,6 +102,8 @@ # Patches
|
||||
| server | Breedable Polar Bears | William Blake Galbreath | |
|
||||
| server | Bring back server name | William Blake Galbreath | |
|
||||
| api | Bring back server name | William Blake Galbreath | |
|
||||
| server | Cache climbing check for activation | Paul Sauve | |
|
||||
| server | Cache coordinate key for micro opt | Paul Sauve | |
|
||||
| server | Cache entityhuman display name | Paul Sauve | |
|
||||
| server | Cache palette array | Paul Sauve | |
|
||||
| server | Cat spawning options | William Blake Galbreath | |
|
||||
@ -120,6 +122,7 @@ # Patches
|
||||
| server | Config to always tame in Creative | Encode42 | |
|
||||
| server | Config to disable Llama caravans | Encode42 | |
|
||||
| server | Config to disable hostile mob spawn on ice | Encode42 | |
|
||||
| server | Config to disable method profiler | Paul Sauve | |
|
||||
| server | Config to ignore Dragon Head wearers and stare aggro | Encode42 | |
|
||||
| server | Config to ignore nearby mobs when sleeping | Encode42 | |
|
||||
| server | Config to make Creepers explode on death | Encode42 | |
|
||||
@ -175,11 +178,9 @@ # Patches
|
||||
| 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 | |
|
||||
| server | Don't load chunk with seed based feature search | Phoenix616 | |
|
||||
| server | Don't lookup fluid state when raytracing | Spottedleaf | |
|
||||
| server | Don't read neighbour chunk data off disk when converting | Spottedleaf | |
|
||||
| server | Don't trigger Lootable Refresh for non player interaction | Aikar | |
|
||||
@ -282,8 +283,6 @@ # 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 |
|
||||
| server | Nuke streams off BlockPosition | Ivan Pekov | |
|
||||
@ -307,6 +306,7 @@ # Patches
|
||||
| server | Optimize advancement loading | Ivan Pekov | |
|
||||
| server | Optimize inventory API item handling | Phoenix616 | |
|
||||
| server | Optimize random calls in chunk ticking | Paul Sauve | |
|
||||
| server | Optimize redundant calls | Paul Sauve | |
|
||||
| server | Optimize some stuff in WorldServer ticking | MrIvanPlays | |
|
||||
| server | Optimize whitelist command for multiple additions / removals | Ivan Pekov | |
|
||||
| server | Option for Villager Clerics to farm Nether Wart | jmp | |
|
||||
@ -356,7 +356,7 @@ # Patches
|
||||
| server | Reduce allocation rate from crammed entities | Spottedleaf | |
|
||||
| server | Reduce allocs & improve perf of StructureManager | Paul Sauve | |
|
||||
| server | Reduce chunk loading & lookups | Paul Sauve | |
|
||||
| server | Reduce entity chunk ticking checks from 3 to 1 | Paul Sauve | |
|
||||
| server | Reduce frequency of checking for entity despawn | Paul Sauve | |
|
||||
| server | Reduce iterator allocation from chunk gen | Spottedleaf | |
|
||||
| server | Reduce pathfinder branches | Spottedleaf | |
|
||||
| server | Reduce projectile chunk loading | Paul Sauve | |
|
||||
@ -384,6 +384,7 @@ # Patches
|
||||
| server | Simpler ShapelessRecipes comparison for Vanilla | Paul Sauve | |
|
||||
| server | Skip POI finding if stuck in vehicle | Paul Sauve | |
|
||||
| server | Skip copying unloading tile entities | Paul Sauve | |
|
||||
| server | Skip creating hashset for entity track range | Paul Sauve | |
|
||||
| server | Skip events if there's no listeners | William Blake Galbreath | |
|
||||
| server | Smarter statistics ticking | Mykyta Komarnytskyy | |
|
||||
| server | Smol entity optimisations | Ivan Pekov | |
|
||||
|
2
Paper
2
Paper
@ -1 +1 @@
|
||||
Subproject commit 39bf5b525d819e50a18a241f3ebaf388a571619c
|
||||
Subproject commit b8020379c6af10417bb8836398fa9460cf316f9c
|
@ -4,7 +4,6 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import transformer.ModifiedLog4j2PluginsCacheFileTransformer
|
||||
import relocation.ToothpickRelocator
|
||||
import kotlinx.dom.elements
|
||||
import kotlinx.dom.parseXml
|
||||
import kotlinx.dom.search
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.Task
|
||||
@ -184,9 +183,7 @@ private fun Project.configureServerProject() {
|
||||
relocationSet.add(PatchesMetadata.Relocation("", "net.minecraft.server.v${toothpick.nmsPackage}", false))
|
||||
|
||||
// Make sure we relocate deps the same as Paper et al.
|
||||
val pomFile = project.projectDir.resolve("pom.xml")
|
||||
if (!pomFile.exists()) return@getting
|
||||
val dom = parseXml(pomFile)
|
||||
val dom = project.parsePom() ?: return@getting
|
||||
val buildSection = dom.search("build").first()
|
||||
val plugins = buildSection.search("plugins").first()
|
||||
plugins.elements("plugin").filter {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import kotlinx.dom.elements
|
||||
import kotlinx.dom.parseXml
|
||||
import kotlinx.dom.search
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.artifacts.dsl.RepositoryHandler
|
||||
@ -9,9 +8,7 @@ import org.gradle.kotlin.dsl.project
|
||||
import org.w3c.dom.Element
|
||||
|
||||
fun RepositoryHandler.loadRepositories(project: Project) {
|
||||
val pomFile = project.projectDir.resolve("pom.xml")
|
||||
if (!pomFile.exists()) return
|
||||
val dom = parseXml(pomFile)
|
||||
val dom = project.parsePom() ?: return
|
||||
val repositoriesBlock = dom.search("repositories").firstOrNull() ?: return
|
||||
|
||||
// Load repositories
|
||||
@ -22,9 +19,7 @@ fun RepositoryHandler.loadRepositories(project: Project) {
|
||||
}
|
||||
|
||||
fun DependencyHandlerScope.loadDependencies(project: Project) {
|
||||
val pomFile = project.projectDir.resolve("pom.xml")
|
||||
if (!pomFile.exists()) return
|
||||
val dom = parseXml(pomFile)
|
||||
val dom = project.parsePom() ?: return
|
||||
|
||||
// Load dependencies
|
||||
dom.search("dependencies").forEach {
|
||||
@ -36,10 +31,7 @@ private fun DependencyHandlerScope.loadDependencies(project: Project, dependenci
|
||||
dependenciesBlock.elements("dependency").forEach { dependencyElem ->
|
||||
val groupId = dependencyElem.search("groupId").first().textContent
|
||||
val artifactId = dependencyElem.search("artifactId").first().textContent
|
||||
val version = dependencyElem.search("version").firstOrNull()?.textContent?.applyReplacements(
|
||||
"project.version" to "${project.rootProject.toothpick.minecraftVersion}-${project.rootProject.toothpick.nmsRevision}",
|
||||
"minecraft.version" to project.toothpick.minecraftVersion
|
||||
)
|
||||
val version = dependencyElem.search("version").firstOrNull()?.textContent
|
||||
val scope = dependencyElem.search("scope").firstOrNull()?.textContent
|
||||
val classifier = dependencyElem.search("classifier").firstOrNull()?.textContent
|
||||
|
||||
|
55
buildSrc/src/main/kotlin/PomParsing.kt
Normal file
55
buildSrc/src/main/kotlin/PomParsing.kt
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* This file is part of Toothpick, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2021 Jason Penilla & Contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
import kotlinx.dom.elements
|
||||
import kotlinx.dom.parseXml
|
||||
import kotlinx.dom.search
|
||||
import org.gradle.api.Project
|
||||
import org.w3c.dom.Document
|
||||
|
||||
internal fun Project.parsePom(): Document? {
|
||||
val file = file("pom.xml")
|
||||
if (!file.exists()) {
|
||||
return null
|
||||
}
|
||||
val contents = file.readText()
|
||||
val dom = parseXml(contents.byteInputStream())
|
||||
val properties = dom.search("properties").firstOrNull()?.elements() ?: emptyList()
|
||||
val propertiesMap = properties.associateBy({ it.nodeName }, { it.textContent }).toMutableMap()
|
||||
|
||||
propertiesMap["project.version"] = project.version.toString()
|
||||
propertiesMap["minecraft.version"] = toothpick.minecraftVersion
|
||||
propertiesMap["minecraft_version"] = toothpick.nmsPackage
|
||||
|
||||
return parseXml(contents.replaceProperties(propertiesMap).byteInputStream())
|
||||
}
|
||||
|
||||
private fun String.replaceProperties(
|
||||
properties: Map<String, String>
|
||||
): String {
|
||||
var result = this
|
||||
for ((key, value) in properties) {
|
||||
result = result.replace("\${$key}", value)
|
||||
}
|
||||
return result
|
||||
}
|
@ -37,7 +37,7 @@ open class ToothpickExtension(objects: ObjectFactory) {
|
||||
val currentBranchDisplayName
|
||||
get() = currentBranch.replace("/${minecraftVersion}", "")
|
||||
val calcVersionString
|
||||
get() = if(!currentBranch.startsWith("ver/")) { "${minecraftVersion}-${nmsRevision}-${currentBranchDisplayName.replace('/', '_')}" } else "${minecraftVersion}-${nmsRevision}"
|
||||
get() = "${minecraftVersion}-${nmsRevision}"
|
||||
|
||||
fun server(receiver: ToothpickSubproject.() -> Unit) {
|
||||
serverProject = ToothpickSubproject()
|
||||
|
@ -72,7 +72,7 @@ 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 7b0b416c73c8914f3c8c570f2020490ef2babf64..246fcc9b40152964810ceef356ecb2eee3551135 100644
|
||||
index 2767a9369ddc922f1d9c7cb6c7acc8270545535a..7b4b9f54510b3a05aad3f7e50e32ee0bf977244a 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1646,7 +1646,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
@ -183,11 +183,11 @@ index 0000000000000000000000000000000000000000..807cf274619b8f7be839e249cb62b981
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index d902efdb8f2d42ea4c3933f7fa76ebe135ee09db..24a46ad36613faa5f5a1a12b70f7af886e1608ae 100644
|
||||
index fa7a78549a9bb92b93c305dc16f43a9ace7f6f43..858bd62d2a17c15ee573c5cd607a876d3a99c2b1 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -215,6 +215,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
|
||||
@@ -216,6 +216,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
io.papermc.paper.brigadier.PaperBrigadierProviderImpl.INSTANCE.getClass(); // init PaperBrigadierProvider
|
||||
// Paper end
|
||||
com.tuinity.tuinity.config.TuinityConfig.init((java.io.File) options.valueOf("tuinity-settings")); // Tuinity - Server Config
|
||||
+ gg.airplane.AirplaneConfig.load(); // Airplane - config
|
||||
|
@ -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 e3481eb71972c82edd892a99d1136c8248fb0f8c..9e71e6c331c60d55220399cee4381367113f596a 100644
|
||||
index a42d3c6c227a74d691278a65a9c516f6507b6865..ef368c38fbbf26cc2f6cf4159707d3d581e85be4 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 {
|
||||
|
@ -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 9e71e6c331c60d55220399cee4381367113f596a..ab1cf52d7faa93feba9dd2efd9479b2d72771778 100644
|
||||
index ef368c38fbbf26cc2f6cf4159707d3d581e85be4..ce428fd701fe4a0505a629edb322f19d730f8132 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 {
|
||||
|
@ -1,53 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Sauve <paul@technove.co>
|
||||
Date: Sat, 13 Mar 2021 10:40:22 -0600
|
||||
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 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 {
|
||||
// CraftBukkit end */
|
||||
|
||||
gameprofilerfiller.enter("checkDespawn");
|
||||
+ boolean entityTickingChunk = false; if (!entity.dead) entityTickingChunk = this.getChunkProvider().isInEntityTickingChunk(entity); // Airplane - check once, chunks won't unload ticking entities
|
||||
if (!entity.dead) {
|
||||
entity.checkDespawn();
|
||||
// Tuinity start - optimise notify()
|
||||
if (entity.inChunk && entity.valid) {
|
||||
- if (this.getChunkProvider().isInEntityTickingChunk(entity)) {
|
||||
+ if (entityTickingChunk) { // Airplane - reuse
|
||||
this.updateNavigatorsInRegion(entity);
|
||||
}
|
||||
} else {
|
||||
@@ -1117,7 +1118,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
this.entitiesById.remove(entity.getId()); // Tuinity
|
||||
this.unregisterEntity(entity);
|
||||
} else if (entity.inChunk && entity.valid) { // Tuinity start - optimise notify()
|
||||
- if (this.getChunkProvider().isInEntityTickingChunk(entity)) {
|
||||
+ if (entityTickingChunk) { // Airplane - reuse
|
||||
this.updateNavigatorsInRegion(entity);
|
||||
}
|
||||
} else {
|
||||
@@ -1417,7 +1418,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
}
|
||||
// Tuinity end - log detailed entity tick information
|
||||
|
||||
- public void entityJoinedWorld(Entity entity) {
|
||||
+ // Airplane start - reuse check for in entity ticking chunk
|
||||
+ public void entityJoinedWorld(Entity entity) { entityJoinedWorld(entity, this.getChunkProvider().isInEntityTickingChunk(entity)); }
|
||||
+ public void entityJoinedWorld(Entity entity, boolean entityTickingChunk) { // Airplane end
|
||||
// Tuinity start - log detailed entity tick information
|
||||
com.tuinity.tuinity.util.TickThread.ensureTickThread("Cannot tick an entity off-main");
|
||||
try {
|
||||
@@ -1425,7 +1428,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
currentlyTickingEntity.lazySet(entity);
|
||||
}
|
||||
// Tuinity end - log detailed entity tick information
|
||||
- if (!(entity instanceof EntityHuman) && !this.getChunkProvider().a(entity)) {
|
||||
+ if (!(entity instanceof EntityHuman) && !entityTickingChunk) { // Airplane - reuse
|
||||
this.chunkCheck(entity);
|
||||
} else {
|
||||
++TimingHistory.entityTicks; // Paper - timings
|
@ -5,7 +5,7 @@ Subject: [PATCH] Cache entityhuman display name
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
index 44038dd278b988508047023107683e5370af54ad..ad85dda5c50b797904824a08513fbcec042128ea 100644
|
||||
index 5bce47fa8f191bc1d33c04c9865cb0efd492a9a2..5f9e64df007ebc40f7bcb50be495b10e51d5b87a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
@@ -162,7 +162,8 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@ -18,7 +18,7 @@ index 44038dd278b988508047023107683e5370af54ad..ad85dda5c50b797904824a08513fbcec
|
||||
private ItemStack bL;
|
||||
private final ItemCooldown bM;
|
||||
@Nullable
|
||||
@@ -1828,7 +1829,12 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -1840,7 +1841,12 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
|
||||
@Override
|
||||
public IChatBaseComponent getDisplayName() {
|
@ -0,0 +1,22 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Sauve <paul@technove.co>
|
||||
Date: Fri, 23 Apr 2021 15:00:30 -0500
|
||||
Subject: [PATCH] Optimize redundant calls
|
||||
|
||||
Just pushing this because I want numbers on it, according to both CPU
|
||||
tracking and async sampling this is something that causes a discernable
|
||||
(1.5%) impact on performance.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMapDistance.java b/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
index a5fc023312c99e591fc269999c28a766a46f8849..fb4d006f86229fd093f1a9ea8cab2add0a4cacfa 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
@@ -215,7 +215,7 @@ public abstract class ChunkMapDistance {
|
||||
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
|
||||
+ //AsyncCatcher.catchOp("DistanceManagerTick"); // Paper // Airplane - leave up to softEnsures
|
||||
//this.g.a(); // Tuinity - no longer used
|
||||
boolean flag = this.ticketLevelPropagator.propagateUpdates(); // Tuinity - replace ticket level propagator
|
||||
|
@ -0,0 +1,62 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Sauve <paul@technove.co>
|
||||
Date: Fri, 23 Apr 2021 18:12:08 -0500
|
||||
Subject: [PATCH] Skip creating hashset for entity track range
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index c6b4af810fe3bda7797ab94316b2357178c9cd49..99c93d48726b4b92a341ba98721173df8b4ff30a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -319,10 +319,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
this.isLegacyTrackingEntity = isLegacyTrackingEntity;
|
||||
}
|
||||
|
||||
+ // Airplane start - behavior of getAllPassengers + getting bigger range
|
||||
+ private org.spigotmc.TrackingRange.TrackingRangeType getBiggestRangeOfPassengers(net.minecraft.server.level.PlayerChunkMap chunkMap, int[] range, Entity entity) {
|
||||
+ org.spigotmc.TrackingRange.TrackingRangeType type = null;
|
||||
+
|
||||
+ for (int i = 0; i < entity.passengers.size(); i++) {
|
||||
+ Entity passenger = entity.passengers.get(i);
|
||||
+ org.spigotmc.TrackingRange.TrackingRangeType passengerType = passenger.trackingRangeType;
|
||||
+ int passengerRange = chunkMap.getEntityTrackerRange(passengerType.ordinal());
|
||||
+ if (passengerRange > range[0]) {
|
||||
+ type = passengerType;
|
||||
+ range[0] = passengerRange;
|
||||
+ }
|
||||
+
|
||||
+ org.spigotmc.TrackingRange.TrackingRangeType childType = this.getBiggestRangeOfPassengers(chunkMap, range, passenger);
|
||||
+ if (childType != null) {
|
||||
+ type = childType;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return type;
|
||||
+ }
|
||||
+ // Airplane end
|
||||
+
|
||||
public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<EntityPlayer> getPlayersInTrackRange() {
|
||||
+ // Airplane start - replicate behavior of getAllPassengers to skip creating hashset
|
||||
+ /*
|
||||
Collection<Entity> passengers = this.getAllPassengers();
|
||||
+ */
|
||||
net.minecraft.server.level.PlayerChunkMap chunkMap = ((WorldServer)this.world).getChunkProvider().playerChunkMap;
|
||||
org.spigotmc.TrackingRange.TrackingRangeType type = this.trackingRangeType;
|
||||
+ type = this.getBiggestRangeOfPassengers(chunkMap, new int[]{chunkMap.getEntityTrackerRange(type.ordinal())}, this);
|
||||
+ if (type == null) type = this.trackingRangeType;
|
||||
+ /*
|
||||
int range = chunkMap.getEntityTrackerRange(type.ordinal());
|
||||
|
||||
for (Entity passenger : passengers) {
|
||||
@@ -333,8 +362,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
range = passengerRange;
|
||||
}
|
||||
}
|
||||
+ */
|
||||
+ // Airplane end
|
||||
|
||||
- return chunkMap.playerEntityTrackerTrackMaps[type.ordinal()].getObjectsInRange(MCUtil.getCoordinateKey(this));
|
||||
+ return chunkMap.playerEntityTrackerTrackMaps[type.ordinal()].getObjectsInRange(MCUtil.getCoordinateKey(this.chunkX, this.chunkZ)); // Airplane - don't convert doubles to ints here
|
||||
}
|
||||
// Paper end - optimise entity tracking
|
||||
|
@ -0,0 +1,43 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Sauve <paul@technove.co>
|
||||
Date: Mon, 26 Apr 2021 10:52:56 -0500
|
||||
Subject: [PATCH] Cache climbing check for activation
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
index 74f80b6af18c0b91d9613384ca6bafd9c89f23a4..003e1f6dc8efbabcb2e0f7a6b379196f02203903 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
@@ -1745,6 +1745,19 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Airplane start
|
||||
+ private boolean cachedIsClimbing = false;
|
||||
+ private BlockPosition lastClimbingPosition = null;
|
||||
+
|
||||
+ public boolean isClimbingCached() {
|
||||
+ if (!this.getChunkCoordinates().equals(this.lastClimbingPosition)) {
|
||||
+ this.cachedIsClimbing = this.isClimbing();
|
||||
+ this.lastClimbingPosition = this.getChunkCoordinates();
|
||||
+ }
|
||||
+ return this.cachedIsClimbing;
|
||||
+ }
|
||||
+ // Airplane end
|
||||
+
|
||||
public IBlockData ds() {
|
||||
return this.world.getType(this.getChunkCoordinates());
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 8b36ca5062f8e0e8bd58aa506e91704a747de81b..94910bf0c53c79588c55b89e4a023273d6c859ef 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -309,7 +309,7 @@ public class ActivationRange
|
||||
if ( entity instanceof EntityLiving )
|
||||
{
|
||||
EntityLiving living = (EntityLiving) entity;
|
||||
- if ( living.isClimbing() || living.jumping || living.hurtTicks > 0 || living.effects.size() > 0 ) // Paper
|
||||
+ if ( living.isClimbingCached() || living.jumping || living.hurtTicks > 0 || living.effects.size() > 0 ) // Paper // Airplane - use cached climbing
|
||||
{
|
||||
return 1; // Paper
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Sauve <paul@technove.co>
|
||||
Date: Mon, 26 Apr 2021 11:20:12 -0500
|
||||
Subject: [PATCH] Reduce frequency of checking for entity despawn
|
||||
|
||||
This isn't a great way to deal with this, but at a high number of
|
||||
entities this starts adding up more than it should, and it's already
|
||||
fairly optimized. Just starts being slow when you have 30k entities.
|
||||
|
||||
diff --git a/src/main/java/gg/airplane/AirplaneConfig.java b/src/main/java/gg/airplane/AirplaneConfig.java
|
||||
index 7ec84ef1d1cbb1fabf4c590a2f2c1da3cc181010..c9e00334655ccd273ba108a541ed1cb0633f69b7 100644
|
||||
--- a/src/main/java/gg/airplane/AirplaneConfig.java
|
||||
+++ b/src/main/java/gg/airplane/AirplaneConfig.java
|
||||
@@ -102,4 +102,13 @@ public class AirplaneConfig {
|
||||
}
|
||||
|
||||
|
||||
+ public static byte entityDespawnCheckFrequency;
|
||||
+
|
||||
+ private static void entitySettings() {
|
||||
+ config.setComment("entities", "Configures settings for generic entities");
|
||||
+
|
||||
+ entityDespawnCheckFrequency = (byte) Math.max(config.getInt("entities.despawn-check-freq", 8), Byte.MAX_VALUE);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
|
||||
index f4440a5c4aedb1d7d303517f86a07c856dd1309b..dc78bafeddf6b584181c818b90efa7ff531377a3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
|
||||
@@ -774,8 +774,15 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
return false;
|
||||
}
|
||||
|
||||
+ // Airplane start - just reduce frequency of checking for despawn
|
||||
+ private byte despawnCheck = 0;
|
||||
@Override
|
||||
public void checkDespawn() {
|
||||
+ if (++despawnCheck < gg.airplane.AirplaneConfig.entityDespawnCheckFrequency) {
|
||||
+ return;
|
||||
+ }
|
||||
+ this.despawnCheck = 0;
|
||||
+ // Airplane end
|
||||
if (this.world.getDifficulty() == EnumDifficulty.PEACEFUL && this.L()) {
|
||||
this.die();
|
||||
} else if (!this.isPersistent() && !this.isSpecialPersistence()) {
|
@ -0,0 +1,36 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Sauve <paul@technove.co>
|
||||
Date: Mon, 26 Apr 2021 11:26:37 -0500
|
||||
Subject: [PATCH] Cache coordinate key for micro opt
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/PlayerChunk.java b/src/main/java/net/minecraft/server/level/PlayerChunk.java
|
||||
index 86f156587a0939b28c5cf6f64907255c1c4f8b35..06157bb07cce3ba24087ceaca7138b5609b37b5b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/PlayerChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/PlayerChunk.java
|
||||
@@ -58,6 +58,7 @@ public class PlayerChunk {
|
||||
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 final long coordinateKey; // Airplane - cache key for location
|
||||
private boolean p;
|
||||
private final ShortSet[] dirtyBlocks;
|
||||
private int r;
|
||||
@@ -80,7 +81,7 @@ public class PlayerChunk {
|
||||
com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<EntityPlayer> playersInChunkTickRange;
|
||||
|
||||
void updateRanges() {
|
||||
- long key = net.minecraft.server.MCUtil.getCoordinateKey(this.location);
|
||||
+ long key = this.coordinateKey; //net.minecraft.server.MCUtil.getCoordinateKey(this.location); // Airplane - use cached key
|
||||
this.playersInMobSpawnRange = this.chunkMap.playerMobSpawnMap.getObjectsInRange(key);
|
||||
this.playersInChunkTickRange = this.chunkMap.playerChunkTickRangeMap.getObjectsInRange(key);
|
||||
// Tuinity start - optimise checkDespawn
|
||||
@@ -232,7 +233,7 @@ public class PlayerChunk {
|
||||
this.entityTickingFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE;
|
||||
this.chunkSave = CompletableFuture.completedFuture(null); // CraftBukkit - decompile error
|
||||
this.dirtyBlocks = new ShortSet[16];
|
||||
- this.location = chunkcoordintpair;
|
||||
+ this.location = chunkcoordintpair; this.coordinateKey = net.minecraft.server.MCUtil.getCoordinateKey(this.location); // Airplane
|
||||
this.lightEngine = lightengine;
|
||||
this.u = playerchunk_c;
|
||||
this.players = playerchunk_d;
|
@ -0,0 +1,40 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Sauve <paul@technove.co>
|
||||
Date: Mon, 26 Apr 2021 11:34:29 -0500
|
||||
Subject: [PATCH] Config to disable method profiler
|
||||
|
||||
|
||||
diff --git a/src/main/java/gg/airplane/AirplaneConfig.java b/src/main/java/gg/airplane/AirplaneConfig.java
|
||||
index c9e00334655ccd273ba108a541ed1cb0633f69b7..65adf3ceda012c8cfdea675c40e2bb27d34ebac7 100644
|
||||
--- a/src/main/java/gg/airplane/AirplaneConfig.java
|
||||
+++ b/src/main/java/gg/airplane/AirplaneConfig.java
|
||||
@@ -111,4 +111,13 @@ public class AirplaneConfig {
|
||||
}
|
||||
|
||||
|
||||
+ public static boolean disableMethodProfiler;
|
||||
+
|
||||
+ private static void miscSettings() {
|
||||
+ config.setComment("misc", "Settings for things that don't belong elsewhere");
|
||||
+
|
||||
+ disableMethodProfiler = config.getBoolean("misc.disable-method-profiler", true);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 7b4b9f54510b3a05aad3f7e50e32ee0bf977244a..2bb00a42492b08036e984d3e1d9a564d4b4226c2 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2196,7 +2196,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
}
|
||||
|
||||
+ // Airplane start
|
||||
+ private final GameProfilerFiller disabledProfiler = net.minecraft.util.profiling.GameProfilerDisabled.a;
|
||||
public GameProfilerFiller getMethodProfiler() {
|
||||
+ if (gg.airplane.AirplaneConfig.disableMethodProfiler) return disabledProfiler;
|
||||
+ // Airplane end
|
||||
return this.methodProfiler;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ 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 5e2c7f3bf9aa99b10260454b9957caff81a7cd26..7fa91a3cb0d48396d106a4a729533f95e91562c0 100644
|
||||
index 137c52999666ea331ac52c230f0674d489a95524..7bba8508c22233ac524d782d159d97f6609748af 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1450,6 +1450,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Swaps the predicate order of collision
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index c20787a20cf6f273092d2b7ef0d7d90abcfdf609..6bfd58a34224b22857a647b21c35068f911a3d26 100644
|
||||
index 706a1e2fadb0880277093be5de63f4dc0792fb72..2e872fe6e74d4deaa2bb46c5e9db472fbca03187 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1723,8 +1723,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -1754,8 +1754,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
public void pickup(EntityHuman entityhuman) {}
|
||||
|
||||
public void collide(Entity entity) {
|
||||
|
@ -90,7 +90,7 @@ index 89618f652b5eea4a380b0f00a5e4f8007495a0ef..94562f7b0f5cde9f8b4a163cc2b8cf7a
|
||||
if (this.world != null) BlockLectern.a(this.getWorld(), this.getPosition(), this.getBlock()); // CraftBukkit
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index b99423b3b413fc6364c6530a99e3c74dd406e1b4..011426d0ce66299e50bd6dd2295e27bb2a873eb3 100644
|
||||
index f2b2db663198037ba4b7942815bfcd5ddd0e2a8d..6d23ac5b8094330c20d8733795fcb3a699c50183 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -31,6 +31,7 @@ import net.minecraft.world.level.block.BlockWorkbench;
|
||||
@ -101,7 +101,7 @@ index b99423b3b413fc6364c6530a99e3c74dd406e1b4..011426d0ce66299e50bd6dd2295e27bb
|
||||
import net.minecraft.world.level.block.entity.TileEntitySign;
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
import org.bukkit.GameMode;
|
||||
@@ -301,6 +302,11 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -308,6 +309,11 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
if (craft.getInventory() instanceof ITileInventory) {
|
||||
iinventory = (ITileInventory) craft.getInventory();
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ index 0000000000000000000000000000000000000000..fe7330fabe386966c2d203a190a00a78
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
|
||||
index 1814f9fe3a43b7bd06e920066e3500606708e08c..1132743062846f0ac20a2611bc2ec697d6ea97da 100644
|
||||
index 1814f9fe3a43b7bd06e920066e3500606708e08c..e6daeb25aecc1759b505a2ad74a6e32d89597fd8 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/World.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/World.java
|
||||
@@ -160,6 +160,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@ -141,14 +141,14 @@ index 1814f9fe3a43b7bd06e920066e3500606708e08c..1132743062846f0ac20a2611bc2ec697
|
||||
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
|
||||
public static BlockPosition lastPhysicsProblem; // Spigot
|
||||
private org.spigotmc.TickLimiter entityLimiter;
|
||||
@@ -294,6 +296,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@@ -291,6 +293,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
protected World(WorldDataMutable worlddatamutable, ResourceKey<World> resourcekey, final DimensionManager dimensionmanager, Supplier<GameProfilerFiller> supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env, java.util.concurrent.Executor executor) { // Paper
|
||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.WorldDataServer) worlddatamutable).getName()); // Spigot
|
||||
this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(((net.minecraft.world.level.storage.WorldDataServer) worlddatamutable).getName(), this.spigotConfig); // Paper
|
||||
+ this.origamiConfig = new de.minebench.origami.OrigamiConfig.WorldConfig(((net.minecraft.world.level.storage.WorldDataServer) worlddatamutable).getName()); // Origami - World Config
|
||||
this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray
|
||||
this.tuinityConfig = new com.tuinity.tuinity.config.TuinityConfig.WorldConfig(((net.minecraft.world.level.storage.WorldDataServer)worlddatamutable).getName()); // Tuinity - Server Config
|
||||
this.purpurConfig = new net.pl3x.purpur.PurpurWorldConfig((((net.minecraft.world.level.storage.WorldDataServer)worlddatamutable).getName()), env); // Purpur
|
||||
+ this.origamiConfig = new de.minebench.origami.OrigamiConfig.WorldConfig(((net.minecraft.world.level.storage.WorldDataServer)worlddatamutable).getName()); // Origami - World Config
|
||||
this.playerBreedingCooldowns = this.getNewBreedingCooldownCache(); // Purpur
|
||||
this.generator = gen;
|
||||
this.world = new CraftWorld((WorldServer) this, gen, env);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index d57292e524cad6306c99c1cf6c5790fe1d07d815..298b0dfc67906a96d61b4d40919d3363cede0401 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
|
@ -1,42 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Phoenix616 <mail@moep.tv>
|
||||
Date: Mon, 13 Jan 2020 01:00:49 +0100
|
||||
Subject: [PATCH] Don't load chunk with seed based feature search
|
||||
|
||||
|
||||
diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
index fe7330fabe386966c2d203a190a00a785ea21be0..a1a585f5b4b2c10c41b184636149c8dde2a3ae51 100644
|
||||
--- a/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
+++ b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
@@ -112,6 +112,14 @@ public final class OrigamiConfig {
|
||||
config.addDefault("worlds.default." + path, Double.valueOf(dfl));
|
||||
return config.getDouble("worlds." + worldName + "." + path, config.getDouble("worlds.default." + path, dfl));
|
||||
}
|
||||
+
|
||||
+ public boolean fastFeatureSearchDontLoad = false;
|
||||
+ private void fastFeatureSearch() {
|
||||
+ fastFeatureSearchDontLoad = getBoolean("fast-feature-search-dont-load-chunk", fastFeatureSearchDontLoad);
|
||||
+ if (fastFeatureSearchDontLoad) {
|
||||
+ Bukkit.getLogger().info("Returning matching chunk rom fast search directly instead of loading it.");
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/feature/StructureGenerator.java b/src/main/java/net/minecraft/world/level/levelgen/feature/StructureGenerator.java
|
||||
index 917d147b06b7045ea69917c81f35fcafdd5098dd..5400fcae620912df1dd2c30667cbc4a764252308 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/feature/StructureGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/feature/StructureGenerator.java
|
||||
@@ -184,6 +184,11 @@ public abstract class StructureGenerator<C extends WorldGenFeatureConfiguration>
|
||||
}
|
||||
}
|
||||
// Paper end
|
||||
+ // Origami start - seed based feature search doesn't load
|
||||
+ if (iworldreader instanceof net.minecraft.world.level.World && ((net.minecraft.world.level.World) iworldreader).origamiConfig.fastFeatureSearchDontLoad) {
|
||||
+ return chunkcoordintpair.l();
|
||||
+ }
|
||||
+ // Origami end
|
||||
IChunkAccess ichunkaccess = iworldreader.getChunkAt(chunkcoordintpair.x, chunkcoordintpair.z, ChunkStatus.STRUCTURE_STARTS);
|
||||
StructureStart<?> structurestart = structuremanager.a(SectionPosition.a(ichunkaccess.getPos(), 0), this, ichunkaccess);
|
||||
|
@ -9,12 +9,12 @@ chain.
|
||||
- Only set check cooldown if it's bigger than already set cooldown
|
||||
|
||||
diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
index a1a585f5b4b2c10c41b184636149c8dde2a3ae51..f02eb8478cef4ffccee83a1ec4ae5ffbfb0591c1 100644
|
||||
index fe7330fabe386966c2d203a190a00a785ea21be0..adee28db7c3eecae30b2b05f3eef3fb1bcc1cfbd 100644
|
||||
--- a/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
+++ b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
@@ -120,6 +120,12 @@ public final class OrigamiConfig {
|
||||
Bukkit.getLogger().info("Returning matching chunk rom fast search directly instead of loading it.");
|
||||
}
|
||||
@@ -112,6 +112,12 @@ public final class OrigamiConfig {
|
||||
config.addDefault("worlds.default." + path, Double.valueOf(dfl));
|
||||
return config.getDouble("worlds." + worldName + "." + path, config.getDouble("worlds.default." + path, dfl));
|
||||
}
|
||||
+ public boolean tickEmptyHoppers = false;
|
||||
+ public int fullHopperCooldown = 128;
|
||||
@ -84,10 +84,18 @@ index 0166d11cb540a536390f486e1069d6119d8d23d6..b688ff6534e069bc631e2cb84bb1deb3
|
||||
@Override
|
||||
public boolean a(EntityHuman entityhuman) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BlockComposter.java b/src/main/java/net/minecraft/world/level/block/BlockComposter.java
|
||||
index c0b235d5edf3cd14021696d1b4f76ce3de41f5d5..2d6abc0b8b3c9860110f0b5f1df1b3b3bbf30673 100644
|
||||
index c0b235d5edf3cd14021696d1b4f76ce3de41f5d5..802139cf4e15191be0e4afddda12a01079e9ce35 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BlockComposter.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BlockComposter.java
|
||||
@@ -302,6 +302,7 @@ public class BlockComposter extends Block implements IInventoryHolder {
|
||||
@@ -23,6 +23,7 @@ import net.minecraft.world.level.GeneratorAccess;
|
||||
import net.minecraft.world.level.IBlockAccess;
|
||||
import net.minecraft.world.level.IMaterial;
|
||||
import net.minecraft.world.level.World;
|
||||
+import net.minecraft.world.level.block.entity.TileEntityHopper;
|
||||
import net.minecraft.world.level.block.state.BlockBase;
|
||||
import net.minecraft.world.level.block.state.BlockStateList;
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
@@ -302,6 +303,7 @@ public class BlockComposter extends Block implements IInventoryHolder {
|
||||
if ((Integer) iblockdata.get(BlockComposter.a) == 7) {
|
||||
worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.a((IBlockState) BlockComposter.a), 3);
|
||||
worldserver.playSound((EntityHuman) null, blockposition, SoundEffects.BLOCK_COMPOSTER_READY, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add option to disable observer clocks
|
||||
|
||||
|
||||
diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
index f02eb8478cef4ffccee83a1ec4ae5ffbfb0591c1..047e7d42ce54aa1cb28cfe8b194bf5c6c75824ad 100644
|
||||
index adee28db7c3eecae30b2b05f3eef3fb1bcc1cfbd..bd81abc4dc17491c9c4bb10c2edb4e1ca103c8f8 100644
|
||||
--- a/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
+++ b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
@@ -126,6 +126,11 @@ public final class OrigamiConfig {
|
||||
@@ -118,6 +118,11 @@ public final class OrigamiConfig {
|
||||
tickEmptyHoppers = getBoolean("tick-empty-hoppers", tickEmptyHoppers);
|
||||
fullHopperCooldown = getInt("ticks-per.full-hopper-cooldown", fullHopperCooldown);
|
||||
}
|
@ -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 be709c961cd85c1db32fb49c71c63814cbe6bd23..890326cf415a7c5b0d62e9597895d3060ba12d7a 100644
|
||||
index 8db61c8b392c8e95f6896b6e48e4d74ddd6b8708..624156bce4968c6d630f71f1e723771ccc94303c 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 {
|
||||
@ -24,7 +24,7 @@ index be709c961cd85c1db32fb49c71c63814cbe6bd23..890326cf415a7c5b0d62e9597895d306
|
||||
|
||||
this.ticksFarFromPlayer = 0;
|
||||
float f1 = f;
|
||||
@@ -1969,6 +1972,11 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1982,6 +1985,11 @@ public abstract class EntityLiving extends Entity {
|
||||
if (event.isCancelled()) {
|
||||
return false;
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix exp drop of zombie pigmen (MC-56653)
|
||||
|
||||
|
||||
diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
index 047e7d42ce54aa1cb28cfe8b194bf5c6c75824ad..27599f422be266ad2fdbda49617661801c2c1991 100644
|
||||
index bd81abc4dc17491c9c4bb10c2edb4e1ca103c8f8..e72be36d860630afb879b40bf028c5e456169634 100644
|
||||
--- a/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
+++ b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
@@ -131,6 +131,10 @@ public final class OrigamiConfig {
|
||||
@@ -123,6 +123,10 @@ public final class OrigamiConfig {
|
||||
private void observerClock() {
|
||||
disableObserverClocks = getBoolean("disable-observer-clocks", disableObserverClocks);
|
||||
}
|
||||
@ -21,10 +21,10 @@ index 047e7d42ce54aa1cb28cfe8b194bf5c6c75824ad..27599f422be266ad2fdbda4961766180
|
||||
}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityPigZombie.java b/src/main/java/net/minecraft/world/entity/monster/EntityPigZombie.java
|
||||
index 736c45bae020158866514bc760c05a929f47c531..bf72577af3c5631116fbcf086a2c681ea4a4e0a2 100644
|
||||
index dfe65943b3a2f744f06b4669590cc203e8419e60..190e37a1b3b5fdbc8bfaaeabb621311503bbc303 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/EntityPigZombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/EntityPigZombie.java
|
||||
@@ -123,7 +123,7 @@ public class EntityPigZombie extends EntityZombie implements IEntityAngerable {
|
||||
@@ -124,7 +124,7 @@ public class EntityPigZombie extends EntityZombie implements IEntityAngerable {
|
||||
protected void mobTick() {
|
||||
AttributeModifiable attributemodifiable = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
|
||||
|
@ -534,10 +534,10 @@ index 28a1fe3af1546daa779df46468e0ff8ad823f9ca..7a3be414ef9d54d7a852ba92d704011f
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index ba899198be49f9e95c3fb64759313662f75c4567..db4b94f8a4dd49fffdcb0cd9bf0690f0770653d9 100644
|
||||
index 3bf6e58b2351cee935e23abec1cea289e31943dc..5f2d5e12f11b471662943680b2012c99a8466306 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -81,6 +81,8 @@ public interface UnsafeValues {
|
||||
@@ -87,6 +87,8 @@ public interface UnsafeValues {
|
||||
|
||||
/**
|
||||
* Called once by the version command on first use, then cached.
|
||||
@ -546,7 +546,7 @@ index ba899198be49f9e95c3fb64759313662f75c4567..db4b94f8a4dd49fffdcb0cd9bf0690f0
|
||||
*/
|
||||
default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
||||
return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher();
|
||||
@@ -99,6 +101,8 @@ public interface UnsafeValues {
|
||||
@@ -105,6 +107,8 @@ public interface UnsafeValues {
|
||||
/**
|
||||
* Return the translation key for the Material, so the client can translate it into the active
|
||||
* locale when using a TranslatableComponent.
|
||||
@ -555,7 +555,7 @@ index ba899198be49f9e95c3fb64759313662f75c4567..db4b94f8a4dd49fffdcb0cd9bf0690f0
|
||||
* @return the translation key
|
||||
*/
|
||||
String getTranslationKey(Material mat);
|
||||
@@ -106,6 +110,8 @@ public interface UnsafeValues {
|
||||
@@ -112,6 +116,8 @@ public interface UnsafeValues {
|
||||
/**
|
||||
* Return the translation key for the Block, so the client can translate it into the active
|
||||
* locale when using a TranslatableComponent.
|
||||
@ -564,7 +564,7 @@ index ba899198be49f9e95c3fb64759313662f75c4567..db4b94f8a4dd49fffdcb0cd9bf0690f0
|
||||
* @return the translation key
|
||||
*/
|
||||
String getTranslationKey(org.bukkit.block.Block block);
|
||||
@@ -114,6 +120,8 @@ public interface UnsafeValues {
|
||||
@@ -120,6 +126,8 @@ public interface UnsafeValues {
|
||||
* Return the translation key for the EntityType, so the client can translate it into the active
|
||||
* locale when using a TranslatableComponent.<br>
|
||||
* This is <code>null</code>, when the EntityType isn't known to NMS (custom entities)
|
||||
@ -573,7 +573,7 @@ index ba899198be49f9e95c3fb64759313662f75c4567..db4b94f8a4dd49fffdcb0cd9bf0690f0
|
||||
* @return the translation key
|
||||
*/
|
||||
String getTranslationKey(org.bukkit.entity.EntityType type);
|
||||
@@ -122,6 +130,8 @@ public interface UnsafeValues {
|
||||
@@ -128,6 +136,8 @@ public interface UnsafeValues {
|
||||
* Creates and returns the next EntityId available.
|
||||
* <p>
|
||||
* Use this when sending custom packets, so that there are no collisions on the client or server.
|
||||
|
@ -17,10 +17,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index db4b94f8a4dd49fffdcb0cd9bf0690f0770653d9..bca389b75ed072ec95beb7a5c5eb5ac93ce42ecd 100644
|
||||
index 5f2d5e12f11b471662943680b2012c99a8466306..7395fe0261da696d1b16c845d244ad5d6957d92a 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -159,4 +159,28 @@ public interface UnsafeValues {
|
||||
@@ -165,4 +165,28 @@ public interface UnsafeValues {
|
||||
*/
|
||||
int getProtocolVersion();
|
||||
// Paper end
|
||||
|
@ -1,463 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Sauve <paul@technove.co>
|
||||
Date: Fri, 12 Feb 2021 16:29:41 -0600
|
||||
Subject: [PATCH] Multithreaded entity tracking
|
||||
|
||||
Adds a configuration option to run the tracker on multiple threads.
|
||||
This will generally be faster than the single threaded approach,
|
||||
unless you don't have a lot of entities/players.
|
||||
|
||||
Airplane
|
||||
Copyright (C) 2020 Technove LLC
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
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/com/tuinity/tuinity/util/maplist/IteratorSafeOrderedReferenceSet.java b/src/main/java/com/tuinity/tuinity/util/maplist/IteratorSafeOrderedReferenceSet.java
|
||||
index be408aebbccbda46e8aa82ef337574137cfa0096..739839314fd8a88b5fca8b9678e1df07a166c35d 100644
|
||||
--- a/src/main/java/com/tuinity/tuinity/util/maplist/IteratorSafeOrderedReferenceSet.java
|
||||
+++ b/src/main/java/com/tuinity/tuinity/util/maplist/IteratorSafeOrderedReferenceSet.java
|
||||
@@ -16,11 +16,11 @@ public final class IteratorSafeOrderedReferenceSet<E> {
|
||||
|
||||
/* list impl */
|
||||
protected E[] listElements;
|
||||
- protected int listSize;
|
||||
+ protected int listSize; public int getListSize() { return this.listSize; } // Airplane - getter
|
||||
|
||||
protected final double maxFragFactor;
|
||||
|
||||
- protected int iteratorCount;
|
||||
+ public int iteratorCount; // Airplane - public for debug
|
||||
|
||||
private final boolean threadRestricted;
|
||||
|
||||
diff --git a/src/main/java/gg/airplane/AirplaneConfig.java b/src/main/java/gg/airplane/AirplaneConfig.java
|
||||
index 7ec84ef1d1cbb1fabf4c590a2f2c1da3cc181010..b9118cc08ac38e0813d0677700d3d7dcf9b74159 100644
|
||||
--- a/src/main/java/gg/airplane/AirplaneConfig.java
|
||||
+++ b/src/main/java/gg/airplane/AirplaneConfig.java
|
||||
@@ -102,4 +102,17 @@ public class AirplaneConfig {
|
||||
}
|
||||
|
||||
|
||||
+ public static boolean multithreadedEntityTracker = false;
|
||||
+ public static boolean entityTrackerAsyncPackets = false;
|
||||
+
|
||||
+ private static void entityTracker() {
|
||||
+ config.setComment("tracker", "Options to improve the performance of the entity tracker");
|
||||
+
|
||||
+ multithreadedEntityTracker = config.getBoolean("tracker.multithreaded", multithreadedEntityTracker,
|
||||
+ "This enables the multithreading of the tracker.");
|
||||
+ entityTrackerAsyncPackets = config.getBoolean("tracker.unsafe-async-packets", entityTrackerAsyncPackets,
|
||||
+ "This option can break plugins that assume packets from the",
|
||||
+ "entity tracker will be sent sync.");
|
||||
+ }
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/gg/airplane/commands/AirplaneCommands.java b/src/main/java/gg/airplane/commands/AirplaneCommands.java
|
||||
index 66b20250a26d005427601b1cdee43bdd9eba70cc..f84e26b2d8ab9a9b2d9e92e18002483127121135 100644
|
||||
--- a/src/main/java/gg/airplane/commands/AirplaneCommands.java
|
||||
+++ b/src/main/java/gg/airplane/commands/AirplaneCommands.java
|
||||
@@ -2,11 +2,13 @@ package gg.airplane.commands;
|
||||
|
||||
import gg.airplane.AirplaneCommand;
|
||||
import gg.airplane.flare.FlareCommand;
|
||||
+import gg.airplane.structs.TrackQueue;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
|
||||
public class AirplaneCommands {
|
||||
public static void init() {
|
||||
MinecraftServer.getServer().server.getCommandMap().register("airplane", "Airplane", new AirplaneCommand());
|
||||
MinecraftServer.getServer().server.getCommandMap().register("flare", "Airplane", new FlareCommand());
|
||||
+ TrackQueue.TrackQueueDebugCommand.register();
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/gg/airplane/structs/TrackQueue.java b/src/main/java/gg/airplane/structs/TrackQueue.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..4419fbe94041f4b8a0ea848880798289d063b8e2
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/airplane/structs/TrackQueue.java
|
||||
@@ -0,0 +1,109 @@
|
||||
+package gg.airplane.structs;
|
||||
+
|
||||
+import com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet;
|
||||
+import net.minecraft.server.level.WorldServer;
|
||||
+import net.minecraft.world.level.chunk.Chunk;
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
+import org.apache.logging.log4j.Level;
|
||||
+import org.bukkit.command.Command;
|
||||
+import org.bukkit.command.CommandSender;
|
||||
+
|
||||
+import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
+import java.util.concurrent.ForkJoinPool;
|
||||
+import java.util.concurrent.atomic.AtomicInteger;
|
||||
+
|
||||
+/**
|
||||
+ * Helper class to handle processing a track queue.
|
||||
+ */
|
||||
+public class TrackQueue {
|
||||
+
|
||||
+ public static class TrackQueueDebugCommand extends Command {
|
||||
+ protected TrackQueueDebugCommand() {
|
||||
+ super("trackqueuedebug");
|
||||
+ }
|
||||
+
|
||||
+ public static void register() {
|
||||
+ MinecraftServer.getServer().server.getCommandMap().register("trackqueuedebug", "Airplane", new TrackQueueDebugCommand());
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean execute(CommandSender sender, String commandLabel, String[] args) {
|
||||
+ if (!sender.isOp()) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ for (WorldServer world : MinecraftServer.getServer().getWorlds()) {
|
||||
+ IteratorSafeOrderedReferenceSet<Chunk> chunks = world.getChunkProvider().entityTickingChunks;
|
||||
+ sender.sendMessage(world.getWorld().getName() + ": " + chunks.size() + " / " + chunks.getListSize() + " (iterators: " + chunks.iteratorCount + ")");
|
||||
+ }
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private final IteratorSafeOrderedReferenceSet<Chunk> chunks;
|
||||
+ private final ForkJoinPool pool = new ForkJoinPool(Math.max(4, Runtime.getRuntime().availableProcessors() >> 2));
|
||||
+ private final AtomicInteger taskIndex = new AtomicInteger();
|
||||
+
|
||||
+ private final ConcurrentLinkedQueue<Runnable> mainThreadTasks;
|
||||
+
|
||||
+ public TrackQueue(IteratorSafeOrderedReferenceSet<Chunk> chunks, ConcurrentLinkedQueue<Runnable> mainThreadTasks) {
|
||||
+ this.chunks = chunks;
|
||||
+ this.mainThreadTasks = mainThreadTasks;
|
||||
+ }
|
||||
+
|
||||
+ public void start() {
|
||||
+ int iterator = this.chunks.createRawIterator();
|
||||
+ if (iterator == -1) {
|
||||
+ return;
|
||||
+ }
|
||||
+ try {
|
||||
+ this.taskIndex.set(iterator);
|
||||
+
|
||||
+ for (int i = 0; i < this.pool.getParallelism(); i++) {
|
||||
+ this.pool.execute(this::run);
|
||||
+ }
|
||||
+
|
||||
+ while (this.taskIndex.get() < this.chunks.getListSize()) {
|
||||
+ this.runMainThreadTasks();
|
||||
+ this.handleTask(); // assist
|
||||
+ }
|
||||
+ this.runMainThreadTasks(); // finish tasks
|
||||
+ } finally {
|
||||
+ this.chunks.finishRawIterator();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private void runMainThreadTasks() {
|
||||
+ Runnable task;
|
||||
+ while ((task = this.mainThreadTasks.poll()) != null) {
|
||||
+ try {
|
||||
+ task.run();
|
||||
+ } catch (Throwable t) {
|
||||
+ MinecraftServer.LOGGER.log(Level.WARN, "Tasks failed while ticking track queue", t);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ private void run() {
|
||||
+ while (handleTask());
|
||||
+ }
|
||||
+
|
||||
+ private boolean handleTask() {
|
||||
+ int index;
|
||||
+ while ((index = this.taskIndex.getAndIncrement()) < this.chunks.getListSize()) {
|
||||
+ Chunk chunk = this.chunks.rawGet(index);
|
||||
+ if (chunk != null) {
|
||||
+ try {
|
||||
+ chunk.entityTracker.run();
|
||||
+ } catch (Throwable t) {
|
||||
+ MinecraftServer.LOGGER.log(Level.WARN, "Ticking tracker failed", t);
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
index 207a9c3928aad7c6e89a120b54d87e003ebd232c..424cd048f905cd0ed3f7a4545a26ffde8da1f91f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
@@ -388,7 +388,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
}
|
||||
|
||||
final com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet<Chunk> tickingChunks = new com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet<>(4096, 0.75f, 4096, 0.15, true);
|
||||
- final com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet<Chunk> entityTickingChunks = new com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet<>(4096, 0.75f, 4096, 0.15, true);
|
||||
+ public final com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet<Chunk> entityTickingChunks = new com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet<>(4096, 0.75f, 4096, 0.15, true); // Airplane - public for debug
|
||||
// Tuinity end
|
||||
|
||||
public ChunkProviderServer(WorldServer worldserver, Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, ChunkGenerator chunkgenerator, int i, boolean flag, WorldLoadListener worldloadlistener, Supplier<WorldPersistentData> supplier) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
index 62b95dcba8606330fbb3239e74c5eaf8baa3c51d..fd6dbbf619b828c4ef3d00f8dc30d3893007db7b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
@@ -182,7 +182,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
public NetworkManager networkManager; // Paper
|
||||
public final MinecraftServer server;
|
||||
public final PlayerInteractManager playerInteractManager;
|
||||
- public final Deque<Integer> removeQueue = new ArrayDeque<>(); // Paper
|
||||
+ public final Deque<Integer> removeQueue = new java.util.concurrent.ConcurrentLinkedDeque<>(); // Paper // Airplane concurrent deque
|
||||
private final AdvancementDataPlayer advancementDataPlayer;
|
||||
private final ServerStatisticManager serverStatisticManager;
|
||||
private float lastHealthScored = Float.MIN_VALUE;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
|
||||
index 67ca28463f5add7c18f7f16b918c3f36f8feeeda..37e64e24ca3a90370cdf12e5ff9cd1fceede796b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
|
||||
@@ -75,6 +75,10 @@ public class EntityTrackerEntry {
|
||||
* Requested in https://github.com/PaperMC/Paper/issues/1537 to allow intercepting packets
|
||||
*/
|
||||
public void sendPlayerPacket(EntityPlayer player, Packet packet) {
|
||||
+ if (!gg.airplane.AirplaneConfig.entityTrackerAsyncPackets && !org.bukkit.Bukkit.isPrimaryThread()) {
|
||||
+ this.b.chunkProvider.playerChunkMap.trackerEnsureMain(() -> sendPlayerPacket(player, packet));
|
||||
+ return;
|
||||
+ }
|
||||
player.playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@@ -103,7 +107,7 @@ public class EntityTrackerEntry {
|
||||
|
||||
public final void tick() { this.a(); } // Paper - OBFHELPER
|
||||
public void a() {
|
||||
- com.tuinity.tuinity.util.TickThread.softEnsureTickThread("Tracker update"); // Tuinity
|
||||
+ //com.tuinity.tuinity.util.TickThread.softEnsureTickThread("Tracker update"); // Tuinity // Airplane - allow multithreaded
|
||||
List<Entity> list = this.tracker.passengers; // Paper - do not copy list
|
||||
|
||||
if (!list.equals(this.p)) {
|
||||
@@ -116,6 +120,8 @@ public class EntityTrackerEntry {
|
||||
ItemStack itemstack = entityitemframe.getItem();
|
||||
|
||||
if (this.tickCounter % 10 == 0 && itemstack.getItem() instanceof ItemWorldMap) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks
|
||||
+ // Airplane start - process maps on main
|
||||
+ this.b.chunkProvider.playerChunkMap.trackerEnsureMain(() -> {
|
||||
WorldMap worldmap = ItemWorldMap.getSavedMap(itemstack, this.b);
|
||||
Iterator iterator = this.trackedPlayers.iterator(); // CraftBukkit
|
||||
|
||||
@@ -129,6 +135,8 @@ public class EntityTrackerEntry {
|
||||
entityplayer.playerConnection.sendPacket(packet);
|
||||
}
|
||||
}
|
||||
+ });
|
||||
+ // Airplane end
|
||||
}
|
||||
|
||||
this.c();
|
||||
@@ -263,18 +271,25 @@ public class EntityTrackerEntry {
|
||||
// CraftBukkit start - Create PlayerVelocity event
|
||||
boolean cancelled = false;
|
||||
|
||||
- if (this.tracker instanceof EntityPlayer) {
|
||||
+ if (this.tracker instanceof EntityPlayer && PlayerVelocityEvent.getHandlerList().getRegisteredListeners().length > 0) { // Airplane - ensure there's listeners
|
||||
+ // Airplane start - run on main thread
|
||||
+ this.b.chunkProvider.playerChunkMap.trackerEnsureMain(() -> {
|
||||
Player player = (Player) this.tracker.getBukkitEntity();
|
||||
org.bukkit.util.Vector velocity = player.getVelocity();
|
||||
|
||||
PlayerVelocityEvent event = new PlayerVelocityEvent(player, velocity.clone());
|
||||
this.tracker.world.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
- if (event.isCancelled()) {
|
||||
- cancelled = true;
|
||||
- } else if (!velocity.equals(event.getVelocity())) {
|
||||
+ if (!event.isCancelled() && !velocity.equals(event.getVelocity())) {
|
||||
player.setVelocity(event.getVelocity());
|
||||
}
|
||||
+ if (!event.isCancelled()) {
|
||||
+ this.broadcastIncludingSelf(new PacketPlayOutEntityVelocity(this.tracker)); // duplicate from !cancelled below
|
||||
+ }
|
||||
+
|
||||
+ });
|
||||
+ cancelled = true; // don't broadcast until the event has finished
|
||||
+ // Airplane end
|
||||
}
|
||||
|
||||
if (!cancelled) {
|
||||
@@ -358,7 +373,9 @@ public class EntityTrackerEntry {
|
||||
if (!list.isEmpty()) {
|
||||
consumer.accept(new PacketPlayOutEntityEquipment(this.tracker.getId(), list));
|
||||
}
|
||||
+ this.b.chunkProvider.playerChunkMap.trackerEnsureMain(() -> { // Airplane
|
||||
((EntityLiving) this.tracker).updateEquipment(); // CraftBukkit - SPIGOT-3789: sync again immediately after sending
|
||||
+ }); // Airplane
|
||||
}
|
||||
|
||||
// CraftBukkit start - Fix for nonsensical head yaw
|
||||
@@ -436,6 +453,10 @@ public class EntityTrackerEntry {
|
||||
// Paper end
|
||||
|
||||
private void broadcastIncludingSelf(Packet<?> packet) {
|
||||
+ if (!gg.airplane.AirplaneConfig.entityTrackerAsyncPackets && !org.bukkit.Bukkit.isPrimaryThread()) {
|
||||
+ this.b.chunkProvider.playerChunkMap.trackerEnsureMain(() -> broadcastIncludingSelf(packet));
|
||||
+ return;
|
||||
+ }
|
||||
this.f.accept(packet);
|
||||
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 b28995ecfd7f45e6b6197be96c418aa0d05d3383..bb5ebacf99238223b84f3663af3ab9c6c60332eb 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||
@@ -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) {
|
||||
+ return this.hasPendingVisibleUpdate ? this.pendingVisibleChunks.get(i) : ((ProtectedVisibleChunksMap) this.visibleChunks).safeGet(i);
|
||||
+ }
|
||||
+ // Airplane end
|
||||
|
||||
protected final IntSupplier getPrioritySupplier(long i) { return c(i); } // Paper - OBFHELPER
|
||||
protected IntSupplier c(long i) {
|
||||
@@ -2158,10 +2163,30 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
entity.tracker = null; // Paper - We're no longer tracked
|
||||
}
|
||||
|
||||
+ // Airplane start - tools to ensure main thread
|
||||
+ private final java.util.concurrent.ConcurrentLinkedQueue<Runnable> trackerMainQueue = new java.util.concurrent.ConcurrentLinkedQueue<>();
|
||||
+ private gg.airplane.structs.TrackQueue trackQueue;
|
||||
+
|
||||
+ void trackerEnsureMain(Runnable runnable) {
|
||||
+ if (this.world.serverThread == Thread.currentThread()) {
|
||||
+ runnable.run();
|
||||
+ } else {
|
||||
+ this.trackerMainQueue.add(runnable);
|
||||
+ }
|
||||
+ }
|
||||
+ // Airplane end
|
||||
+
|
||||
// Paper start - optimised tracker
|
||||
private final void processTrackQueue() {
|
||||
this.world.timings.tracker1.startTiming();
|
||||
try {
|
||||
+ // Airplane start - multithreaded tracker
|
||||
+ if (this.trackQueue == null) this.trackQueue = new gg.airplane.structs.TrackQueue(this.world.getChunkProvider().entityTickingChunks, trackerMainQueue);
|
||||
+ if (gg.airplane.AirplaneConfig.multithreadedEntityTracker) {
|
||||
+ this.trackQueue.start();
|
||||
+ return;
|
||||
+ }
|
||||
+ // Airplane end
|
||||
com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet.Iterator<Chunk> iterator = this.world.getChunkProvider().entityTickingChunks.iterator();
|
||||
try {
|
||||
while (iterator.hasNext()) {
|
||||
@@ -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
|
||||
- private final Entity tracker;
|
||||
+ public final Entity tracker; // Airplane - public for chunk
|
||||
private final int trackingDistance;
|
||||
private SectionPosition e;
|
||||
// Paper start
|
||||
@@ -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;
|
||||
|
||||
- final void updatePlayers(com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<EntityPlayer> newTrackerCandidates) {
|
||||
+ public synchronized final void tickEntry() { this.trackerEntry.tick(); } // Airplane - move entry tick into sync block
|
||||
+
|
||||
+ public synchronized final void updatePlayers(com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<EntityPlayer> newTrackerCandidates) { // Airplane
|
||||
com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<EntityPlayer> oldTrackerCandidates = this.lastTrackerCandidates;
|
||||
this.lastTrackerCandidates = newTrackerCandidates;
|
||||
|
||||
@@ -2487,7 +2514,13 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
return this.tracker.getId();
|
||||
}
|
||||
|
||||
- public void broadcast(Packet<?> packet) {
|
||||
+ public synchronized void broadcast(Packet<?> packet) { // Airplane - synchronized for tracked player
|
||||
+ // Airplane start
|
||||
+ if (!gg.airplane.AirplaneConfig.entityTrackerAsyncPackets && !org.bukkit.Bukkit.isPrimaryThread()) {
|
||||
+ trackerEnsureMain(() -> broadcast(packet));
|
||||
+ return;
|
||||
+ }
|
||||
+ // Airplane end
|
||||
Iterator iterator = this.trackedPlayers.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -2499,6 +2532,12 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
}
|
||||
|
||||
public void broadcastIncludingSelf(Packet<?> packet) {
|
||||
+ // Airplane start
|
||||
+ if (!gg.airplane.AirplaneConfig.entityTrackerAsyncPackets && !org.bukkit.Bukkit.isPrimaryThread()) {
|
||||
+ trackerEnsureMain(() -> broadcastIncludingSelf(packet));
|
||||
+ return;
|
||||
+ }
|
||||
+ // Airplane end
|
||||
this.broadcast(packet);
|
||||
if (this.tracker instanceof EntityPlayer) {
|
||||
((EntityPlayer) this.tracker).playerConnection.sendPacket(packet);
|
||||
@@ -2525,8 +2564,8 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
|
||||
}
|
||||
|
||||
- public void updatePlayer(EntityPlayer entityplayer) {
|
||||
- org.spigotmc.AsyncCatcher.catchOp("player tracker update"); // Spigot
|
||||
+ public synchronized void updatePlayer(EntityPlayer entityplayer) { // Airplane - sync for access to map
|
||||
+ //org.spigotmc.AsyncCatcher.catchOp("player tracker update"); // Spigot // Airplane - allow sync for tracker
|
||||
if (entityplayer != this.tracker) {
|
||||
// Paper start - remove allocation of Vec3D here
|
||||
//Vec3D vec3d = entityplayer.getPositionVector().d(this.tracker.getPositionVector()); // MC-155077, SPIGOT-5113
|
||||
@@ -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);
|
||||
- PlayerChunk playerchunk = PlayerChunkMap.this.getVisibleChunk(chunkcoordintpair.pair());
|
||||
+ PlayerChunk playerchunk = PlayerChunkMap.this.trackerGetVisibleChunk(chunkcoordintpair.pair()); // Airplane
|
||||
|
||||
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 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 {
|
||||
}
|
||||
// Airplane end
|
||||
|
||||
+ // Airplane start - entity tracker runnable
|
||||
+ // prevents needing to allocate new lambda in processTrackQueue
|
||||
+ public final Runnable entityTracker = new Runnable() {
|
||||
+ @Override
|
||||
+ public void run() {
|
||||
+ Entity[] entities = Chunk.this.entities.getRawData();
|
||||
+ for (int i = 0, len = Chunk.this.entities.size(); i < len; ++i) {
|
||||
+ Entity entity = entities[i];
|
||||
+ if (entity != null) {
|
||||
+ PlayerChunkMap.EntityTracker tracker = ((WorldServer) Chunk.this.getWorld()).getChunkProvider().playerChunkMap.trackedEntities.get(entity.getId());
|
||||
+ if (tracker != null) {
|
||||
+ tracker.updatePlayers(tracker.tracker.getPlayersInTrackRange());
|
||||
+ tracker.tickEntry();
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ };
|
||||
+ // Airplane end
|
||||
+
|
||||
public Chunk(World world, ChunkCoordIntPair chunkcoordintpair, BiomeStorage biomestorage) {
|
||||
this(world, chunkcoordintpair, biomestorage, ChunkConverter.a, TickListEmpty.b(), TickListEmpty.b(), 0L, (ChunkSection[]) null, (Consumer) null);
|
||||
}
|
@ -92,7 +92,7 @@ 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 246fcc9b40152964810ceef356ecb2eee3551135..8620bbcc7c555e4760777397063f0392c9acc35e 100644
|
||||
index 2bb00a42492b08036e984d3e1d9a564d4b4226c2..42c24781d058cee94db8f0fa1a6849b41a0394ff 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1646,7 +1646,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@ -243,10 +243,10 @@ index aec6c036ed42078a6cc3540f1f6e46a551e87a2f..f9913d7bd66935f975b756f31e26153e
|
||||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||
private final Logger logger = Logger.getLogger("Minecraft");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 6bfba82b428250e6725688d196b3dc6ac11a5e01..38e1bd3893b9dfcf1bac1333d06b4e9792793ec6 100644
|
||||
index 6141e86278d876e42dbed6e8f2275280babcef77..67f93f252a26f8b598a4b48c63c321728b246cae 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -377,7 +377,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -397,7 +397,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
|
||||
@Override
|
||||
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
@ -45,7 +45,7 @@ index efc1e42d606e1c9feb1a4871c0714933ae92a1b2..a0ed8ed1d6b89a4f10dff645e09eaff3
|
||||
config.save(CONFIG_FILE);
|
||||
} catch (IOException ex) {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 24a46ad36613faa5f5a1a12b70f7af886e1608ae..28d47ef97939309ce26b6e4cae14925b510755fd 100644
|
||||
index 858bd62d2a17c15ee573c5cd607a876d3a99c2b1..a76219e59c24862b9c1e09e4a2a29cf2a6260514 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -212,6 +212,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
@ -62,8 +62,8 @@ index 24a46ad36613faa5f5a1a12b70f7af886e1608ae..28d47ef97939309ce26b6e4cae14925b
|
||||
+ net.pl3x.purpur.PurpurConfig.registerCommands();
|
||||
+ // Purpur end
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
|
||||
io.papermc.paper.brigadier.PaperBrigadierProviderImpl.INSTANCE.getClass(); // init PaperBrigadierProvider
|
||||
// Paper end
|
||||
com.tuinity.tuinity.config.TuinityConfig.init((java.io.File) options.valueOf("tuinity-settings")); // Tuinity - Server Config
|
||||
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
|
||||
index f0420b87025a090a659542a00614e805bf850fd2..89b892c23a396d94c11b5d6b7ffe79e892297181 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/World.java
|
@ -5,10 +5,10 @@ Subject: [PATCH] AFK API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
index fd6dbbf619b828c4ef3d00f8dc30d3893007db7b..7e388dcca2d4e78b49d5fc5fce0b962e74839fa3 100644
|
||||
index fb61b6ac167b34486282a24e598020fb96081f28..c42a2813b40152079786dde33231d945f3144580 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
@@ -2070,8 +2070,54 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -2071,8 +2071,54 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
public void resetIdleTimer() {
|
||||
this.ca = SystemUtils.getMonotonicMillis();
|
||||
@ -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 e2bfb1423f6b24514cf7ea364be8bf5f554e0a5f..18d70aff974d756a62a8f9f0e6c52f89ef1fa2c8 100644
|
||||
index ce428fd701fe4a0505a629edb322f19d730f8132..e37c7d925afb5043e6008488f7f773ba2466ee55 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 {
|
||||
@ -76,7 +76,7 @@ index e2bfb1423f6b24514cf7ea364be8bf5f554e0a5f..18d70aff974d756a62a8f9f0e6c52f89
|
||||
})) {
|
||||
// CraftBukkit start
|
||||
long l = this.worldData.getDayTime() + 24000L;
|
||||
@@ -1348,7 +1348,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1347,7 +1347,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
while (iterator.hasNext()) {
|
||||
EntityPlayer entityplayer = (EntityPlayer) iterator.next();
|
||||
|
||||
@ -86,7 +86,7 @@ index e2bfb1423f6b24514cf7ea364be8bf5f554e0a5f..18d70aff974d756a62a8f9f0e6c52f89
|
||||
} 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 80b77cdffd64690bb9066b8745ea0ee08d60a7a4..e58bbd4c1b59293ddf58d0f7cf37a629f5cc96d6 100644
|
||||
index 159c38618d7745ea513ad179b1217d76c2c4897a..15349a7bddcad5a4a6db07a8aa6ae8d06163b1f6 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
@@ -399,6 +399,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@ -150,7 +150,7 @@ index f5e32faeb6d937cf90b1f3ea251b5cfc91f2338d..f9908fb7cc27a8947030c2100dccf1dc
|
||||
// Paper start
|
||||
public static final Predicate<Entity> affectsSpawning = (entity) -> {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
index ad85dda5c50b797904824a08513fbcec042128ea..8f9d0769e7855c3565a34927f3f3741c43e45f35 100644
|
||||
index 5f9e64df007ebc40f7bcb50be495b10e51d5b87a..17e6f476e60a4f5dc278894a0a874ca5ae45ee22 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
@@ -182,6 +182,15 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@ -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 8b36ca5062f8e0e8bd58aa506e91704a747de81b..c94cd5a95f28190e88d31b522035fc7c74a2ac33 100644
|
||||
index 94910bf0c53c79588c55b89e4a023273d6c859ef..a57473fb8815545977ff08bf46d6463d2b7a9d78 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -207,6 +207,7 @@ public class ActivationRange
|
@ -5,7 +5,7 @@ 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 8620bbcc7c555e4760777397063f0392c9acc35e..83b98a18a8b726621068b5fd2bed046852dccf2d 100644
|
||||
index 42c24781d058cee94db8f0fa1a6849b41a0394ff..6121ef7fcbadb50d05fad4270556e825f636f4d8 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1646,7 +1646,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
@ -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 74f80b6af18c0b91d9613384ca6bafd9c89f23a4..2777bd3ea82b214fc15c5ce3ce47c90c1e5fe538 100644
|
||||
index 003e1f6dc8efbabcb2e0f7a6b379196f02203903..6d4f844c68ce48b942280fc5f3a54af89b31c093 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 {
|
||||
@ -27,7 +27,7 @@ index 74f80b6af18c0b91d9613384ca6bafd9c89f23a4..2777bd3ea82b214fc15c5ce3ce47c90c
|
||||
|
||||
if (!iblockdata.isAir()) {
|
||||
double d1 = Math.min((double) (0.2F + f / 15.0F), 2.5D);
|
||||
@@ -1790,7 +1791,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1803,7 +1804,7 @@ public abstract class EntityLiving extends Entity {
|
||||
MobEffect mobeffect = this.getEffect(MobEffects.JUMP);
|
||||
float f2 = mobeffect == null ? 0.0F : (float) (mobeffect.getAmplifier() + 1);
|
||||
|
@ -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 83b98a18a8b726621068b5fd2bed046852dccf2d..a75a8322829f36045243d5fd61d28b126af1f0af 100644
|
||||
index 6121ef7fcbadb50d05fad4270556e825f636f4d8..c086f50613cc3b1061c9958eb2a8aba059a61e29 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
|
@ -5,7 +5,7 @@ Subject: [PATCH] Player invulnerabilities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
index 7e388dcca2d4e78b49d5fc5fce0b962e74839fa3..e875671ce985199bc37de131280935a859253954 100644
|
||||
index c42a2813b40152079786dde33231d945f3144580..6e3a3a50e01c41b40451bce05015714b5a7fe1e3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
@@ -284,6 +284,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@ -47,7 +47,7 @@ index 7e388dcca2d4e78b49d5fc5fce0b962e74839fa3..e875671ce985199bc37de131280935a8
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -2488,9 +2497,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -2489,9 +2498,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
@Override
|
||||
public boolean isFrozen() { // Paper - protected > public
|
||||
@ -67,7 +67,7 @@ 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 e58bbd4c1b59293ddf58d0f7cf37a629f5cc96d6..7955d1d8cbb836be55d194d66152eb49fee27e49 100644
|
||||
index 15349a7bddcad5a4a6db07a8aa6ae8d06163b1f6..37663436c1ffed4552cdcdac7a5c09fe9b632fee 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
@@ -1896,6 +1896,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@ -79,10 +79,10 @@ index e58bbd4c1b59293ddf58d0f7cf37a629f5cc96d6..7955d1d8cbb836be55d194d66152eb49
|
||||
this.server.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(getPlayer(), packStatus));
|
||||
// Paper end
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 0b5cf23932c3c626d8805d4db97d2bbab63634cf..a285d0594e61190a751a96f22afeb12d2dcce3fe 100644
|
||||
index c705bf1e651a764d56b87ebc5a86a938d8bd34bb..9360d35581c6961a768973cc31341381ee26e234 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1007,6 +1007,8 @@ public abstract class PlayerList {
|
||||
@@ -1009,6 +1009,8 @@ public abstract class PlayerList {
|
||||
}
|
||||
// Paper end
|
||||
|
@ -17,7 +17,7 @@ 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 7955d1d8cbb836be55d194d66152eb49fee27e49..1e7ae4a3947f2714159a6b93ef7d79541a6e070d 100644
|
||||
index 37663436c1ffed4552cdcdac7a5c09fe9b632fee..f5ada346a11ac3becda4b87416beebd680ca16fa 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
@@ -233,6 +233,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@ -50,7 +50,7 @@ index 7955d1d8cbb836be55d194d66152eb49fee27e49..1e7ae4a3947f2714159a6b93ef7d7954
|
||||
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
|
||||
@@ -3078,6 +3094,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -3079,6 +3095,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
|
||||
@Override
|
||||
public void a(PacketPlayInKeepAlive packetplayinkeepalive) {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Silk touch spawners
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
|
||||
index 71938ad7b3494e803beca7e4022aad12a51f2096..0b77884d8134c328f8fd1bbb8230d260606dc5ee 100644
|
||||
index cd2da276c09dcf98c1c50dc66aa30dd3b67b43af..2ef13ce5cb7df206753f41a692d74c8d68354cfc 100644
|
||||
--- a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
|
||||
+++ b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
|
||||
@@ -81,6 +81,7 @@ public final class PaperAdventure {
|
||||
@ -14,7 +14,7 @@ index 71938ad7b3494e803beca7e4022aad12a51f2096..0b77884d8134c328f8fd1bbb8230d260
|
||||
public static final LegacyComponentSerializer LEGACY_SECTION_UXRC = LegacyComponentSerializer.builder().flattener(FLATTENER).hexColors().useUnusualXRepeatedCharacterHexFormat().build();
|
||||
+ public static final LegacyComponentSerializer LEGACY_AMPERSAND = LegacyComponentSerializer.builder().character(LegacyComponentSerializer.AMPERSAND_CHAR).hexColors().build(); // Purpur
|
||||
public static final PlainComponentSerializer PLAIN = PlainComponentSerializer.builder().flattener(FLATTENER).build();
|
||||
static final GsonComponentSerializer GSON = GsonComponentSerializer.builder()
|
||||
public static final GsonComponentSerializer GSON = GsonComponentSerializer.builder()
|
||||
.legacyHoverEventSerializer(NBTLegacyHoverEventSerializer.INSTANCE)
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemSpawner.java b/src/main/java/net/minecraft/server/ItemSpawner.java
|
||||
new file mode 100644
|
@ -5,7 +5,7 @@ Subject: [PATCH] Giants AI settings
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index c6b4af810fe3bda7797ab94316b2357178c9cd49..b7c72eaf5715a30bb8f82891f9830f9f62ec03c9 100644
|
||||
index 99c93d48726b4b92a341ba98721173df8b4ff30a..b0cfd7e2be03222e3e34791e5bf6fb77a5d91c5a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -228,7 +228,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@ -18,10 +18,10 @@ index c6b4af810fe3bda7797ab94316b2357178c9cd49..b7c72eaf5715a30bb8f82891f9830f9f
|
||||
public float I;
|
||||
protected final Random random;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
|
||||
index f4440a5c4aedb1d7d303517f86a07c856dd1309b..7443fe924486404931c11793acc67e2f03de4e41 100644
|
||||
index dc78bafeddf6b584181c818b90efa7ff531377a3..af04853ba114a80eb756c1700d27567fd8548e13 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
|
||||
@@ -1020,6 +1020,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@@ -1027,6 +1027,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
return f;
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ index f4440a5c4aedb1d7d303517f86a07c856dd1309b..7443fe924486404931c11793acc67e2f
|
||||
protected void a(DifficultyDamageScaler difficultydamagescaler) {
|
||||
if (this.random.nextFloat() < 0.15F * difficultydamagescaler.d()) {
|
||||
int i = this.random.nextInt(2);
|
||||
@@ -1127,6 +1128,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@@ -1134,6 +1135,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 2777bd3ea82b214fc15c5ce3ce47c90c1e5fe538..f5bc04059c24f57530653c8845cfe4daa5fed843 100644
|
||||
index 6d4f844c68ce48b942280fc5f3a54af89b31c093..8feb1526a3cd5e9cdd2ce731a7701527180e157d 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 {
|
||||
@ -58,7 +58,7 @@ index 2777bd3ea82b214fc15c5ce3ce47c90c1e5fe538..f5bc04059c24f57530653c8845cfe4da
|
||||
public BehaviorController<?> getBehaviorController() {
|
||||
return this.bg;
|
||||
}
|
||||
@@ -2276,7 +2279,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2289,7 +2292,7 @@ public abstract class EntityLiving extends Entity {
|
||||
this.enderTeleportTo(vec3d.x, vec3d.y, vec3d.z);
|
||||
}
|
||||
|
@ -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 18d70aff974d756a62a8f9f0e6c52f89ef1fa2c8..c49b049351c36878238e65eb9cbf949a682e4a7d 100644
|
||||
index e37c7d925afb5043e6008488f7f773ba2466ee55..bfa316114f75923f3653254007afc74ddd49f441 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;
|
||||
@ -16,7 +16,7 @@ index 18d70aff974d756a62a8f9f0e6c52f89ef1fa2c8..c49b049351c36878238e65eb9cbf949a
|
||||
import net.minecraft.world.entity.animal.horse.EntityHorseSkeleton;
|
||||
import net.minecraft.world.entity.boss.EntityComplexPart;
|
||||
import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon;
|
||||
@@ -1222,12 +1223,18 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1221,12 +1222,18 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
boolean flag1 = this.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.b() * paperConfig.skeleHorseSpawnChance; // Paper
|
||||
|
||||
if (flag1) {
|
@ -26,10 +26,10 @@ index 0eed10a6c4e0c7245f219d19ed1e2e5c94364db9..2b54a5f3347f788b751892105f888663
|
||||
protected boolean h;
|
||||
protected boolean i;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
|
||||
index 37e64e24ca3a90370cdf12e5ff9cd1fceede796b..f63ec5fa5a1cb34f4809a06a29d01603efb178f1 100644
|
||||
index 67ca28463f5add7c18f7f16b918c3f36f8feeeda..53e773c14689967d5b12467bf209eefb05f7a812 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
|
||||
@@ -208,6 +208,7 @@ public class EntityTrackerEntry {
|
||||
@@ -200,6 +200,7 @@ public class EntityTrackerEntry {
|
||||
this.o = 0;
|
||||
packet1 = new PacketPlayOutEntityTeleport(this.tracker);
|
||||
}
|
||||
@ -37,7 +37,7 @@ index 37e64e24ca3a90370cdf12e5ff9cd1fceede796b..f63ec5fa5a1cb34f4809a06a29d01603
|
||||
}
|
||||
|
||||
if ((this.e || this.tracker.impulse || this.tracker instanceof EntityLiving && ((EntityLiving) this.tracker).isGliding()) && this.tickCounter > 0) {
|
||||
@@ -301,6 +302,22 @@ public class EntityTrackerEntry {
|
||||
@@ -286,6 +287,22 @@ public class EntityTrackerEntry {
|
||||
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Cows eat mushrooms
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index b7c72eaf5715a30bb8f82891f9830f9f62ec03c9..c8071e2909c03bd8eafb92fbf8fd8701642df1f9 100644
|
||||
index b0cfd7e2be03222e3e34791e5bf6fb77a5d91c5a..690685ac224a8b63a022d0801e3e4adb9416cc39 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2886,6 +2886,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2917,6 +2917,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
this.invulnerable = flag;
|
||||
}
|
||||
|
||||
@ -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 f5bc04059c24f57530653c8845cfe4daa5fed843..5cdefe2a1b4085e3aae7dbbb751cfd368593ebd7 100644
|
||||
index 8feb1526a3cd5e9cdd2ce731a7701527180e157d..d419d71af42c361d30aab12e4d245358667f857b 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 {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Signs allow color codes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
index e875671ce985199bc37de131280935a859253954..ba71636527f173dfc5ddae9ef0f7c73d0423d9b3 100644
|
||||
index 6e3a3a50e01c41b40451bce05015714b5a7fe1e3..43900bb788f4baef420de0782c77d74dd7310f6e 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
@@ -1579,6 +1579,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@ -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 1e7ae4a3947f2714159a6b93ef7d79541a6e070d..d2896d49b4b3cb0a6cf64ee29233ff59b8fba45d 100644
|
||||
index f5ada346a11ac3becda4b87416beebd680ca16fa..4f094f026b118775cae84024b2ba6c33e14784e6 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
@@ -3072,6 +3072,15 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -3073,6 +3073,15 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
}
|
||||
// Paper end
|
@ -30,7 +30,7 @@ index 8edc279e7a3fdfb7e10718f1deee34b7e3fb2f28..a01b69c43acf4beb65c8b7a8a800c441
|
||||
super(i, j, k);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
index ba71636527f173dfc5ddae9ef0f7c73d0423d9b3..c2e987808ae5ccb23cc7bcc5221faea11153bc7f 100644
|
||||
index 43900bb788f4baef420de0782c77d74dd7310f6e..610ab97ab5322df04b8163b806104490360030f8 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
@@ -106,6 +106,7 @@ import net.minecraft.world.entity.monster.EntityMonster;
|
||||
@ -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 5cdefe2a1b4085e3aae7dbbb751cfd368593ebd7..f1781c2100bf3a8fa7123b66f9ab682177d6490e 100644
|
||||
index d419d71af42c361d30aab12e4d245358667f857b..bb227e7dfb1e91a7f5dcc4c7498387033b98df0f 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 {
|
@ -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 f1781c2100bf3a8fa7123b66f9ab682177d6490e..906791fc6180e011ce029ac95a63c92553f0377e 100644
|
||||
index bb227e7dfb1e91a7f5dcc4c7498387033b98df0f..e31538338e02fdb6e859c37bed899e5f3a83d5ae 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 {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Players should not cram to death
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
index c2e987808ae5ccb23cc7bcc5221faea11153bc7f..97f82ac9fb8f91aea11660ad6d7284faed8e9434 100644
|
||||
index 610ab97ab5322df04b8163b806104490360030f8..5daf1f0f3371a1375daa829bcd4c447194e5f3e0 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
@@ -1557,7 +1557,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix the dead lagging the server
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index c8071e2909c03bd8eafb92fbf8fd8701642df1f9..7c9fc120d2b58ca969b8a0ff9619e96f4f34b1c4 100644
|
||||
index 690685ac224a8b63a022d0801e3e4adb9416cc39..56d7662ccc2181df298f37a043f7af4036fe6125 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1631,6 +1631,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -1662,6 +1662,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
this.pitch = MathHelper.a(f1, -90.0F, 90.0F) % 360.0F;
|
||||
this.lastYaw = this.yaw;
|
||||
this.lastPitch = this.pitch;
|
||||
@ -17,10 +17,10 @@ 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 906791fc6180e011ce029ac95a63c92553f0377e..6fb4b06df010c3099a1af3b145749ea439a4aa39 100644
|
||||
index e31538338e02fdb6e859c37bed899e5f3a83d5ae..af08ec27f8c07653daa328d84bfc142bfc8a7f78 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 {
|
||||
@@ -2610,7 +2610,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add permission for F3+N debug
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index a285d0594e61190a751a96f22afeb12d2dcce3fe..3a46a673349de9d9d725516a0fcdb3ebb9b372b3 100644
|
||||
index 9360d35581c6961a768973cc31341381ee26e234..c742647c0c5e3e4925e4ee6d195a54a85435e65e 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1166,6 +1166,7 @@ public abstract class PlayerList {
|
||||
@@ -1168,6 +1168,7 @@ public abstract class PlayerList {
|
||||
} else {
|
||||
b0 = (byte) (24 + i);
|
||||
}
|
@ -5,7 +5,7 @@ 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 a75a8322829f36045243d5fd61d28b126af1f0af..ab2424a868a3d29af96f36ce037f1ab9b9b2a635 100644
|
||||
index c086f50613cc3b1061c9958eb2a8aba059a61e29..dccff89fcacdafe4961cd3121eb38ff8844e10da 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1132,7 +1132,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
@ -5,7 +5,7 @@ Subject: [PATCH] Entities pick up loot bypass mob-griefing gamerule
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
|
||||
index 7443fe924486404931c11793acc67e2f03de4e41..d8a627ed1fad1fca37d8f8a3a344b80a60fc5e2f 100644
|
||||
index af04853ba114a80eb756c1700d27567fd8548e13..92d8c5e716678862deadd7755db8e9270daafeda 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
|
||||
@@ -614,7 +614,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Allow leashing villagers
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
|
||||
index d8a627ed1fad1fca37d8f8a3a344b80a60fc5e2f..1a1561ab4276bd3654adc2cc2219f3bdb3924b88 100644
|
||||
index 92d8c5e716678862deadd7755db8e9270daafeda..4b4578e02fd4be72f20458c54a878892e3029d56 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
|
||||
@@ -49,6 +49,7 @@ import net.minecraft.world.entity.item.EntityItem;
|
||||
@ -16,7 +16,7 @@ index d8a627ed1fad1fca37d8f8a3a344b80a60fc5e2f..1a1561ab4276bd3654adc2cc2219f3bd
|
||||
import net.minecraft.world.entity.player.EntityHuman;
|
||||
import net.minecraft.world.entity.vehicle.EntityBoat;
|
||||
import net.minecraft.world.item.Item;
|
||||
@@ -1217,6 +1218,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@@ -1224,6 +1225,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
if (!this.isAlive()) {
|
||||
return EnumInteractionResult.PASS;
|
||||
} else if (this.getLeashHolder() == entityhuman) {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user