mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: b8020379c Extract Adventure Version into a variable, add reminder to update the linked JD on the homepage (#5422) Airplane Changes: f5fb02447 Temporarily revert patch 3c728a7a9 Oops, these 2 too 37a93e561 Your daily dose of 1-3% optimization patches bbd689a77 Remove useless check
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 4e1363050bef7fff9117250b79cbf35bf6bfc537..918edab475a8d33a253e3d6cd3c5655748d10dc0 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -2554,7 +2554,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();
|
|
}
|
|
@@ -3134,7 +3134,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 19e79cd7ec2c624963affa8587b40d6fc50d0f05..66074748c6fd366caf58170de478a01d3adb1430 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -158,6 +158,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;
|
|
@@ -166,6 +167,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);
|