mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 04:32:11 -07:00
[ci skip] Add more patch identifying comments, merge related patches
This commit is contained in:
@@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
float f = ComposterBlock.COMPOSTABLES.getFloat(itemstack.getItem());
|
||||
|
||||
- if ((i != 0 || f <= 0.0F) && rand >= (double) f) {
|
||||
+ // Paper start
|
||||
+ // Paper start - Add CompostItemEvent and EntityCompostItemEvent
|
||||
+ boolean willRaiseLevel = !((i != 0 || f <= 0.0F) && rand >= (double) f);
|
||||
+ final io.papermc.paper.event.block.CompostItemEvent event;
|
||||
+ if (entity == null) {
|
||||
@@ -27,7 +27,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ willRaiseLevel = event.willRaiseLevel();
|
||||
+
|
||||
+ if (!willRaiseLevel) {
|
||||
+ // Paper end
|
||||
+ // Paper end - Add CompostItemEvent and EntityCompostItemEvent
|
||||
return iblockdata;
|
||||
} else {
|
||||
int j = i + 1;
|
||||
@@ -35,11 +35,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
this.changed = true;
|
||||
BlockState iblockdata = ComposterBlock.addItem((Entity) null, this.state, this.level, this.pos, itemstack);
|
||||
|
||||
+ // Paper start
|
||||
+ // Paper start - Add CompostItemEvent and EntityCompostItemEvent
|
||||
+ if (iblockdata == null) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Add CompostItemEvent and EntityCompostItemEvent
|
||||
this.level.levelEvent(1500, this.pos, iblockdata != this.state ? 1 : 0);
|
||||
this.removeItemNoUpdate(0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user