mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 04:05:50 -07:00
Update patches to handle vineflower decompiler (#10406)
* Update patches to handle vineflower decompiler * update patches again to handle inlined simple lambdas * update vf again and re-apply/rebuild patches * update patches after removal of verify-merges flag * fix compile issue * remove maven local * fix some issues * address more issues * fix collision patch * use paperweight release * more fixes * update fineflower and fix patches again * add missing comment descriptor --------- Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
This commit is contained in:
@@ -55,16 +55,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // Paper end - Add PlayerShearBlockEvent
|
||||
Direction direction = hit.getDirection();
|
||||
Direction direction2 = direction.getAxis() == Direction.Axis.Y ? player.getDirection().getOpposite() : direction;
|
||||
world.playSound((Player)null, pos, SoundEvents.PUMPKIN_CARVE, SoundSource.BLOCKS, 1.0F, 1.0F);
|
||||
world.playSound(null, pos, SoundEvents.PUMPKIN_CARVE, SoundSource.BLOCKS, 1.0F, 1.0F);
|
||||
world.setBlock(pos, Blocks.CARVED_PUMPKIN.defaultBlockState().setValue(CarvedPumpkinBlock.FACING, direction2), 11);
|
||||
- ItemEntity itemEntity = new ItemEntity(world, (double)pos.getX() + 0.5D + (double)direction2.getStepX() * 0.65D, (double)pos.getY() + 0.1D, (double)pos.getZ() + 0.5D + (double)direction2.getStepZ() * 0.65D, new ItemStack(Items.PUMPKIN_SEEDS, 4));
|
||||
+ // Paper start - Add PlayerShearBlockEvent
|
||||
+ for (org.bukkit.inventory.ItemStack item : event.getDrops()) {
|
||||
+ ItemEntity itemEntity = new ItemEntity(world, (double) pos.getX() + 0.5D + (double) direction2.getStepX() * 0.65D, (double) pos.getY() + 0.1D, (double) pos.getZ() + 0.5D + (double) direction2.getStepZ() * 0.65D, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(item));
|
||||
+ // Paper end - Add PlayerShearBlockEvent
|
||||
itemEntity.setDeltaMovement(0.05D * (double)direction2.getStepX() + world.random.nextDouble() * 0.02D, 0.05D, 0.05D * (double)direction2.getStepZ() + world.random.nextDouble() * 0.02D);
|
||||
+ for (org.bukkit.inventory.ItemStack item : event.getDrops()) { // Paper - Add PlayerShearBlockEvent
|
||||
ItemEntity itemEntity = new ItemEntity(
|
||||
world,
|
||||
pos.getX() + 0.5 + direction2.getStepX() * 0.65,
|
||||
pos.getY() + 0.1,
|
||||
pos.getZ() + 0.5 + direction2.getStepZ() * 0.65,
|
||||
- new ItemStack(Items.PUMPKIN_SEEDS, 4)
|
||||
+ org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(item) // Paper - Add PlayerShearBlockEvent
|
||||
);
|
||||
itemEntity.setDeltaMovement(
|
||||
0.05 * direction2.getStepX() + world.random.nextDouble() * 0.02, 0.05, 0.05 * direction2.getStepZ() + world.random.nextDouble() * 0.02
|
||||
);
|
||||
world.addFreshEntity(itemEntity);
|
||||
+ } // Paper - Add PlayerShearBlockEvent
|
||||
itemStack.hurtAndBreak(1, player, (playerx) -> {
|
||||
playerx.broadcastBreakEvent(hand);
|
||||
});
|
||||
itemStack.hurtAndBreak(1, player, playerx -> playerx.broadcastBreakEvent(hand));
|
||||
world.gameEvent(player, GameEvent.SHEAR, pos);
|
||||
player.awardStat(Stats.ITEM_USED.get(Items.SHEARS));
|
||||
|
Reference in New Issue
Block a user