mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 23:10:16 +01:00
Update upstream
This commit is contained in:
parent
585b724740
commit
9fcb513a2e
5 changed files with 19 additions and 82 deletions
|
@ -1 +1 @@
|
|||
Subproject commit f92e01ba5cf46c123d0cd38b29321c78706257e0
|
||||
Subproject commit f01861f80bc8d903f72210e7d79c90c35473aa74
|
2
Spigot
2
Spigot
|
@ -1 +1 @@
|
|||
Subproject commit 1480adb82751e38cca5bcc75202ece68277b0113
|
||||
Subproject commit a1b8bf3530b3f83fbd94cc8624d05426b0d9de5f
|
|
@ -4,6 +4,23 @@ Date: Thu, 3 Mar 2016 02:39:54 -0600
|
|||
Subject: [PATCH] Change implementation of (tile)entity removal list
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
|
||||
private static final DataWatcherObject<Boolean> aA = DataWatcher.a(Entity.class, DataWatcherRegistry.h);
|
||||
private static final DataWatcherObject<Boolean> aB = DataWatcher.a(Entity.class, DataWatcherRegistry.h);
|
||||
public boolean aa;
|
||||
- public int ab;
|
||||
- public int ac;
|
||||
- public int ad;
|
||||
+ public int ab;public int getChunkX() { return ab; } // Paper
|
||||
+ public int ac;public int getChunkY() { return ac; } // Paper
|
||||
+ public int ad;public int getChunkZ() { return ad; } // Paper
|
||||
public boolean ah;
|
||||
public boolean impulse;
|
||||
public int portalCooldown;
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 3 Mar 2016 00:07:23 -0600
|
||||
Subject: [PATCH] EAR: Fix bug with teleporting entities
|
||||
|
||||
[17:53:15] <Aikar> had a reproduceable issue of losing entities on teleport, now resolved
|
||||
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/spigot/pull-requests/52/overview
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
|
||||
private static final DataWatcherObject<Boolean> aA = DataWatcher.a(Entity.class, DataWatcherRegistry.h);
|
||||
private static final DataWatcherObject<Boolean> aB = DataWatcher.a(Entity.class, DataWatcherRegistry.h);
|
||||
public boolean aa;
|
||||
- public int ab;
|
||||
- public int ac;
|
||||
- public int ad;
|
||||
+ // Paper start - EAR: Fix bug with teleporting entities
|
||||
+ public boolean isAddedToChunk() {
|
||||
+ int chunkX = MathHelper.floor(locX / 16.0D);
|
||||
+ int chunkY = MathHelper.floor(locY / 16.0D);
|
||||
+ int chunkZ = MathHelper.floor(locZ / 16.0D);
|
||||
+ return aa && getChunkX() == chunkX && getChunkY() == chunkY || getChunkZ() == chunkZ;
|
||||
+ }
|
||||
+ public int ab; public int getChunkX() { return ab; }
|
||||
+ public int ac; public int getChunkY() { return ac; }
|
||||
+ public int ad; public int getChunkZ() { return ad; }
|
||||
+ // Paper end
|
||||
public boolean ah;
|
||||
public boolean impulse;
|
||||
public int portalCooldown;
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
byte b0 = 32;
|
||||
|
||||
// Spigot start
|
||||
- if (!org.spigotmc.ActivationRange.checkIfActive(entity)) {
|
||||
+ if (flag && !org.spigotmc.ActivationRange.checkIfActive(entity)) {
|
||||
entity.ticksLived++;
|
||||
entity.inactiveTick();
|
||||
} else {
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -0,0 +0,0 @@ public class ActivationRange
|
||||
{
|
||||
// Never safe to skip fireworks or entities not yet added to chunk
|
||||
// PAIL: inChunk
|
||||
- if ( !entity.aa || entity instanceof EntityFireworks ) {
|
||||
+ if ( !entity.isAddedToChunk() || entity instanceof EntityFireworks ) { // Paper - EAR: Fix bug with teleporting entities
|
||||
return true;
|
||||
}
|
||||
|
||||
--
|
|
@ -1,20 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 3 Mar 2016 00:12:23 -0600
|
||||
Subject: [PATCH] Process Entity Chunk Registration on Teleport
|
||||
|
||||
Fixes many issues with entities not being properly "switched" to their new chunk on teleport
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
// entity.world = ((CraftWorld) location.getWorld()).getHandle();
|
||||
// Spigot end
|
||||
entity.setLocation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||
+ entity.world.entityJoinedWorld(entity, false); // Paper - Fix issues with entities not being switched to their new chunk
|
||||
// entity.setLocation() throws no event, and so cannot be cancelled
|
||||
return true;
|
||||
}
|
||||
--
|
Loading…
Reference in a new issue