mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-07 03:00:29 +01:00
Fix WildStacker barrel counts being off by 1 in island level
This commit is contained in:
parent
5b06e6577d
commit
cd5cdba69b
@ -64,7 +64,7 @@ public class WildStacker implements Listener {
|
|||||||
materialAmount = level.getMaterialAmount(materials.name());
|
materialAmount = level.getMaterialAmount(materials.name());
|
||||||
}
|
}
|
||||||
|
|
||||||
level.setMaterialAmount(materials.name(), materialAmount + event.getBarrel().getStackAmount());
|
level.setMaterialAmount(materials.name(), materialAmount + event.getBarrel().getStackAmount() - 1); // -1 because the Interact handler will always add +1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -100,7 +100,7 @@ public class WildStacker implements Listener {
|
|||||||
materialAmount = level.getMaterialAmount(materials.name());
|
materialAmount = level.getMaterialAmount(materials.name());
|
||||||
}
|
}
|
||||||
|
|
||||||
level.setMaterialAmount(materials.name(), materialAmount + event.getTarget().getStackAmount());
|
level.setMaterialAmount(materials.name(), materialAmount + event.getTarget().getStackAmount() - 1); // -1 because the Interact handler will always add +1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user