2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
|
|
Date: Wed, 12 May 2021 03:21:22 -0700
|
|
|
|
Subject: [PATCH] call PortalCreateEvent players and end platform
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
2021-11-25 10:19:05 +01:00
|
|
|
index b1b90f30d19d4db44419e367aa7ffe2fe37f7c73..d0bb0c098f5a7fd9d0468cddc75d2fbca2880a8a 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
2021-11-25 10:19:05 +01:00
|
|
|
@@ -1195,15 +1195,21 @@ public class ServerPlayer extends Player {
|
2021-06-11 14:02:28 +02:00
|
|
|
private void createEndPlatform(ServerLevel world, BlockPos centerPos) {
|
|
|
|
BlockPos.MutableBlockPos blockposition_mutableblockposition = centerPos.mutable();
|
|
|
|
|
|
|
|
+ org.bukkit.craftbukkit.util.BlockStateListPopulator blockList = new org.bukkit.craftbukkit.util.BlockStateListPopulator(world); // Paper
|
|
|
|
for (int i = -2; i <= 2; ++i) {
|
|
|
|
for (int j = -2; j <= 2; ++j) {
|
|
|
|
for (int k = -1; k < 3; ++k) {
|
|
|
|
BlockState iblockdata = k == -1 ? Blocks.OBSIDIAN.defaultBlockState() : Blocks.AIR.defaultBlockState();
|
|
|
|
|
|
|
|
- world.setBlockAndUpdate(blockposition_mutableblockposition.set(centerPos).move(j, k, i), iblockdata);
|
2021-06-15 04:59:31 +02:00
|
|
|
+ blockList.setBlock(blockposition_mutableblockposition.set(centerPos).move(j, k, i), iblockdata, 3); // Paper
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
+ // Paper start
|
|
|
|
+ if (new org.bukkit.event.world.PortalCreateEvent((List< org.bukkit.block.BlockState>) (List) blockList.getList(), world.getWorld(), this.getBukkitEntity(), org.bukkit.event.world.PortalCreateEvent.CreateReason.END_PLATFORM).callEvent()) {
|
|
|
|
+ blockList.updateList();
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
|
|
|
|
}
|
|
|
|
|