Java Code Examples for net.minecraft.client.Minecraft#isGamePaused()
The following examples show how to use
net.minecraft.client.Minecraft#isGamePaused() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Levelhead.java From Hyperium with GNU Lesser General Public License v3.0 | 6 votes |
@InvokeEvent public void tick(TickEvent event) { if (!Hyperium.INSTANCE.getHandlers().getHypixelDetector().isHypixel() || displayManager == null || displayManager.getMasterConfig() == null || !displayManager.getMasterConfig().isEnabled() || !Sk1erMod.getInstance().isEnabled()) { return; } Minecraft mc = Minecraft.getMinecraft(); if (!mc.isGamePaused() && mc.thePlayer != null && mc.theWorld != null) { if (System.currentTimeMillis() < waitUntil) { if (updates > 0) { updates = 0; } return; } displayManager.tick(); } }
Example 2
Source File: EventsClient.java From Valkyrien-Skies with Apache License 2.0 | 6 votes |
@SubscribeEvent(priority = EventPriority.HIGHEST) public void onClientTickEvent(ClientTickEvent event) { Minecraft mc = Minecraft.getMinecraft(); if (mc.world != null) { if (!mc.isGamePaused()) { WorldPhysObjectManager manager = ValkyrienSkiesMod.VS_PHYSICS_MANAGER .getManagerForWorld(mc.world); if (event.phase == Phase.END) { for (PhysicsWrapperEntity wrapper : manager.physicsEntities) { wrapper.getPhysicsObject().onPostTickClient(); } EntityDraggable.tickAddedVelocityForWorld(mc.world); } } } }
Example 3
Source File: YouCouldMakeAReligionOutOfThis.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
@SubscribeEvent @SideOnly(Side.CLIENT) public static void onClientTick(TickEvent.ClientTickEvent event) { if (event.phase == TickEvent.Phase.START) { Minecraft client = Minecraft.getMinecraft(); if (client.world != null && !client.isGamePaused()) { RANDOM.setSeed((client.world.getTotalWorldTime() * M) ^ client.world.getSeed()); if (RANDOM.nextInt(CHANCE) == 0) { ISound sound = PositionedSoundRecord.getMasterRecord(YOU_COULD_MAKE_A_RELIGION_OUT_OF_THIS, 1.0F); client.getSoundHandler().playSound(sound); } } } }
Example 4
Source File: SentientBread.java From CommunityMod with GNU Lesser General Public License v2.1 | 4 votes |
@SubscribeEvent public static void onClientTick(TickEvent.ClientTickEvent event) { Minecraft mc = Minecraft.getMinecraft(); if (!isLoaded) { return; } if (event.phase == TickEvent.Phase.END && mc.world != null && !mc.isGamePaused()) { ItemStack stack = mc.player.getActiveItemStack(); if (!stack.isEmpty() && stack.getItem() == Items.BREAD) { Random rand = mc.player.world.rand; if (rand.nextFloat() < 0.04) { String msg = MESSAGES_STOP[rand.nextInt(MESSAGES_STOP.length)]; int i = mc.gameSettings.narrator; if (NARRATOR.active() && (i == 0 || i == 3)) // Don't narrate if the setting is already turned on { NARRATOR.clear(); NARRATOR.say(msg); } mc.player.sendMessage(stack.getTextComponent().appendSibling(new TextComponentString(": " + msg))); } } } }