添加加特林可右键预热功能
This commit is contained in:
parent
92e3df76fe
commit
1bdbc84e64
1 changed files with 2 additions and 2 deletions
|
@ -179,7 +179,7 @@ public class GunEventHandler {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player.getPersistentData().getBoolean("firing") && !player.isSprinting()) {
|
if ((player.getPersistentData().getBoolean("firing") || (player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).zoom) && !player.isSprinting()) {
|
||||||
if (tag.getDouble("minigun_rotation") < 10) {
|
if (tag.getDouble("minigun_rotation") < 10) {
|
||||||
tag.putDouble("minigun_rotation", (tag.getDouble("minigun_rotation") + 1));
|
tag.putDouble("minigun_rotation", (tag.getDouble("minigun_rotation") + 1));
|
||||||
}
|
}
|
||||||
|
@ -192,7 +192,7 @@ public class GunEventHandler {
|
||||||
|
|
||||||
if (tag.getDouble("overheat") == 0
|
if (tag.getDouble("overheat") == 0
|
||||||
&& (player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).rifleAmmo > 0
|
&& (player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).rifleAmmo > 0
|
||||||
&& !(player.getCooldowns().isOnCooldown(stack.getItem())) && tag.getDouble("minigun_rotation") >= 10) {
|
&& !(player.getCooldowns().isOnCooldown(stack.getItem())) && tag.getDouble("minigun_rotation") >= 10 && player.getPersistentData().getBoolean("firing")) {
|
||||||
tag.putDouble("heat", (tag.getDouble("heat") + 0.5));
|
tag.putDouble("heat", (tag.getDouble("heat") + 0.5));
|
||||||
if (tag.getDouble("heat") >= 50.5) {
|
if (tag.getDouble("heat") >= 50.5) {
|
||||||
tag.putDouble("overheat", 40);
|
tag.putDouble("overheat", 40);
|
||||||
|
|
Loading…
Add table
Reference in a new issue