Updated Upstream (CraftBukkit) (#5784)

Upstream has released updates that appear 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:
3797d93e3 SPIGOT-6492: PortalCreateEvent#getBlocks() returns not all blocks by reason fire
This commit is contained in:
Aurora 2021-06-07 13:47:53 +02:00 committed by GitHub
parent d20e5b1954
commit d5fe9c8174
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

View File

@ -100,7 +100,7 @@ index 2a785ea58a7bdc80c703a60bc6ed602dc8040aa0..9af91784544dbb0555824a9108825765
public void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) { public void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) {
org.spigotmc.AsyncCatcher.catchOp("block onPlace"); // Spigot org.spigotmc.AsyncCatcher.catchOp("block onPlace"); // Spigot
diff --git a/src/main/java/net/minecraft/world/level/portal/BlockPortalShape.java b/src/main/java/net/minecraft/world/level/portal/BlockPortalShape.java diff --git a/src/main/java/net/minecraft/world/level/portal/BlockPortalShape.java b/src/main/java/net/minecraft/world/level/portal/BlockPortalShape.java
index 9f7ff56e43a3dc0cc57ed3a2c6dbc729afafa1f8..3f8a674345bcad8289a48d2daa5e2a283528e952 100644 index 7c43a12f86cce829b2afb42ebcc95c2449985c10..0bce061d5a0dd0fc08f0aa4d46ead9326beb4bc7 100644
--- a/src/main/java/net/minecraft/world/level/portal/BlockPortalShape.java --- a/src/main/java/net/minecraft/world/level/portal/BlockPortalShape.java
+++ b/src/main/java/net/minecraft/world/level/portal/BlockPortalShape.java +++ b/src/main/java/net/minecraft/world/level/portal/BlockPortalShape.java
@@ -11,6 +11,7 @@ import net.minecraft.tags.Tag; @@ -11,6 +11,7 @@ import net.minecraft.tags.Tag;
@ -111,7 +111,7 @@ index 9f7ff56e43a3dc0cc57ed3a2c6dbc729afafa1f8..3f8a674345bcad8289a48d2daa5e2a28
import net.minecraft.world.level.GeneratorAccess; import net.minecraft.world.level.GeneratorAccess;
import net.minecraft.world.level.block.BlockPortal; import net.minecraft.world.level.block.BlockPortal;
import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.Blocks;
@@ -177,7 +178,10 @@ public class BlockPortalShape { @@ -182,7 +183,10 @@ public class BlockPortalShape {
} }
// CraftBukkit start - return boolean // CraftBukkit start - return boolean
@ -123,12 +123,13 @@ index 9f7ff56e43a3dc0cc57ed3a2c6dbc729afafa1f8..3f8a674345bcad8289a48d2daa5e2a28
org.bukkit.World bworld = this.b.getMinecraftWorld().getWorld(); org.bukkit.World bworld = this.b.getMinecraftWorld().getWorld();
// Copy below for loop // Copy below for loop
@@ -189,7 +193,7 @@ public class BlockPortalShape { @@ -191,8 +195,7 @@ public class BlockPortalShape {
blocks.add(state); BlockPosition.a(this.position, this.position.shift(EnumDirection.UP, this.height - 1).shift(this.d, this.width - 1)).forEach((blockposition) -> {
blocks.setTypeAndData(blockposition, iblockdata, 18);
}); });
-
- PortalCreateEvent event = new PortalCreateEvent(blocks, bworld, null, PortalCreateEvent.CreateReason.FIRE); - PortalCreateEvent event = new PortalCreateEvent((java.util.List<org.bukkit.block.BlockState>) (java.util.List) blocks.getList(), bworld, null, PortalCreateEvent.CreateReason.FIRE);
+ PortalCreateEvent event = new PortalCreateEvent(blocks, bworld, itemActionContext == null || itemActionContext.getEntity() == null ? null : itemActionContext.getEntity().getBukkitEntity(), PortalCreateEvent.CreateReason.FIRE); // Paper - pass entity param + PortalCreateEvent event = new PortalCreateEvent((java.util.List<org.bukkit.block.BlockState>) (java.util.List) blocks.getList(), bworld, itemActionContext == null || itemActionContext.getEntity() == null ? null : itemActionContext.getEntity().getBukkitEntity(), PortalCreateEvent.CreateReason.FIRE); // Paper - pass entity param
this.b.getMinecraftWorld().getMinecraftServer().server.getPluginManager().callEvent(event); this.b.getMinecraftWorld().getMinecraftServer().server.getPluginManager().callEvent(event);
if (event.isCancelled()) { if (event.isCancelled()) {

@ -1 +1 @@
Subproject commit ebe18b9b0ea94fcec32accc5132d33fe43923455 Subproject commit 3797d93e369645c9b2d9ab0188aa893a11280628