mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-11 04:22:00 +01:00
Fix wand of symmetry not applying fortune or silk touch
This commit is contained in:
parent
3c128946f3
commit
d89807fad9
1 changed files with 2 additions and 4 deletions
|
@ -273,9 +273,7 @@ public class SymmetryWandItem extends Item {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
BlockState blockstate = world.getBlockState(position);
|
BlockState blockstate = world.getBlockState(position);
|
||||||
if (blockstate.isAir(world, position)) {
|
if (!blockstate.isAir(world, position)) {
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
targets.add(position);
|
targets.add(position);
|
||||||
world.playEvent(2001, position, Block.getStateId(blockstate));
|
world.playEvent(2001, position, Block.getStateId(blockstate));
|
||||||
world.setBlockState(position, air, 3);
|
world.setBlockState(position, air, 3);
|
||||||
|
@ -286,7 +284,7 @@ public class SymmetryWandItem extends Item {
|
||||||
player.getHeldItemMainhand()
|
player.getHeldItemMainhand()
|
||||||
.onBlockDestroyed(world, blockstate, position, player);
|
.onBlockDestroyed(world, blockstate, position, player);
|
||||||
TileEntity tileentity = blockstate.hasTileEntity() ? world.getTileEntity(position) : null;
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue