修复M134弹药消耗问题
This commit is contained in:
parent
47cb60a213
commit
c912e271a6
1 changed files with 2 additions and 3 deletions
|
@ -591,7 +591,7 @@ public class ClientEventHandler {
|
||||||
&& !player.isSprinting()
|
&& !player.isSprinting()
|
||||||
&& tag.getDouble("overheat") == 0
|
&& tag.getDouble("overheat") == 0
|
||||||
&& !player.getCooldowns().isOnCooldown(stack.getItem()) && miniGunRot >= 20
|
&& !player.getCooldowns().isOnCooldown(stack.getItem()) && miniGunRot >= 20
|
||||||
&& (cap.rifleAmmo > 0 || InventoryTool.hasCreativeAmmoBox(player))
|
&& data.hasAmmo(player)
|
||||||
))) {
|
))) {
|
||||||
if (mode == 0) {
|
if (mode == 0) {
|
||||||
if (clientTimer.getProgress() == 0) {
|
if (clientTimer.getProgress() == 0) {
|
||||||
|
@ -705,7 +705,7 @@ public class ClientEventHandler {
|
||||||
handleClientShoot();
|
handleClientShoot();
|
||||||
}
|
}
|
||||||
} else if (stack.is(ModItems.MINIGUN.get())) {
|
} else if (stack.is(ModItems.MINIGUN.get())) {
|
||||||
if (player.getData(ModAttachments.PLAYER_VARIABLE).rifleAmmo > 0 || InventoryTool.hasCreativeAmmoBox(player)) {
|
if (data.hasAmmo(player)) {
|
||||||
var perk = data.perk.get(Perk.Type.AMMO);
|
var perk = data.perk.get(Perk.Type.AMMO);
|
||||||
float pitch = tag.getDouble("heat") <= 40 ? 1 : (float) (1 - 0.025 * Math.abs(40 - tag.getDouble("heat")));
|
float pitch = tag.getDouble("heat") <= 40 ? 1 : (float) (1 - 0.025 * Math.abs(40 - tag.getDouble("heat")));
|
||||||
|
|
||||||
|
@ -824,7 +824,6 @@ public class ClientEventHandler {
|
||||||
} else {
|
} else {
|
||||||
player.playSound(ModSounds.SHELL_CASING_NORMAL.get(), (float) Math.max(1.5 - 0.2 * shooterHeight, 0), (float) ((2 * org.joml.Math.random() - 1) * 0.05f + 1.0f));
|
player.playSound(ModSounds.SHELL_CASING_NORMAL.get(), (float) Math.max(1.5 - 0.2 * shooterHeight, 0), (float) ((2 * org.joml.Math.random() - 1) * 0.05f + 1.0f));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue