aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0853-Add-CompostItemEvent-and-EntityCompostItemEvent.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0853-Add-CompostItemEvent-and-EntityCompostItemEvent.patch')
-rw-r--r--patches/server/0853-Add-CompostItemEvent-and-EntityCompostItemEvent.patch8
1 files changed, 4 insertions, 4 deletions
diff --git a/patches/server/0853-Add-CompostItemEvent-and-EntityCompostItemEvent.patch b/patches/server/0853-Add-CompostItemEvent-and-EntityCompostItemEvent.patch
index c5176a356f..a1fa4eea77 100644
--- a/patches/server/0853-Add-CompostItemEvent-and-EntityCompostItemEvent.patch
+++ b/patches/server/0853-Add-CompostItemEvent-and-EntityCompostItemEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add CompostItemEvent and EntityCompostItemEvent
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 413b307acaad5823b9e06f49fa2faf561f5f7b9a..d78fe4081bc2938326066e0afddb4a6c833a4bf7 100644
+index 413b307acaad5823b9e06f49fa2faf561f5f7b9a..f9084e2605d7403721fe6b714bfad051f932aaef 100644
--- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
@@ -328,7 +328,21 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
@@ -31,15 +31,15 @@ index 413b307acaad5823b9e06f49fa2faf561f5f7b9a..d78fe4081bc2938326066e0afddb4a6c
return iblockdata;
} else {
int j = i + 1;
-@@ -478,6 +492,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
+@@ -477,6 +491,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
+ if (!itemstack.isEmpty()) {
this.changed = true;
BlockState iblockdata = ComposterBlock.addItem((Entity) null, this.state, this.level, this.pos, itemstack);
-
+ // Paper start - Add CompostItemEvent and EntityCompostItemEvent
+ if (iblockdata == null) {
+ return;
+ }
+ // Paper end - Add CompostItemEvent and EntityCompostItemEvent
+
this.level.levelEvent(1500, this.pos, iblockdata != this.state ? 1 : 0);
this.removeItemNoUpdate(0);
- }