Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class AimingEvent
- {
- private boolean zoomed;
- private boolean haszoomed;
- public AimingEvent()
- {
- this.zoomed = false;
- this.haszoomed = false;
- }
- @SideOnly(Side.CLIENT)
- @SubscribeEvent
- public void rightClickTicks(TickEvent.ClientTickEvent event)
- {
- if (Minecraft.getMinecraft().currentScreen == null) {
- if ((GameSettings.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindUseItem)) && (!this.zoomed))
- {
- this.zoomed = true;
- MainRegistry.INSTANCE.sendToServer(new HoldingGun());
- }
- else if ((this.zoomed == true) && (!GameSettings.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindUseItem)))
- {
- this.zoomed = false;
- MainRegistry.INSTANCE.sendToServer(new NotHoldingGun());
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment