Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
Co-authored-by: MiniDigger | Martin <admin@minidigger.dev>
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com>
Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
This commit is contained in:
Nassim Jahnke
2025-04-12 17:26:44 +02:00
parent 0767902699
commit f00727c57e
2092 changed files with 50551 additions and 48729 deletions

View File

@@ -16,5 +16,5 @@
+ if (oldPower != i) {
+ // CraftBukkit end
if (level.getBlockState(pos) == state) {
level.setBlock(pos, state.setValue(RedStoneWireBlock.POWER, Integer.valueOf(i)), 2);
level.setBlock(pos, state.setValue(RedStoneWireBlock.POWER, i), 2);
}

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/redstone/NeighborUpdater.java
+++ b/net/minecraft/world/level/redstone/NeighborUpdater.java
@@ -42,8 +_,29 @@
@@ -42,8 +_,26 @@
}
static void executeUpdate(Level level, BlockState state, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) {
@@ -12,20 +12,17 @@
+ // Paper end - Add source block to BlockPhysicsEvent
try {
+ // CraftBukkit start
+ org.bukkit.craftbukkit.CraftWorld cworld = level.getWorld();
+ if (cworld != null) {
+ org.bukkit.event.block.BlockPhysicsEvent event = new org.bukkit.event.block.BlockPhysicsEvent(org.bukkit.craftbukkit.block.CraftBlock.at(level, pos), org.bukkit.craftbukkit.block.data.CraftBlockData.fromData(state), org.bukkit.craftbukkit.block.CraftBlock.at(level, sourcePos)); // Paper - Add source block to BlockPhysicsEvent
+ level.getCraftServer().getPluginManager().callEvent(event);
+ org.bukkit.event.block.BlockPhysicsEvent event = new org.bukkit.event.block.BlockPhysicsEvent(org.bukkit.craftbukkit.block.CraftBlock.at(level, pos), org.bukkit.craftbukkit.block.data.CraftBlockData.fromData(state), org.bukkit.craftbukkit.block.CraftBlock.at(level, sourcePos)); // Paper - Add source block to BlockPhysicsEvent
+ level.getCraftServer().getPluginManager().callEvent(event);
+
+ if (event.isCancelled()) {
+ return;
+ }
+ if (event.isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
state.handleNeighborChanged(level, pos, neighborBlock, orientation, movedByPiston);
+ // Spigot start
+ } catch (StackOverflowError ex) {
+ level.lastPhysicsProblem = new BlockPos(pos);
+ level.lastPhysicsProblem = pos.immutable();
+ // Spigot end
} catch (Throwable var9) {
CrashReport crashReport = CrashReport.forThrowable(var9, "Exception while updating neighbours");