[ci skip] Cleanup events (#10202)
This commit is contained in:
parent
b3c81089ae
commit
294347bee2
295 changed files with 3245 additions and 3088 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue