Fix wand of symmetry not applying fortune or silk touch

This commit is contained in:
grimmauld 2020-09-06 09:35:49 +02:00
parent 3c128946f3
commit d89807fad9

View File

@ -273,9 +273,7 @@ public class SymmetryWandItem extends Item {
continue;
BlockState blockstate = world.getBlockState(position);
if (blockstate.isAir(world, position)) {
continue;
} else {
if (!blockstate.isAir(world, position)) {
targets.add(position);
world.playEvent(2001, position, Block.getStateId(blockstate));
world.setBlockState(position, air, 3);
@ -286,7 +284,7 @@ public class SymmetryWandItem extends Item {
player.getHeldItemMainhand()
.onBlockDestroyed(world, blockstate, position, player);
TileEntity tileentity = blockstate.hasTileEntity() ? world.getTileEntity(position) : null;
Block.spawnDrops(blockstate, world, pos, tileentity);
Block.spawnDrops(blockstate, world, pos, tileentity, player, player.getHeldItemMainhand()); // Add fortune, silk touch and other loot modifiers
}
}
}