mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes : 2db85c5 fix: origin world can be unknown while knowing location 903fa9a Enable chunk load for feature search by default
49 lines
3.1 KiB
Diff
49 lines
3.1 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/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
index 618f8735fe16f0490a321c447536c2558fcb67e3..45995a49dc7d441e82c1fbd043bf6249c16843bb 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -2560,7 +2560,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
|
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();
|
|
}
|
|
@@ -3141,7 +3141,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
|
}
|
|
|
|
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 9fcc63a2f4a4c363ace85087665bf3a978d3d648..55366240f249c05cf3d40eaf29f2cd21cd86cd07 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -202,6 +202,7 @@ public class PurpurWorldConfig {
|
|
public boolean boatEjectPlayersOnLand = false;
|
|
public boolean disableDropsOnCrammingDeath = false;
|
|
public boolean entitiesPickUpLootBypassMobGriefing = false;
|
|
+ public boolean entitiesCanUsePortals = true;
|
|
public boolean milkCuresBadOmen = true;
|
|
public double tridentLoyaltyVoidReturnHeight = 0.0D;
|
|
public double voidDamageHeight = -64.0D;
|
|
@@ -211,6 +212,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);
|
|
milkCuresBadOmen = getBoolean("gameplay-mechanics.milk-cures-bad-omen", milkCuresBadOmen);
|
|
tridentLoyaltyVoidReturnHeight = getDouble("gameplay-mechanics.trident-loyalty-void-return-height", tridentLoyaltyVoidReturnHeight);
|
|
voidDamageHeight = getDouble("gameplay-mechanics.void-damage-height", voidDamageHeight);
|