mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 06:50:12 +01:00
Updated Upstream (CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
CraftBukkit Changes:
01334e7d
#616: Fix exception on entity portal teleport attempt
This commit is contained in:
parent
1d5bd44d13
commit
0f795c3e8a
15 changed files with 62 additions and 151 deletions
|
@ -1,4 +1,4 @@
|
|||
From 12feca284a4a8426cad2ba6fb721e7090cd5f875 Mon Sep 17 00:00:00 2001
|
||||
From 8436a8ff5cd80197bd581cd6aed2ae34a2c931f1 Mon Sep 17 00:00:00 2001
|
||||
From: Joseph Hirschfeld <joe@ibj.io>
|
||||
Date: Thu, 3 Mar 2016 02:46:17 -0600
|
||||
Subject: [PATCH] Add configurable portal search radius
|
||||
|
@ -19,18 +19,18 @@ index 62e793b71..5de4ec052 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 2ed5ff412..909f446c6 100644
|
||||
index 4fcba0c0d..6314c4a19 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -2533,7 +2533,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2574,7 +2574,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
||||
// CraftBukkit start - EntityPortalEvent
|
||||
// SPIGOT-5136 - don't fire event for CraftEntity.teleport
|
||||
- int searchRadius = 128;
|
||||
+ int searchRadius = world.paperConfig.portalSearchRadius; // Paper - use portal search radius as default
|
||||
if (location == null) {
|
||||
Location enter = this.getBukkitEntity().getLocation();
|
||||
Location exit = new Location(worldserver1.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
blockposition = new BlockPosition(d0, this.locY(), d1);
|
||||
// CraftBukkit start
|
||||
- EntityPortalEvent event = CraftEventFactory.callEntityPortalEvent(this, worldserver1, blockposition, 128);
|
||||
+ EntityPortalEvent event = CraftEventFactory.callEntityPortalEvent(this, worldserver1, blockposition, world.paperConfig.portalSearchRadius); // Paper - use portal search radius
|
||||
if (event == null) {
|
||||
return null;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java
|
||||
index 503e3016a..b5f224e3b 100644
|
||||
--- a/src/main/java/net/minecraft/server/PortalTravelAgent.java
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 8129212021aaf361247e997c0b9ad659beb9f485 Mon Sep 17 00:00:00 2001
|
||||
From bd999b0dfbea6de1fb638a8124eda2d17467d22a Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Sun, 22 May 2016 20:20:55 -0500
|
||||
Subject: [PATCH] Optional TNT doesn't move in water
|
||||
|
@ -32,10 +32,10 @@ index 277f7618e..1dbeb209e 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 68e3c7dad..5ccdb389a 100644
|
||||
index 5a168037f..d6da1efd4 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -2710,6 +2710,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2713,6 +2713,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
|
||||
public boolean bM() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 66d9b63f082a2229e6c51cc21cf50059758a0f7f Mon Sep 17 00:00:00 2001
|
||||
From f4f90c3939dfe084f8fba90b9dd98d69e9f4fe90 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaBlend <whizkid3000@hotmail.com>
|
||||
Date: Sun, 16 Oct 2016 23:19:30 -0700
|
||||
Subject: [PATCH] Add EntityZapEvent
|
||||
|
@ -39,10 +39,10 @@ index 1eca7f354..8b85956e5 100644
|
|||
entitywitch.prepare(this.world, this.world.getDamageScaler(new BlockPosition(entitywitch)), EnumMobSpawn.CONVERSION, (GroupDataEntity) null, (NBTTagCompound) null);
|
||||
entitywitch.setNoAI(this.isNoAI());
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index e192f5f93..4b5d5e518 100644
|
||||
index 72b8677f2..2d454a3c3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1044,6 +1044,14 @@ public class CraftEventFactory {
|
||||
@@ -1045,6 +1045,14 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From bd2d233c65f8d35946b2d592087eb0aaf0fc202b Mon Sep 17 00:00:00 2001
|
||||
From d4b92d6ee23a2e456ecb67ee44534d0925e2eed8 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaBlend <whizkid3000@hotmail.com>
|
||||
Date: Thu, 8 Sep 2016 08:48:33 -0700
|
||||
Subject: [PATCH] Add source to PlayerExpChangeEvent
|
||||
|
@ -18,7 +18,7 @@ index f72bb0c13..0447800d9 100644
|
|||
|
||||
this.die();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 4b5d5e518..e69d73c45 100644
|
||||
index 2d454a3c3..95973558e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -111,6 +111,7 @@ import org.bukkit.entity.ThrownPotion;
|
||||
|
@ -29,7 +29,7 @@ index 4b5d5e518..e69d73c45 100644
|
|||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.Event.Result;
|
||||
@@ -1003,6 +1004,17 @@ public class CraftEventFactory {
|
||||
@@ -1004,6 +1005,17 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 46b6f35ed25811c9b22312baad531d4df5ec30b6 Mon Sep 17 00:00:00 2001
|
||||
From 111caf6db3cfce479a88fde5a8e75b5dc1b609fb Mon Sep 17 00:00:00 2001
|
||||
From: Techcable <Techcable@outlook.com>
|
||||
Date: Fri, 16 Dec 2016 21:25:39 -0600
|
||||
Subject: [PATCH] Add ProjectileCollideEvent
|
||||
|
@ -93,10 +93,10 @@ index 2e4c9d426..724b78b5d 100644
|
|||
this.c(((MovingObjectPositionBlock) movingobjectposition).getBlockPosition());
|
||||
} else {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index e69d73c45..c1eb5a05c 100644
|
||||
index 95973558e..c45b7c15f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1148,6 +1148,16 @@ public class CraftEventFactory {
|
||||
@@ -1149,6 +1149,16 @@ public class CraftEventFactory {
|
||||
return CraftItemStack.asNMSCopy(bitem);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 4c8d1dea432f2871c2337c2277c58b32437ece12 Mon Sep 17 00:00:00 2001
|
||||
From 3e49edef5199b3d1b180dacd0e520504b7c14e4a Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 10 Nov 2017 23:03:12 -0500
|
||||
Subject: [PATCH] Option for maximum exp value when merging orbs
|
||||
|
@ -20,10 +20,10 @@ index c145e27cc..671587631 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index c1eb5a05c..b8e5c6322 100644
|
||||
index c45b7c15f..dbda8b35a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -541,16 +541,32 @@ public class CraftEventFactory {
|
||||
@@ -542,16 +542,32 @@ public class CraftEventFactory {
|
||||
EntityExperienceOrb xp = (EntityExperienceOrb) entity;
|
||||
double radius = world.spigotConfig.expMerge;
|
||||
if (radius > 0) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 0412767f0f442fe73bdd4047587935287d7e4775 Mon Sep 17 00:00:00 2001
|
||||
From 8d80975c58af1fe97df707e7589d5ba1bd055765 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 19 Dec 2017 22:57:26 -0500
|
||||
Subject: [PATCH] ExperienceOrbMergeEvent
|
||||
|
@ -8,10 +8,10 @@ Plugins can cancel this if they want to ensure experience orbs do not lose impor
|
|||
metadata such as spawn reason, or conditionally move data from source to target.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index b8e5c6322..060671a58 100644
|
||||
index dbda8b35a..f9b0f39f7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -551,7 +551,7 @@ public class CraftEventFactory {
|
||||
@@ -552,7 +552,7 @@ public class CraftEventFactory {
|
||||
if (e instanceof EntityExperienceOrb) {
|
||||
EntityExperienceOrb loopItem = (EntityExperienceOrb) e;
|
||||
// Paper start
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 409cd7991a57a60511223af2b56ed401d82ecb61 Mon Sep 17 00:00:00 2001
|
||||
From 99fb5247c638c50f256eb2f377ad094772308815 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 15 Jun 2013 19:51:17 -0400
|
||||
Subject: [PATCH] EntityShootBowEvent consumeArrow and getArrowItem API
|
||||
|
@ -72,7 +72,7 @@ index 608be9e70..011efc6f5 100644
|
|||
event.getProjectile().remove();
|
||||
return;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 060671a58..13598e3bb 100644
|
||||
index f9b0f39f7..caf277439 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -51,6 +51,7 @@ import net.minecraft.server.GeneratorAccess;
|
||||
|
@ -83,7 +83,7 @@ index 060671a58..13598e3bb 100644
|
|||
import net.minecraft.server.ItemActionContext;
|
||||
import net.minecraft.server.ItemStack;
|
||||
import net.minecraft.server.Items;
|
||||
@@ -469,16 +470,16 @@ public class CraftEventFactory {
|
||||
@@ -470,16 +471,16 @@ public class CraftEventFactory {
|
||||
/**
|
||||
* EntityShootBowEvent
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 8996cf4eb8f8e366f94047a5fdbf9f808fe2128c Mon Sep 17 00:00:00 2001
|
||||
From a9838a0c3ea9f5301368717247ba1d5fb5b32fce Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 3 Jul 2018 21:56:23 -0400
|
||||
Subject: [PATCH] InventoryCloseEvent Reason API
|
||||
|
@ -34,7 +34,7 @@ index ba3e6b882..2265b01e6 100644
|
|||
this.activeContainer = this.defaultContainer;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 0a1f82c10..9fd94b884 100644
|
||||
index 225721d1f..0ac63f0ba 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -362,7 +362,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
@ -168,10 +168,10 @@ index 78a328099..b93bafb3f 100644
|
|||
|
||||
// Check if the fromWorld and toWorld are the same.
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 13598e3bb..bb48d44ff 100644
|
||||
index caf277439..f931fa48b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1292,8 +1292,19 @@ public class CraftEventFactory {
|
||||
@@ -1293,8 +1293,19 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From afb3cf702e2707f26623277f245055f5a74269d0 Mon Sep 17 00:00:00 2001
|
||||
From 1b08c2466b0ea7593464c5d507c01381b8654d1f Mon Sep 17 00:00:00 2001
|
||||
From: Hugo Manrique <hugmanrique@gmail.com>
|
||||
Date: Mon, 23 Jul 2018 14:22:26 +0200
|
||||
Subject: [PATCH] Vanished players don't have rights
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 3458333c9..6ef5d2ebd 100644
|
||||
index 189542b91..c2ca16968 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -98,7 +98,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
@ -76,7 +76,7 @@ index 143be566c..08c83c62d 100644
|
|||
if (operatorboolean.apply(false, false)) {
|
||||
throw (IllegalArgumentException) SystemUtils.c(new IllegalArgumentException());
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index c6f41d8a6..1fbecceb9 100644
|
||||
index 6742c991f..b6d904007 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -164,6 +164,46 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
@ -127,10 +127,10 @@ index c6f41d8a6..1fbecceb9 100644
|
|||
public boolean p_() {
|
||||
return this.isClientSide;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index bb48d44ff..d74c9d811 100644
|
||||
index f931fa48b..317a5bf4e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1170,6 +1170,14 @@ public class CraftEventFactory {
|
||||
@@ -1171,6 +1171,14 @@ public class CraftEventFactory {
|
||||
Projectile projectile = (Projectile) entity.getBukkitEntity();
|
||||
org.bukkit.entity.Entity collided = position.getEntity().getBukkitEntity();
|
||||
com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = new com.destroystokyo.paper.event.entity.ProjectileCollideEvent(projectile, collided);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 8e6f723a6e95616af03b47a3f07b03c53bec7a98 Mon Sep 17 00:00:00 2001
|
||||
From c48283f43376bd7dc10346ad60921ba1261d3635 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Thu, 2 Aug 2018 08:44:35 -0500
|
||||
Subject: [PATCH] Add hand to bucket events
|
||||
|
@ -69,10 +69,10 @@ index aaed8c0ae..0ff92aea5 100644
|
|||
((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-4238: needed when looking through entity
|
||||
((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index d74c9d811..d329a0c1b 100644
|
||||
index 317a5bf4e..f006b441a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -372,6 +372,20 @@ public class CraftEventFactory {
|
||||
@@ -373,6 +373,20 @@ public class CraftEventFactory {
|
||||
}
|
||||
|
||||
private static PlayerEvent getPlayerBucketEvent(boolean isFilling, World world, EntityHuman who, BlockPosition changed, BlockPosition clicked, EnumDirection clickedFace, ItemStack itemstack, net.minecraft.server.Item item) {
|
||||
|
@ -93,7 +93,7 @@ index d74c9d811..d329a0c1b 100644
|
|||
Player player = (Player) who.getBukkitEntity();
|
||||
CraftItemStack itemInHand = CraftItemStack.asNewCraftStack(item);
|
||||
Material bucket = CraftMagicNumbers.getMaterial(itemstack.getItem());
|
||||
@@ -384,10 +398,10 @@ public class CraftEventFactory {
|
||||
@@ -385,10 +399,10 @@ public class CraftEventFactory {
|
||||
|
||||
PlayerEvent event;
|
||||
if (isFilling) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From de30a30993f67dfb0c363d55d94b145d22e5a292 Mon Sep 17 00:00:00 2001
|
||||
From 9a9f4264dd9cc4f0dd1d76bbf61b9aac6b3d5c64 Mon Sep 17 00:00:00 2001
|
||||
From: Phoenix616 <mail@moep.tv>
|
||||
Date: Tue, 21 Aug 2018 01:39:35 +0100
|
||||
Subject: [PATCH] Improve death events
|
||||
|
@ -15,7 +15,7 @@ items and experience which is otherwise only properly possible by using
|
|||
internal code.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/CombatTracker.java b/src/main/java/net/minecraft/server/CombatTracker.java
|
||||
index 6daa400d27..38fe29f8a2 100644
|
||||
index 6daa400d2..38fe29f8a 100644
|
||||
--- a/src/main/java/net/minecraft/server/CombatTracker.java
|
||||
+++ b/src/main/java/net/minecraft/server/CombatTracker.java
|
||||
@@ -175,6 +175,7 @@ public class CombatTracker {
|
||||
|
@ -27,7 +27,7 @@ index 6daa400d27..38fe29f8a2 100644
|
|||
int i = this.f ? 300 : 100;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 75343a4386..b03316bc8c 100644
|
||||
index d2d49ba47..f110e5241 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1503,6 +1503,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
@ -47,7 +47,7 @@ index 75343a4386..b03316bc8c 100644
|
|||
|
||||
protected void k(double d0, double d1, double d2) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
||||
index b51662ee99..e6032e3edc 100644
|
||||
index b51662ee9..e6032e3ed 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
||||
@@ -706,7 +706,8 @@ public class EntityArmorStand extends EntityLiving {
|
||||
|
@ -61,7 +61,7 @@ index b51662ee99..e6032e3edc 100644
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java
|
||||
index 97ffd93462..bd62ac3ed8 100644
|
||||
index 97ffd9346..bd62ac3ed 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFox.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFox.java
|
||||
@@ -571,15 +571,25 @@ public class EntityFox extends EntityAnimal {
|
||||
|
@ -94,7 +94,7 @@ index 97ffd93462..bd62ac3ed8 100644
|
|||
|
||||
public static boolean a(EntityFox entityfox, EntityLiving entityliving) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java
|
||||
index 80717ad9ac..53aac5bccd 100644
|
||||
index 80717ad9a..53aac5bcc 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java
|
||||
@@ -55,11 +55,19 @@ public abstract class EntityHorseChestedAbstract extends EntityHorseAbstract {
|
||||
|
@ -119,7 +119,7 @@ index 80717ad9ac..53aac5bccd 100644
|
|||
public void b(NBTTagCompound nbttagcompound) {
|
||||
super.b(nbttagcompound);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 1592a705f6..b59b39d418 100644
|
||||
index 1592a705f..b59b39d41 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -89,7 +89,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
@ -279,7 +279,7 @@ index 1592a705f6..b59b39d418 100644
|
|||
return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index ee28106859..9068aeeec8 100644
|
||||
index 0ac63f0ba..02a1b2029 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -75,6 +75,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
@ -330,7 +330,7 @@ index ee28106859..9068aeeec8 100644
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
index 90fdf89c81..b761a41dcd 100644
|
||||
index 90fdf89c8..b761a41dc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
@@ -821,6 +821,22 @@ public enum CraftSound {
|
||||
|
@ -357,7 +357,7 @@ index 90fdf89c81..b761a41dcd 100644
|
|||
this.minecraftKey = minecraftKey;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 4b45986257..d9440753f5 100644
|
||||
index 4b4598625..d9440753f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1709,7 +1709,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -378,10 +378,10 @@ index 4b45986257..d9440753f5 100644
|
|||
|
||||
public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index d329a0c1b1..c0fd2948e3 100644
|
||||
index f006b441a..39ce40bd5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -748,9 +748,16 @@ public class CraftEventFactory {
|
||||
@@ -749,9 +749,16 @@ public class CraftEventFactory {
|
||||
public static EntityDeathEvent callEntityDeathEvent(EntityLiving victim, List<org.bukkit.inventory.ItemStack> drops) {
|
||||
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
|
||||
EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward());
|
||||
|
@ -398,7 +398,7 @@ index d329a0c1b1..c0fd2948e3 100644
|
|||
victim.expToDrop = event.getDroppedExp();
|
||||
|
||||
for (org.bukkit.inventory.ItemStack stack : event.getDrops()) {
|
||||
@@ -766,8 +773,15 @@ public class CraftEventFactory {
|
||||
@@ -767,8 +774,15 @@ public class CraftEventFactory {
|
||||
CraftPlayer entity = victim.getBukkitEntity();
|
||||
PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage);
|
||||
event.setKeepInventory(keepInventory);
|
||||
|
@ -414,7 +414,7 @@ index d329a0c1b1..c0fd2948e3 100644
|
|||
|
||||
victim.keepLevel = event.getKeepLevel();
|
||||
victim.newLevel = event.getNewLevel();
|
||||
@@ -784,6 +798,31 @@ public class CraftEventFactory {
|
||||
@@ -785,6 +799,31 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 6c28f5412e55c6583fa0feea0fa218d2b488410c Mon Sep 17 00:00:00 2001
|
||||
From e47da6c1ee139716e719de3284d8f25e87ac494e Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 21 Jul 2018 14:27:34 -0400
|
||||
Subject: [PATCH] Duplicate UUID Resolve Option
|
||||
|
@ -93,10 +93,10 @@ index c7c600b80..64c327669 100644
|
|||
|
||||
int k = MathHelper.floor(entity.locY() / 16.0D);
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 88d7808b2..579ad1c43 100644
|
||||
index 464301a1f..85f16bdb8 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -2740,6 +2740,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2743,6 +2743,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1,89 +0,0 @@
|
|||
From 11b5d09894304d6fc730dadb581b06196c71d704 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Tue, 14 Jan 2020 09:12:55 +0000
|
||||
Subject: [PATCH] Fix entity teleportation exceptions
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 58e79df57..810a5edb6 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -2574,6 +2574,20 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
return teleportTo(dimensionmanager, null);
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ private EntityPortalEvent callEntityPortalEvent(WorldServer worldserver1, BlockPosition blockposition, int searchRadius) {
|
||||
+ Location enter = this.getBukkitEntity().getLocation();
|
||||
+ Location exit = new Location(worldserver1.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
+
|
||||
+ EntityPortalEvent event = new EntityPortalEvent(this.getBukkitEntity(), enter, exit, searchRadius);
|
||||
+ event.getEntity().getServer().getPluginManager().callEvent(event);
|
||||
+ if (event.isCancelled() || event.getTo() == null || event.getTo().getWorld() == null || !this.isAlive()) {
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ return event;
|
||||
+ }
|
||||
+ // paper end
|
||||
@Nullable
|
||||
public Entity teleportTo(DimensionManager dimensionmanager, BlockPosition location) {
|
||||
// CraftBukkit end
|
||||
@@ -2599,7 +2613,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
// CraftBukkit start - EntityPortalEvent
|
||||
// SPIGOT-5136 - don't fire event for CraftEntity.teleport
|
||||
int searchRadius = world.paperConfig.portalSearchRadius; // Paper - use portal search radius as default
|
||||
- if (location == null) {
|
||||
+ if (location == null) { /* // Paper - move up
|
||||
Location enter = this.getBukkitEntity().getLocation();
|
||||
Location exit = new Location(worldserver1.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
|
||||
@@ -2613,14 +2627,27 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
worldserver1 = ((CraftWorld) exit.getWorld()).getHandle();
|
||||
blockposition = new BlockPosition(exit.getX(), exit.getY(), exit.getZ());
|
||||
searchRadius = event.getSearchRadius();
|
||||
- }
|
||||
+ */} // Paper - move up
|
||||
// CraftBukkit end
|
||||
|
||||
if (blockposition == null) { // CraftBukkit
|
||||
+ ;
|
||||
if (dimensionmanager1.getType() == DimensionManager.THE_END && dimensionmanager == DimensionManager.OVERWORLD) { // CraftBukkit
|
||||
- blockposition = worldserver1.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING_NO_LEAVES, worldserver1.getSpawn());
|
||||
+ EntityPortalEvent portalEvent = callEntityPortalEvent(worldserver1, worldserver1.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING_NO_LEAVES, worldserver1.getSpawn()), 1); // Paper - EntityPortalEvent - hardcode 1, no search here
|
||||
+ // Paper start
|
||||
+ if (portalEvent == null) return null;
|
||||
+ Location exit = portalEvent.getTo();
|
||||
+ worldserver1 = ((CraftWorld) exit.getWorld()).getHandle();
|
||||
+ blockposition = new BlockPosition(exit.getX(), exit.getY(), exit.getZ());
|
||||
+ //Paper end
|
||||
} else if (dimensionmanager.getType() == DimensionManager.THE_END) { // CraftBukkit
|
||||
- blockposition = worldserver1.getDimensionSpawn();
|
||||
+ EntityPortalEvent portalEvent = callEntityPortalEvent(worldserver1, worldserver1.getDimensionSpawn(), 1); // Paper - EntityPortalEvent - hardcode 1, no search here
|
||||
+ // Paper start
|
||||
+ if (portalEvent == null) return null;
|
||||
+ Location exit = portalEvent.getTo();
|
||||
+ worldserver1 = ((CraftWorld) exit.getWorld()).getHandle();
|
||||
+ blockposition = new BlockPosition(exit.getX(), exit.getY(), exit.getZ());
|
||||
+ //Paper end
|
||||
} else {
|
||||
double d0 = this.locX();
|
||||
double d1 = this.locZ();
|
||||
@@ -2644,6 +2671,14 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
Vec3D vec3d1 = this.getPortalOffset();
|
||||
|
||||
blockposition = new BlockPosition(d0, this.locY(), d1);
|
||||
+ // Paper start - EntityPortalEvent
|
||||
+ EntityPortalEvent portalEvent = callEntityPortalEvent(worldserver1, blockposition, searchRadius);
|
||||
+ if (portalEvent == null) return null;
|
||||
+ Location exit = portalEvent.getTo();
|
||||
+ worldserver1 = ((CraftWorld) exit.getWorld()).getHandle();
|
||||
+ blockposition = new BlockPosition(exit.getX(), exit.getY(), exit.getZ());
|
||||
+ searchRadius = portalEvent.getSearchRadius();
|
||||
+ // Paper end
|
||||
ShapeDetector.Shape shapedetector_shape = worldserver1.getTravelAgent().findPortal(blockposition, vec3d, this.getPortalDirection(), vec3d1.x, vec3d1.y, this instanceof EntityHuman, searchRadius); // CraftBukkit - search radius
|
||||
|
||||
if (shapedetector_shape == null) {
|
||||
--
|
||||
2.24.1
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit e8cb2f513b316706aaf8dd47cfff39aad647dce2
|
||||
Subproject commit 01334e7dcba25af640f308c64078c32387349e57
|
Loading…
Reference in a new issue