Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
Always try to load entity origin location from new NBT tag
Dieser Commit ist enthalten in:
Ursprung
ced183982a
Commit
5bd7a9ab62
@ -1,11 +1,11 @@
|
|||||||
From bfa2721aa0e6c9406977d18b648f2eae3d082109 Mon Sep 17 00:00:00 2001
|
From 81278a4d41700b713cb97c818585210855c54d41 Mon Sep 17 00:00:00 2001
|
||||||
From: Byteflux <byte@byteflux.net>
|
From: Byteflux <byte@byteflux.net>
|
||||||
Date: Tue, 1 Mar 2016 23:45:08 -0600
|
Date: Tue, 1 Mar 2016 23:45:08 -0600
|
||||||
Subject: [PATCH] Entity Origin API
|
Subject: [PATCH] Entity Origin API
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index f4b9481..eaaca75 100644
|
index f4b9481..cf1278d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -142,6 +142,7 @@ public abstract class Entity implements ICommandListener {
|
@@ -142,6 +142,7 @@ public abstract class Entity implements ICommandListener {
|
||||||
@ -28,17 +28,15 @@ index f4b9481..eaaca75 100644
|
|||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
|
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
|
||||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being saved");
|
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being saved");
|
||||||
@@ -1480,6 +1486,15 @@ public abstract class Entity implements ICommandListener {
|
@@ -1480,6 +1486,13 @@ public abstract class Entity implements ICommandListener {
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
+ // Paper start - Restore the entity's origin location
|
+ // Paper start - Restore the entity's origin location
|
||||||
+ if (origin == null) {
|
|
||||||
+ NBTTagList originTag = nbttagcompound.getList("Paper.Origin", 6);
|
+ NBTTagList originTag = nbttagcompound.getList("Paper.Origin", 6);
|
||||||
+ if (!originTag.isEmpty()) {
|
+ if (!originTag.isEmpty()) {
|
||||||
+ origin = new Location(world.getWorld(), originTag.e(0), originTag.e(1), originTag.e(2));
|
+ origin = new Location(world.getWorld(), originTag.e(0), originTag.e(1), originTag.e(2));
|
||||||
+ }
|
+ }
|
||||||
+ }
|
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From 5287c52a14a27be99d61b5744b4738fd0c443c69 Mon Sep 17 00:00:00 2001
|
From d0210b26c5be480045aca3b84d89b62f6797e372 Mon Sep 17 00:00:00 2001
|
||||||
From: Nik Gil <nikmanG@users.noreply.github.com>
|
From: Nik Gil <nikmanG@users.noreply.github.com>
|
||||||
Date: Thu, 3 Mar 2016 04:04:19 -0600
|
Date: Thu, 3 Mar 2016 04:04:19 -0600
|
||||||
Subject: [PATCH] Made EntityDismountEvent Cancellable
|
Subject: [PATCH] Made EntityDismountEvent Cancellable
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 446c0aa..8d4e4f5 100644
|
index 919766c..730d864 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -38,6 +38,7 @@ import org.bukkit.craftbukkit.event.CraftEventFactory;
|
@@ -38,6 +38,7 @@ import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||||
@ -16,7 +16,7 @@ index 446c0aa..8d4e4f5 100644
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
public abstract class Entity implements ICommandListener {
|
public abstract class Entity implements ICommandListener {
|
||||||
@@ -1752,6 +1753,11 @@ public abstract class Entity implements ICommandListener {
|
@@ -1750,6 +1751,11 @@ public abstract class Entity implements ICommandListener {
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
Bukkit.getPluginManager().callEvent( new org.spigotmc.event.entity.EntityDismountEvent(entity.getBukkitEntity(), this.getBukkitEntity())); // Spigot
|
Bukkit.getPluginManager().callEvent( new org.spigotmc.event.entity.EntityDismountEvent(entity.getBukkitEntity(), this.getBukkitEntity())); // Spigot
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From dd87711174327d19cb459835683ab0d47efbd768 Mon Sep 17 00:00:00 2001
|
From 50052b1803ecfffb6f06b08868fb2346c0a760d4 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Tue, 8 Mar 2016 23:25:45 -0500
|
Date: Tue, 8 Mar 2016 23:25:45 -0500
|
||||||
Subject: [PATCH] Disable Scoreboards for non players by default
|
Subject: [PATCH] Disable Scoreboards for non players by default
|
||||||
@ -37,10 +37,10 @@ index 871535c..25950bd 100644
|
|||||||
|
|
||||||
if (scoreboard.addPlayerToTeam(s2, s)) {
|
if (scoreboard.addPlayerToTeam(s2, s)) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 8d4e4f5..55fe96b 100644
|
index 730d864..b23c399 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -1861,6 +1861,7 @@ public abstract class Entity implements ICommandListener {
|
@@ -1859,6 +1859,7 @@ public abstract class Entity implements ICommandListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ScoreboardTeamBase aO() {
|
public ScoreboardTeamBase aO() {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 2d7c10790e8d85fa5a372613eca4f0fd633190cb Mon Sep 17 00:00:00 2001
|
From 286f4b6ccc65850b0a080340007de097d68e55c5 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Tue, 22 Mar 2016 00:55:23 -0400
|
Date: Tue, 22 Mar 2016 00:55:23 -0400
|
||||||
Subject: [PATCH] Don't teleport dead entities
|
Subject: [PATCH] Don't teleport dead entities
|
||||||
@ -7,10 +7,10 @@ Had some issue with this in past, and this is the vanilla logic.
|
|||||||
Potentially an old CB change that's no longer needed.
|
Potentially an old CB change that's no longer needed.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index bf8e194..5a6ad50 100644
|
index a5494fb..b698e79 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -2111,7 +2111,7 @@ public abstract class Entity implements ICommandListener {
|
@@ -2109,7 +2109,7 @@ public abstract class Entity implements ICommandListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Entity teleportTo(Location exit, boolean portal) {
|
public Entity teleportTo(Location exit, boolean portal) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren