优化部分代码
This commit is contained in:
parent
94983fea3a
commit
961ad668fa
3 changed files with 2 additions and 6 deletions
|
@ -60,9 +60,7 @@ public class GunEventHandler {
|
|||
var stack = data.stack();
|
||||
|
||||
if (stack.is(ModTags.Items.NORMAL_GUN)) {
|
||||
if (data.bolt.actionTimer.get() > 0) {
|
||||
data.bolt.actionTimer.reduce();
|
||||
}
|
||||
|
||||
if (stack.getItem() == ModItems.MARLIN.get() && data.bolt.actionTimer.get() == 9) {
|
||||
data.isEmpty.set(false);
|
||||
|
|
|
@ -257,7 +257,6 @@ public class TaserItem extends GunItem implements GeoItem, SpecialFireWeapon, En
|
|||
}
|
||||
|
||||
data.ammo.set(data.ammo.get() - 1);
|
||||
data.tag().putBoolean("shoot", true);
|
||||
energyStorage.extractEnergy(400 + 100 * perkLevel, false);
|
||||
}
|
||||
|
||||
|
|
|
@ -85,8 +85,7 @@ public record FireMessage(int msgType, double power, boolean zoom) implements Cu
|
|||
if (data.defaultActionTime() > 0
|
||||
&& data.ammo.get() > (stack.is(ModTags.Items.REVOLVER) ? -1 : 0)
|
||||
&& data.bolt.actionTimer.get() == 0
|
||||
&& !(data.reload.normal()
|
||||
|| data.reload.empty())
|
||||
&& !(data.reload.normal() || data.reload.empty())
|
||||
&& !data.reloading()
|
||||
&& !data.charging()
|
||||
) {
|
||||
|
|
Loading…
Add table
Reference in a new issue