Files
Purpur/patches/server/0121-Entities-can-use-portals-configuration.patch
William Blake Galbreath 67be68c780 Updated Upstream (Tuinity)
Upstream has released updates that appears to apply and compile correctly

Tuinity Changes:
3b008f5 Optimisations
200f825 Actually unload POI data
db64f14 Make sure to despawn entities if they are outside the player general
89276ac Fix villagers aggressively looking at people
8830cef Remove streams for poi searching in some zombie pathfinding
a17dc2c Attempt to fix incorrect nearest village distance tracker updating
ef8cd34 Fix NPE
3e45700Do not return complex parts for entity by class lookup
2110847 Rewrite getClosestEntity
460581d Fix getClosestEntity not working
2cb36ca Optimise non-flush packet sending
784b838 Some fixes
e2dcdd1 Correct return value for ChunkCache#getCubes
968512b Add Velocity natives for encryption and compression (#188)
102d60b Rebuild patches
57fed71 Fix decompression with Velocity natives
442890b Fix decompression with Velocity natives (#191)
0179ea8 Re-Add region manager and notify patch
cbffdcc Do not mark entities in unloaded chunks as being in blocks
f2eef4a Fixup dev branch patches and store reverted patches in revert folder
2020-11-05 18:14:13 -06:00

49 lines
3.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Mon, 17 Aug 2020 19:32:05 -0500
Subject: [PATCH] Entities can use portals configuration
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 22009f8cdf..88f525f43b 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2419,7 +2419,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
public void d(BlockPosition blockposition) {
if (this.ai()) {
this.resetPortalCooldown();
- } else {
+ } else if (world.purpurConfig.entitiesCanUsePortals || this instanceof EntityPlayer) { // Purpur
if (!this.world.isClientSide && !blockposition.equals(this.ac)) {
this.ac = blockposition.immutableCopy();
}
@@ -2992,7 +2992,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
public boolean canPortal() {
- return isAlive() && valid; // Paper
+ return isAlive() && valid && (world.purpurConfig.entitiesCanUsePortals || this instanceof EntityPlayer); // Paper // Purpur
}
public float a(Explosion explosion, IBlockAccess iblockaccess, BlockPosition blockposition, IBlockData iblockdata, Fluid fluid, float f) {
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 1a606b426b..f80f115690 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -140,6 +140,7 @@ public class PurpurWorldConfig {
public boolean boatEjectPlayersOnLand = false;
public boolean disableDropsOnCrammingDeath = false;
public boolean entitiesPickUpLootBypassMobGriefing = false;
+ public boolean entitiesCanUsePortals = true;
public boolean fixClimbingBypassingCrammingRule = false;
public boolean milkCuresBadOmen = true;
public boolean saveProjectilesToDisk = true;
@@ -150,6 +151,7 @@ public class PurpurWorldConfig {
boatEjectPlayersOnLand = getBoolean("gameplay-mechanics.boat.eject-players-on-land", boatEjectPlayersOnLand);
disableDropsOnCrammingDeath = getBoolean("gameplay-mechanics.disable-drops-on-cramming-death", disableDropsOnCrammingDeath);
entitiesPickUpLootBypassMobGriefing = getBoolean("gameplay-mechanics.entities-pick-up-loot-bypass-mob-griefing", entitiesPickUpLootBypassMobGriefing);
+ entitiesCanUsePortals = getBoolean("gameplay-mechanics.entities-can-use-portals", entitiesCanUsePortals);
fixClimbingBypassingCrammingRule = getBoolean("gameplay-mechanics.fix-climbing-bypassing-cramming-rule", fixClimbingBypassingCrammingRule);
milkCuresBadOmen = getBoolean("gameplay-mechanics.milk-cures-bad-omen", milkCuresBadOmen);
saveProjectilesToDisk = getBoolean("gameplay-mechanics.save-projectiles-to-disk", saveProjectilesToDisk);