Fix toolUsed being referenced before definition (#2428)
Oops #2419 Signed-off-by: Mqrius <Nuntius.Marii@Gmail.com>
This commit is contained in:
parent
cfe7ad1b6f
commit
0e415d81f5
1 changed files with 2 additions and 2 deletions
|
|
@ -506,11 +506,11 @@ BlockEvents.rightClicked(event => {
|
||||||
BlockEvents.broken(event => {
|
BlockEvents.broken(event => {
|
||||||
const { server, item, player, block } = event;
|
const { server, item, player, block } = event;
|
||||||
|
|
||||||
|
let toolUsed = player.mainHandItem;
|
||||||
|
|
||||||
if (!block.hasTag('tfc:mineable_with_sharp_tool') || !toolUsed.hasTag('tfc:sharp_tools')) {
|
if (!block.hasTag('tfc:mineable_with_sharp_tool') || !toolUsed.hasTag('tfc:sharp_tools')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let toolUsed = player.mainHandItem;
|
|
||||||
|
|
||||||
if (!player.isCreative()) {
|
if (!player.isCreative()) {
|
||||||
toolUsed.damageValue++;
|
toolUsed.damageValue++;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue