修复zoom相关命名错误
This commit is contained in:
parent
cfda1e61e6
commit
d9feb95cff
6 changed files with 9 additions and 9 deletions
|
@ -110,7 +110,7 @@ public class CrossHairOverlay {
|
||||||
if (player == null) return false;
|
if (player == null) return false;
|
||||||
|
|
||||||
if (player.isSpectator()) return false;
|
if (player.isSpectator()) return false;
|
||||||
if (!player.getMainHandItem().is(TargetModTags.Items.GUN) || !(player.getPersistentData().getDouble("zoom_time") < 7))
|
if (!player.getMainHandItem().is(TargetModTags.Items.GUN) || !(player.getPersistentData().getDouble("zoom_animation_time") < 7))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return !(player.getMainHandItem().getItem() == TargetModItems.M_79.get())
|
return !(player.getMainHandItem().getItem() == TargetModItems.M_79.get())
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class GunEventHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
double zoom;
|
double zoom;
|
||||||
if (player.getPersistentData().getDouble("zoom_time") > 4) {
|
if (player.getPersistentData().getDouble("zoom_animation_time") > 4) {
|
||||||
if (stack.is(TargetModTags.Items.SNIPER_RIFLE)) {
|
if (stack.is(TargetModTags.Items.SNIPER_RIFLE)) {
|
||||||
zoom = 0.0001;
|
zoom = 0.0001;
|
||||||
} else if (stack.is(TargetModTags.Items.SHOTGUN)) {
|
} else if (stack.is(TargetModTags.Items.SHOTGUN)) {
|
||||||
|
|
|
@ -199,7 +199,7 @@ public class LivingEntityEventHandler {
|
||||||
});
|
});
|
||||||
|
|
||||||
player.getPersistentData().putDouble("zoom_pos", 0);
|
player.getPersistentData().putDouble("zoom_pos", 0);
|
||||||
player.getPersistentData().putDouble("zoom_time", 0);
|
player.getPersistentData().putDouble("zoom_animation_time", 0);
|
||||||
if (newStack.getOrCreateTag().getDouble("bolt_action_time") > 0) {
|
if (newStack.getOrCreateTag().getDouble("bolt_action_time") > 0) {
|
||||||
newStack.getOrCreateTag().putDouble("bolt_action_anim", 0);
|
newStack.getOrCreateTag().putDouble("bolt_action_anim", 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -272,11 +272,11 @@ public class PlayerEventHandler {
|
||||||
capability.syncPlayerVariables(player);
|
capability.syncPlayerVariables(player);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (player.getPersistentData().getInt("zoom_time") < 10) {
|
if (player.getPersistentData().getInt("zoom_animation_time") < 10) {
|
||||||
player.getPersistentData().putInt("zoom_time", player.getPersistentData().getInt("zoom_time") + 1);
|
player.getPersistentData().putInt("zoom_animation_time", player.getPersistentData().getInt("zoom_animation_time") + 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
player.getPersistentData().putInt("zoom_time", 0);
|
player.getPersistentData().putInt("zoom_animation_time", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class ZoomMessage {
|
||||||
capability.zooming = false;
|
capability.zooming = false;
|
||||||
capability.syncPlayerVariables(entity);
|
capability.syncPlayerVariables(entity);
|
||||||
});
|
});
|
||||||
entity.getPersistentData().putDouble("zoom_time", 0);
|
entity.getPersistentData().putDouble("zoom_animation_time", 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,8 +73,8 @@ public class SentinelWuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure {
|
||||||
if (itemstack.getOrCreateTag().getDouble("firing") > 0) {
|
if (itemstack.getOrCreateTag().getDouble("firing") > 0) {
|
||||||
itemstack.getOrCreateTag().putDouble("firing", (itemstack.getOrCreateTag().getDouble("firing") - 1));
|
itemstack.getOrCreateTag().putDouble("firing", (itemstack.getOrCreateTag().getDouble("firing") - 1));
|
||||||
}
|
}
|
||||||
if (itemstack.getOrCreateTag().getDouble("zoom_speed") > 0) {
|
if (itemstack.getOrCreateTag().getDouble("zoom_firing") > 0) {
|
||||||
itemstack.getOrCreateTag().putDouble("zoom_speed", (itemstack.getOrCreateTag().getDouble("zoom_speed") - 1));
|
itemstack.getOrCreateTag().putDouble("zoom_firing", (itemstack.getOrCreateTag().getDouble("zoom_firing") - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
cid = itemstack.getOrCreateTag().getDouble("cid");
|
cid = itemstack.getOrCreateTag().getDouble("cid");
|
||||||
|
|
Loading…
Add table
Reference in a new issue