2016-03-21 06:53:32 +01:00
|
|
|
From 47e641803ce55b26359768995f0790e66d013109 Mon Sep 17 00:00:00 2001
|
2016-03-21 04:38:31 +01:00
|
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
|
|
Date: Sun, 20 Mar 2016 19:40:51 -0500
|
|
|
|
Subject: [PATCH] Only mark player as invulnerable if they're changing worlds
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
2016-03-21 06:53:32 +01:00
|
|
|
index 3902d4f..efb88ef 100644
|
2016-03-21 04:38:31 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
|
|
@@ -48,7 +48,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
|
|
private boolean cg = true;
|
|
|
|
private long ch = System.currentTimeMillis();
|
|
|
|
private Entity ci = null;
|
|
|
|
- private boolean cj;
|
2016-03-21 06:53:32 +01:00
|
|
|
+ protected boolean cj; // Paper - private -> protected
|
2016-03-21 04:38:31 +01:00
|
|
|
private int containerCounter;
|
|
|
|
public boolean f;
|
|
|
|
public int ping;
|
2016-03-21 05:15:37 +01:00
|
|
|
@@ -541,8 +541,9 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
2016-03-21 04:38:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public Entity c(int i) {
|
|
|
|
- this.cj = true;
|
2016-03-21 05:15:37 +01:00
|
|
|
+ //this.cj = true; // Moved down and into PlayerList#changeDimension
|
2016-03-21 04:38:31 +01:00
|
|
|
if (this.dimension == 1 && i == 1) {
|
2016-03-21 05:15:37 +01:00
|
|
|
+ this.cj = true; // Paper - Moved down
|
2016-03-21 04:38:31 +01:00
|
|
|
this.world.kill(this);
|
|
|
|
if (!this.viewingCredits) {
|
2016-03-21 05:15:37 +01:00
|
|
|
this.viewingCredits = true;
|
2016-03-21 04:38:31 +01:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
|
|
|
index 344abbb..c6bad9e 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
|
|
|
@@ -724,6 +724,7 @@ public abstract class PlayerList {
|
|
|
|
Location exit = null;
|
|
|
|
boolean useTravelAgent = false; // don't use agent for custom worlds or return from THE_END
|
|
|
|
if (exitWorld != null) {
|
|
|
|
+ entityplayer.cj = true; // Paper - Set teleport invulnerability only if they're actually changing worlds
|
|
|
|
if ((cause == TeleportCause.END_PORTAL) && (i == 0)) {
|
|
|
|
// THE_END -> NORMAL; use bed if available, otherwise default spawn
|
|
|
|
exit = ((org.bukkit.craftbukkit.entity.CraftPlayer) entityplayer.getBukkitEntity()).getBedSpawnLocation();
|
|
|
|
--
|
|
|
|
2.7.4.windows.1
|
|
|
|
|