Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@4f9575e Break redstone on top of trap doors early
PaperMC/Paper@83da4b6 Fix DamageSource for Falling Blocks (#9175)
PaperMC/Paper@9846d0d Fix some NPE for EntityCompostItemEvent (#9169)
PaperMC/Paper@813d039 Make sure the player didn't disconnect when processing commands
PaperMC/Paper@1d4c780 Fix BlockPosition#offset(double,double,double) (#9190)
This commit is contained in:
granny
2023-05-07 22:32:23 -07:00
parent 21411de358
commit 54656e9755
11 changed files with 39 additions and 39 deletions

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Sun, 21 Mar 2021 15:49:15 -0500
Date: Sun, 7 May 2023 22:26:59 -0700
Subject: [PATCH] Sneak to bulk process composter
@@ -18,7 +18,7 @@ index 1d33c02088c150189d7f4b0aa27f6a1de96b11cf..1a46dbb364423c889fcdf58f640b7784
if (enuminteractionresult.consumesAction()) {
diff --git a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
index ae90e86327957bb784e2d81694ee7eea288bb455..c5e4bc4bbeacd4875996ba54e795689feb8023af 100644
index fb4382337fe83f7d00c2212a7a71e0ba5bdd51cc..f085a669e2f2645e8c4f7a7e5a3c958f13809744 100644
--- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
@@ -228,26 +228,28 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
@@ -29,13 +29,13 @@ index ae90e86327957bb784e2d81694ee7eea288bb455..c5e4bc4bbeacd4875996ba54e795689f
- // Paper start - EntityChangeBlockEvent
- double rand = world.getRandom().nextDouble();
- BlockState dummyBlockState = ComposterBlock.addItem(player, state, org.bukkit.craftbukkit.util.DummyGeneratorAccess.INSTANCE, pos, itemstack, rand);
- if (dummyBlockState == null) {
- return InteractionResult.PASS;
- }
- if (state != dummyBlockState && org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, pos, dummyBlockState).isCancelled()) { // if block state will change and event cancelled
- return InteractionResult.sidedSuccess(world.isClientSide);
- }
- BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack, rand);
- if (iblockdata1 == null) {
- return InteractionResult.PASS;
- }
- // Paper end
-
- world.levelEvent(1500, pos, state != iblockdata1 ? 1 : 0);
@@ -78,13 +78,13 @@ index ae90e86327957bb784e2d81694ee7eea288bb455..c5e4bc4bbeacd4875996ba54e795689f
+ // Paper start - EntityChangeBlockEvent
+ double rand = world.getRandom().nextDouble();
+ BlockState dummyBlockState = ComposterBlock.addItem(player, state, org.bukkit.craftbukkit.util.DummyGeneratorAccess.INSTANCE, pos, itemstack, rand);
+ if (dummyBlockState == null) {
+ return dummyBlockState;
+ }
+ if (state != dummyBlockState && org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, pos, dummyBlockState).isCancelled()) { // if block state will change and event cancelled
+ return state;
+ }
+ BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack, rand);
+ if (iblockdata1 == null) {
+ return iblockdata1;
+ }
+ // Paper end
+
+ world.levelEvent(1500, pos, state != iblockdata1 ? 1 : 0);