本文整理了Java中net.minecraft.client.Minecraft.isGamePaused()
方法的一些代码示例,展示了Minecraft.isGamePaused()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Minecraft.isGamePaused()
方法的具体详情如下:
包路径:net.minecraft.client.Minecraft
类名称:Minecraft
方法名:isGamePaused
暂无
代码示例来源:origin: Glitchfiend/ToughAsNails
@SubscribeEvent
public void onClientTick(TickEvent.ClientTickEvent event)
{
if (event.phase == Phase.END && !minecraft.isGamePaused())
{
updateCounter++;
}
}
代码示例来源:origin: Glitchfiend/ToughAsNails
@SubscribeEvent
public void onClientTick(TickEvent.ClientTickEvent event)
{
if (event.phase == Phase.END && !minecraft.isGamePaused())
{
updateCounter++;
}
}
代码示例来源:origin: Electrical-Age/ElectricalAge
public static boolean isGameInPause() {
return Minecraft.getMinecraft().isGamePaused();
}
代码示例来源:origin: SleepyTrousers/EnderIO
@Override
protected void onClientTick() {
if (!Minecraft.getMinecraft().isGamePaused()) {
++clientTickCount;
YetaUtil.onClientTick();
}
}
代码示例来源:origin: ForestryMC/ForestryMC
@Override
@SideOnly(Side.CLIENT)
public boolean canDoBeeFX() {
return !Minecraft.getMinecraft().isGamePaused() && active;
}
代码示例来源:origin: ForestryMC/ForestryMC
@Override
@SideOnly(Side.CLIENT)
public boolean canDoBeeFX() {
return !Minecraft.getMinecraft().isGamePaused() && active;
}
代码示例来源:origin: CoFH/ThermalDynamics
@SubscribeEvent
public void clientTick(TickEvent.ClientTickEvent event) {
if (Minecraft.getMinecraft().isGamePaused()) {
return;
}
travelingItemSpin += spinStep;
travelingItemSpin %= 180;
}
代码示例来源:origin: MatterOverdrive/MatterOverdrive-Legacy-Edition
public void onClientTick(TickEvent.ClientTickEvent event) {
if (!Minecraft.getMinecraft().isGamePaused()) {
updateEffects();
}
}
代码示例来源:origin: MatterOverdrive/MatterOverdrive-Legacy-Edition
public void onClientTick(TickEvent.ClientTickEvent event) {
if (!Minecraft.getMinecraft().isGamePaused() && Minecraft.getMinecraft().world != null && Minecraft.getMinecraft().player != null) {
for (IWeapon item : shotTracker.keySet()) {
int oldTime = shotTracker.get(item);
if (oldTime > 0) {
shotTracker.put(item, oldTime - 1);
}
}
manageWeaponView();
}
}
代码示例来源:origin: JurassiCraftTeam/JurassiCraft2
@SideOnly(Side.CLIENT)
public void updateRotation() {
this.prevCleaningRotation = this.cleaningRotation;
if(!Minecraft.getMinecraft().isGamePaused()) {
if(this.isCleaning) {
this.rotationAmount += 0.008f;
this.rotationAmount *= 1.01f;
}else {
this.rotationAmount -= 0.01f;
this.rotationAmount *= 0.95f;
}
if (this.rotationAmount < 0f) {
this.rotationAmount = 0f;
}
if (this.rotationAmount > 1.2f) {
this.rotationAmount = 1.2f;
}
this.cleaningRotation += this.rotationAmount;
}
}
代码示例来源:origin: CoFH/ThermalDynamics
tickBlocksToAdd.clear();
if (!mc.isGamePaused() && !tickBlocks.isEmpty()) {
for (Iterator<DuctUnitItem> iterator = tickBlocks.iterator(); iterator.hasNext(); ) {
DuctUnitItem aCond = iterator.next();
代码示例来源:origin: Zyin055/zyinhud
if(!mc.playerController.isInCreativeMode() && !mc.isGamePaused())// && mc.inGameHasFocus)
PlayLowHealthSound();
代码示例来源:origin: Vazkii/Quark
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void clientTick(ClientTickEvent event) {
Minecraft mc = Minecraft.getMinecraft();
if(enableDangerSight && event.phase == Phase.START && mc.player != null && mc.player.getActivePotionEffect(dangerSight) != null && !mc.isGamePaused()) {
int range = 12;
World world = mc.world;
Iterable<BlockPos> positions = BlockPos.getAllInBox(mc.player.getPosition().add(-range, -range, -range), mc.player.getPosition().add(range, range, range));
for(BlockPos pos : positions)
if(world.rand.nextFloat() < 0.1 && canMobsSpawnInPos(world, pos)) {
float x = pos.getX() + 0.3F + world.rand.nextFloat() * 0.4F;
float y = pos.getY();
float z = pos.getZ() + 0.3F + world.rand.nextFloat() * 0.4F;
world.spawnParticle(EnumParticleTypes.SPELL_MOB, x, y, z, world.rand.nextFloat() < 0.9 ? 0 : 1, 0, 0);
}
}
}
代码示例来源:origin: TeamWizardry/Wizardry
@SubscribeEvent
@SideOnly(Side.CLIENT)
public static void render(RenderWorldLastEvent event) {
if (Minecraft.getMinecraft().player == null) return;
if (Minecraft.getMinecraft().getRenderManager().options == null) return;
Set<PhaseObject> tmp = new HashSet<>(phaseObjects);
for (PhaseObject phaseObject : tmp) {
if (Minecraft.getMinecraft().world.getTotalWorldTime() - phaseObject.lastWorldTick > phaseObject.expiry)
phaseObjects.remove(phaseObject);
float time = ClientTickHandler.getTicksInGame() +
(Minecraft.getMinecraft().isGamePaused() ? 0 : ClientTickHandler.getPartialTicks());
BufferBuilder bufferBuilder = beginRender();
render(phaseObject, time, bufferBuilder);
finishRender(bufferBuilder);
}
}
代码示例来源:origin: Lunatrius/Schematica
@SubscribeEvent
public void onClientTick(final TickEvent.ClientTickEvent event) {
if (this.minecraft.isGamePaused() || event.phase != TickEvent.Phase.END) {
return;
代码示例来源:origin: MatterOverdrive/MatterOverdrive-Legacy-Edition
@SubscribeEvent
public void onClientTick(TickEvent.ClientTickEvent event) {
if (Minecraft.getMinecraft().world != null &&
theGalaxy != null &&
!Minecraft.getMinecraft().isGamePaused() &&
Minecraft.getMinecraft().world.isRemote &&
Minecraft.getMinecraft().world.provider.getDimension() == 0 &&
event.phase == TickEvent.Phase.START &&
Minecraft.getMinecraft().world != null) {
theGalaxy.update(Minecraft.getMinecraft().world);
}
}
//endregion
代码示例来源:origin: MatterOverdrive/MatterOverdrive-Legacy-Edition
@SubscribeEvent
public void onClientTick(TickEvent.ClientTickEvent event) {
if (Minecraft.getMinecraft().player == null || Minecraft.getMinecraft().world == null) {
return;
}
if (ClientProxy.instance().getClientWeaponHandler() != null) {
ClientProxy.instance().getClientWeaponHandler().onClientTick(event);
}
if (!Minecraft.getMinecraft().isGamePaused() && event.phase.equals(TickEvent.Phase.START)) {
ClientProxy.questHud.onTick();
}
}
代码示例来源:origin: TehNut/HWYLA
@SubscribeEvent
public static void onTooltip(WailaTooltipEvent event) {
if (!ConfigHandler.instance().showTooltip())
return;
if (!getNarrator().active())
return;
if (!ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_TTS, false))
return;
if (Minecraft.getMinecraft().currentScreen != null || Minecraft.getMinecraft().isGamePaused())
return;
String narrate = TextFormatting.getTextWithoutFormattingCodes(event.getCurrentTip().get(0));
if (lastNarration.equalsIgnoreCase(narrate))
return;
if (event.getAccessor().getBlock() == Blocks.AIR && event.getAccessor().getEntity() == null)
return;
getNarrator().clear();
getNarrator().say(narrate);
lastNarration = narrate;
}
代码示例来源:origin: ValkyrienWarfare/Valkyrien-Warfare-Revamped
@SubscribeEvent(priority = EventPriority.HIGHEST)
public void onClientTickEvent(ClientTickEvent event) {
Minecraft mc = Minecraft.getMinecraft();
if (mc.world != null) {
if (!mc.isGamePaused()) {
WorldPhysObjectManager manager = ValkyrienWarfareMod.physicsManager.getManagerForWorld(mc.world);
if (event.phase == Phase.END) {
for (PhysicsWrapperEntity wrapper : manager.physicsEntities) {
wrapper.wrapping.onPostTickClient();
}
EntityDraggable.tickAddedVelocityForWorld(mc.world);
}
}
if (event.phase == Phase.END) {
Object o = Minecraft.getMinecraft().player;
IDraggable draggable = (IDraggable) o;
if (draggable.getWorldBelowFeet() != null) {
PlayerShipRefrenceMessage playerPosMessage = new PlayerShipRefrenceMessage(Minecraft.getMinecraft().player, draggable.getWorldBelowFeet());
ValkyrienWarfareMod.physWrapperNetwork.sendToServer(playerPosMessage);
}
}
}
}
代码示例来源:origin: MatterOverdrive/MatterOverdrive-Legacy-Edition
@SubscribeEvent
public void onClientTick(InputEvent.KeyInputEvent event) {
if (Minecraft.getMinecraft().player == null || Minecraft.getMinecraft().world == null || Minecraft.getMinecraft().isGamePaused() || Minecraft.getMinecraft().currentScreen != null) {
return;
}
AndroidPlayer androidPlayer = MOPlayerCapabilityProvider.GetAndroidCapability(Minecraft.getMinecraft().player);
if (androidPlayer.isAndroid() && ClientProxy.keyHandler.getBinding(KeyHandler.ABILITY_USE_KEY).isPressed()) {
for (IBioticStat stat : MatterOverdrive.STAT_REGISTRY.getStats()) {
int level = androidPlayer.getUnlockedLevel(stat);
if (level > 0 && stat.isEnabled(androidPlayer, level)) {
stat.onActionKeyPress(androidPlayer, androidPlayer.getUnlockedLevel(stat), false);
}
}
MatterOverdrive.NETWORK.sendToServer(new PacketBioticActionKey());
}
}
内容来源于网络,如有侵权,请联系作者删除!