mirror of
https://github.com/SparklyPower/SparklyPaper.git
synced 2025-12-19 15:09:27 +00:00
Disable Nether and End portals for non-player entities
We don't need portals for them on SparklyPower Fixes #9
This commit is contained in:
@@ -74,10 +74,6 @@ Off-main thread throws can be disabled with `-Dsparklypaper.disableHardThrow=tru
|
|||||||
|
|
||||||
In fact, disabling throws is not an easy way out: Yes, you avoid some functions borking out. But, if the tick thread check has failed, your server is probably going to crash anyway. Example: If a plugin is attempting to teleport a player to world X while they are in a TickThread of world Y, the server will lock up because loading chunks outside of the world's tick thread or from an async thread is not allowed but if you had kept hard throws enabled, your server wouldn't have crashed because the request would've been denied! Fix the dang issues instead!!!
|
In fact, disabling throws is not an easy way out: Yes, you avoid some functions borking out. But, if the tick thread check has failed, your server is probably going to crash anyway. Example: If a plugin is attempting to teleport a player to world X while they are in a TickThread of world Y, the server will lock up because loading chunks outside of the world's tick thread or from an async thread is not allowed but if you had kept hard throws enabled, your server wouldn't have crashed because the request would've been denied! Fix the dang issues instead!!!
|
||||||
|
|
||||||
## Timings
|
|
||||||
|
|
||||||
Parallel World Ticking does not work with Aikar's Timings because Timings wasn't really meant for asynchronous stuff, so the Timings stack becomes corrupted when the worlds are ticked and the server crashes, please use Spark instead!
|
|
||||||
|
|
||||||
## Profiling with Spark
|
## Profiling with Spark
|
||||||
|
|
||||||
By default, Spark will profile the `Server thread` thread, which ain't good for us if we want to profile what is being used in our worlds.
|
By default, Spark will profile the `Server thread` thread, which ain't good for us if we want to profile what is being used in our worlds.
|
||||||
@@ -98,10 +94,14 @@ I'm not even sure why this question is even here considering that the only real
|
|||||||
|
|
||||||
But you can build, or download SparklyPaper builds, without the parallel world ticking added!
|
But you can build, or download SparklyPaper builds, without the parallel world ticking added!
|
||||||
|
|
||||||
## Plugin Incompatibilities
|
## Disabled Features and Plugin Incompatibilities
|
||||||
|
|
||||||
[Here's a list of plugins that have issues with parallel world ticking](PARALLEL_INCOMPATIBLE_PLUGINS.md)
|
[Here's a list of plugins that have issues with parallel world ticking](PARALLEL_INCOMPATIBLE_PLUGINS.md)
|
||||||
|
|
||||||
|
### Disabled/Broken Features
|
||||||
|
* Parallel World Ticking does not work with Aikar's Timings because Timings wasn't really meant for asynchronous stuff, so the Timings stack becomes corrupted when the worlds are ticked and the server crashes, please use Spark instead!
|
||||||
|
* Non-player entities cannot cross a Nether/End Portal.
|
||||||
|
|
||||||
## Implementation Notes
|
## Implementation Notes
|
||||||
|
|
||||||
If you are curious about things that I've learned while making this, I wrote [some notes about why some things were implemented the way that they are](PARALLEL_NOTES.md).
|
If you are curious about things that I've learned while making this, I wrote [some notes about why some things were implemented the way that they are](PARALLEL_NOTES.md).
|
||||||
|
|||||||
@@ -1087,9 +1087,18 @@ index a35638a92479b90afa89cf201fc45b49c9e767f3..b842dc3d286a98d40267bac141749c4a
|
|||||||
|
|
||||||
entityplayer1.connection = entityplayer.connection;
|
entityplayer1.connection = entityplayer.connection;
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index aa6045039450c4cce8d9481aa7f56867dd15c0fa..36f9d4bf2d98ada1912ffcbc9a36cb3d1ca35c13 100644
|
index aa6045039450c4cce8d9481aa7f56867dd15c0fa..807a11fa10b1aeb46c9e4e47b9477a5f15d86149 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
|
@@ -808,7 +808,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
|
// CraftBukkit start
|
||||||
|
public void postTick() {
|
||||||
|
// No clean way to break out of ticking once the entity has been copied to a new world, so instead we move the portalling later in the tick cycle
|
||||||
|
- if (!(this instanceof ServerPlayer) && this.isAlive()) { // Paper - don't attempt to teleport dead entities
|
||||||
|
+ if (false && !(this instanceof ServerPlayer) && this.isAlive()) { // Paper - don't attempt to teleport dead entities // SparklyPaper - parallel world ticking (see issue #9, this is executed in the server level tick for non-player entities)
|
||||||
|
this.handleNetherPortal();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -938,11 +938,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -938,11 +938,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
// This will be called every single tick the entity is in lava, so don't throw an event
|
// This will be called every single tick the entity is in lava, so don't throw an event
|
||||||
this.setSecondsOnFire(15, false);
|
this.setSecondsOnFire(15, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user