mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 1c8b6065e Skip distance map update when spawning is disabled 091e6700f Added PlayerStonecutterRecipeSelectEvent fc885f966 Add toggle for always placing the dragon egg b3a6da3a7 Updated Upstream (Bukkit/CraftBukkit) 18ccc062d [Auto] Updated Upstream (Spigot) e9a87b72b fix BaseTag constructor (#5095)
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/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
index 0115e2c73eff9d5e4c6778e32fc54b9c116b6b22..e4f2e51b6306fcaf161b7dfb734d9d28947e964b 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -2414,7 +2414,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();
|
|
}
|
|
@@ -2994,7 +2994,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 b695a156ce4140e606e09360f0846a0b7318b183..50aa19fc54dab84e587bae45dee00ec984853666 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -146,6 +146,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;
|
|
@@ -154,6 +155,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);
|