当前位置: 首页>>代码示例>>Java>>正文


Java GuiGameOver类代码示例

本文整理汇总了Java中net.minecraft.client.gui.GuiGameOver的典型用法代码示例。如果您正苦于以下问题:Java GuiGameOver类的具体用法?Java GuiGameOver怎么用?Java GuiGameOver使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GuiGameOver类属于net.minecraft.client.gui包,在下文中一共展示了GuiGameOver类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: guiInstance

import net.minecraft.client.gui.GuiGameOver; //导入依赖的package包/类
static void guiInstance(GuiOpenEvent e) {
    if (!(mc.currentScreen instanceof ScreenGUI)) {
        if (mc.currentScreen != e.gui) {
            if ((e.gui instanceof GuiIngameMenu) || ((e.gui instanceof GuiInventory) && (!OptionCore.DEFAULT_INVENTORY.getValue()))) {
                final boolean inv = (e.gui instanceof GuiInventory);

                if (mc.playerController.isInCreativeMode() && inv)
                    e.gui = new GuiContainerCreative(mc.thePlayer);
                else {
                    e.gui = new IngameMenuGUI((inv ? (GuiInventory) mc.currentScreen : null));
                }
            }
            if ((e.gui instanceof GuiGameOver) && (!OptionCore.DEFAULT_DEATH_SCREEN.getValue())) {
                if (mc.ingameGUI instanceof IngameGUI) {
                    e.gui = new DeathScreen();
                }
            }
        }
        else e.setCanceled(true);
    }
}
 
开发者ID:Tencao,项目名称:SAO-UI---1.8.8,代码行数:22,代码来源:RenderHandler.java

示例2: Ghost

import net.minecraft.client.gui.GuiGameOver; //导入依赖的package包/类
public Ghost() {
    super("Ghost", 0xC0FFB1, ModuleCategory.MISCELLANEOUS);

    listeners.add(new Listener<PlayerUpdate>() {
        @Override
        public void call(PlayerUpdate event) {
            if (mc.currentScreen instanceof GuiGameOver) {
                mc.currentScreen = null;
                mc.setIngameFocus();

                hasGhosted = true;
                mc.thePlayer.setPlayerSPHealth(1);
            }
        }
    });
}
 
开发者ID:SerenityEnterprises,项目名称:SerenityCE,代码行数:17,代码来源:Ghost.java

示例3: onLivingUpdate

import net.minecraft.client.gui.GuiGameOver; //导入依赖的package包/类
@SubscribeEvent
public void onLivingUpdate(LivingUpdateEvent event)
{
	if (event.entity instanceof EntityPlayer)
	{
		EntityPlayer player = (EntityPlayer)event.entity;
		ItemStack itemstack = player.getHeldItem();
		
		if (player.ticksExisted % 2 == 0)
		{
			if (mc.getSoundHandler().isSoundPlaying(FNAFSoundHandler.deathStatic) && !(mc.currentScreen instanceof GuiGameOver))
			{
				mc.getSoundHandler().stopSound(FNAFSoundHandler.deathStatic);
			}
		}
	}
}
 
开发者ID:Link1234Gamer,项目名称:FiveNightsAtFreddysUniverseMod,代码行数:18,代码来源:ClientEventHandler.java

示例4: onGuiOpen

import net.minecraft.client.gui.GuiGameOver; //导入依赖的package包/类
@SubscribeEvent
	public void onGuiOpen(GuiOpenEvent event)
	{
//		if (event.gui instanceof GuiMainMenu)
//		{	
//			{
//				
//			}
//		}
		if (event.gui instanceof GuiGameOver)
		{
			GuiFNAFGameOver.ticksElapsed = 0;
			mc.getSoundHandler().stopSounds();
			
			if (!mc.getSoundHandler().isSoundPlaying(FNAFSoundHandler.deathStatic))
			{
				mc.getSoundHandler().playSound(FNAFSoundHandler.deathStatic);
			}
		}
	}
 
开发者ID:Link1234Gamer,项目名称:FiveNightsAtFreddysUniverseMod,代码行数:21,代码来源:ClientEventHandler.java

示例5: onPlaySound

import net.minecraft.client.gui.GuiGameOver; //导入依赖的package包/类
@SubscribeEvent
    public void onPlaySound(PlaySoundEvent17 event)
    {
        if (mc.currentScreen instanceof GuiGameOver)
        {
        	if (!event.name.equals("static"))
        	{
        		event.result = null;
        	}
        }
 //     else if (mc.currentScreen instanceof GuiMonitor)
//        {
 //       	if (event.name.equals("gui.button.press"))
  //      	{
   //     		event.result = null;
    //    	}
    //    }
    }
 
开发者ID:Link1234Gamer,项目名称:FiveNightsAtFreddysUniverseMod,代码行数:19,代码来源:ClientEventHandler.java

示例6: onGuiOpen

import net.minecraft.client.gui.GuiGameOver; //导入依赖的package包/类
@SubscribeEvent
public void onGuiOpen(GuiOpenEvent event)
{
    GuiScreen gui = event.gui;
    if (!Settings.autoRespawn)
    {
        return;
    }
    if (gui instanceof GuiGameOver && !hasClicked)
    {
        Minecraft mc = Minecraft.getMinecraft();
        if (!mc.theWorld.getWorldInfo().isHardcoreModeEnabled())
        {
            hasClicked = true;
            mc.thePlayer.respawnPlayer();
            mc.displayGuiScreen((GuiScreen) null);
            event.setCanceled(true);
        }
    }
    else if (!(gui instanceof GuiGameOver) && hasClicked)
    {
        hasClicked = false;
    }
}
 
开发者ID:VikeStep,项目名称:sprinkles_for_vanilla,代码行数:25,代码来源:ClientHandlers.java

示例7: onOpenGui

import net.minecraft.client.gui.GuiGameOver; //导入依赖的package包/类
@SubscribeEvent
public void onOpenGui(GuiOpenEvent event) {
	Minecraft mc = Minecraft.getMinecraft();
	if (mc.player != null) {
		if (event.getGui() instanceof GuiGameOver && isKnockedOut && !acceptedDeath) { // Minor hack: isKnockedOut is always set AFTER the game over screen pops up, so we can abuse that here
			event.setGui(null);
		} else if (isKnockedOut && event.getGui() instanceof GuiInventory) {
			event.setGui(null);
		}
	}
}
 
开发者ID:blay09,项目名称:HardcoreRevival,代码行数:12,代码来源:ClientProxy.java

示例8: setDimensionAndSpawnPlayer

import net.minecraft.client.gui.GuiGameOver; //导入依赖的package包/类
public void setDimensionAndSpawnPlayer(int dimension)
{
    this.theWorld.setInitialSpawnLocation();
    this.theWorld.removeAllEntities();
    int i = 0;
    String s = null;

    if (this.thePlayer != null)
    {
        i = this.thePlayer.getEntityId();
        this.theWorld.removeEntity(this.thePlayer);
        s = this.thePlayer.getClientBrand();
    }

    this.renderViewEntity = null;
    EntityPlayerSP entityplayersp = this.thePlayer;
    this.thePlayer = this.playerController.func_178892_a(this.theWorld, this.thePlayer == null ? new StatFileWriter() : this.thePlayer.getStatFileWriter());
    this.thePlayer.getDataWatcher().updateWatchedObjectsFromList(entityplayersp.getDataWatcher().getAllWatched());
    this.thePlayer.dimension = dimension;
    this.renderViewEntity = this.thePlayer;
    this.thePlayer.preparePlayerToSpawn();
    this.thePlayer.setClientBrand(s);
    this.theWorld.spawnEntityInWorld(this.thePlayer);
    this.playerController.flipPlayer(this.thePlayer);
    this.thePlayer.movementInput = new MovementInputFromOptions(this.gameSettings);
    this.thePlayer.setEntityId(i);
    this.playerController.setPlayerCapabilities(this.thePlayer);
    this.thePlayer.setReducedDebug(entityplayersp.hasReducedDebug());

    if (this.currentScreen instanceof GuiGameOver)
    {
        this.displayGuiScreen((GuiScreen)null);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:35,代码来源:Minecraft.java

示例9: setDimensionAndSpawnPlayer

import net.minecraft.client.gui.GuiGameOver; //导入依赖的package包/类
public void setDimensionAndSpawnPlayer(int dimension) {
	this.theWorld.setInitialSpawnLocation();
	this.theWorld.removeAllEntities();
	int i = 0;
	String s = null;

	if (this.thePlayer != null) {
		i = this.thePlayer.getEntityId();
		this.theWorld.removeEntity(this.thePlayer);
		s = this.thePlayer.getClientBrand();
	}

	this.renderViewEntity = null;
	EntityPlayerSP entityplayersp = this.thePlayer;
	this.thePlayer = this.playerController.func_178892_a(this.theWorld,
			this.thePlayer == null ? new StatFileWriter() : this.thePlayer.getStatFileWriter());
	this.thePlayer.getDataWatcher().updateWatchedObjectsFromList(entityplayersp.getDataWatcher().getAllWatched());
	this.thePlayer.dimension = dimension;
	this.renderViewEntity = this.thePlayer;
	this.thePlayer.preparePlayerToSpawn();
	this.thePlayer.setClientBrand(s);
	this.theWorld.spawnEntityInWorld(this.thePlayer);
	this.playerController.flipPlayer(this.thePlayer);
	this.thePlayer.movementInput = new MovementInputFromOptions(this.gameSettings);
	this.thePlayer.setEntityId(i);
	this.playerController.setPlayerCapabilities(this.thePlayer);
	this.thePlayer.setReducedDebug(entityplayersp.hasReducedDebug());

	if (this.currentScreen instanceof GuiGameOver) {
		this.displayGuiScreen((GuiScreen) null);
	}
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:33,代码来源:Minecraft.java

示例10: handleCombatEvent

import net.minecraft.client.gui.GuiGameOver; //导入依赖的package包/类
public void handleCombatEvent(SPacketCombatEvent packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    if (packetIn.eventType == SPacketCombatEvent.Event.ENTITY_DIED)
    {
        Entity entity = this.clientWorldController.getEntityByID(packetIn.playerId);

        if (entity == this.gameController.player)
        {
            this.gameController.displayGuiScreen(new GuiGameOver(packetIn.deathMessage));
        }
    }
}
 
开发者ID:NSExceptional,项目名称:Zombe-Modpack,代码行数:15,代码来源:NetHandlerPlayClient.java

示例11: setDimensionAndSpawnPlayer

import net.minecraft.client.gui.GuiGameOver; //导入依赖的package包/类
public void setDimensionAndSpawnPlayer(int dimension)
{
    this.world.setInitialSpawnLocation();
    this.world.removeAllEntities();
    int i = 0;
    String s = null;

    if (this.player != null)
    {
        i = this.player.getEntityId();
        this.world.removeEntity(this.player);
        s = this.player.getServerBrand();
    }

    this.renderViewEntity = null;
    EntityPlayerSP entityplayersp = this.player;
    this.player = this.playerController.createClientPlayer(this.world, this.player == null ? new StatisticsManager() : this.player.getStatFileWriter());
    this.player.getDataManager().setEntryValues(entityplayersp.getDataManager().getAll());
    this.player.dimension = dimension;
    this.renderViewEntity = this.player;
    this.player.preparePlayerToSpawn();
    this.player.setServerBrand(s);
    this.world.spawnEntityInWorld(this.player);
    this.playerController.flipPlayer(this.player);
    this.player.movementInput = new MovementInputFromOptions(this.gameSettings);
    this.player.setEntityId(i);
    this.playerController.setPlayerCapabilities(this.player);
    this.player.setReducedDebug(entityplayersp.hasReducedDebug());

    if (this.currentScreen instanceof GuiGameOver)
    {
        this.displayGuiScreen((GuiScreen)null);
    }
}
 
开发者ID:NSExceptional,项目名称:Zombe-Modpack,代码行数:35,代码来源:Minecraft.java

示例12: handleCombatEvent

import net.minecraft.client.gui.GuiGameOver; //导入依赖的package包/类
public void handleCombatEvent(SPacketCombatEvent packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    if (packetIn.eventType == SPacketCombatEvent.Event.ENTITY_DIED)
    {
        Entity entity = this.clientWorldController.getEntityByID(packetIn.playerId);

        if (entity == this.gameController.thePlayer)
        {
            this.gameController.displayGuiScreen(new GuiGameOver(packetIn.deathMessage));
        }
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:15,代码来源:NetHandlerPlayClient.java

示例13: setDimensionAndSpawnPlayer

import net.minecraft.client.gui.GuiGameOver; //导入依赖的package包/类
public void setDimensionAndSpawnPlayer(int dimension)
{
    this.theWorld.setInitialSpawnLocation();
    this.theWorld.removeAllEntities();
    int i = 0;
    String s = null;

    if (this.thePlayer != null)
    {
        i = this.thePlayer.getEntityId();
        this.theWorld.removeEntity(this.thePlayer);
        s = this.thePlayer.getServerBrand();
    }

    this.renderViewEntity = null;
    EntityPlayerSP entityplayersp = this.thePlayer;
    this.thePlayer = this.playerController.createClientPlayer(this.theWorld, this.thePlayer == null ? new StatisticsManager() : this.thePlayer.getStatFileWriter());
    this.thePlayer.getDataManager().setEntryValues(entityplayersp.getDataManager().getAll());
    this.thePlayer.dimension = dimension;
    this.renderViewEntity = this.thePlayer;
    this.thePlayer.preparePlayerToSpawn();
    this.thePlayer.setServerBrand(s);
    this.theWorld.spawnEntityInWorld(this.thePlayer);
    this.playerController.flipPlayer(this.thePlayer);
    this.thePlayer.movementInput = new MovementInputFromOptions(this.gameSettings);
    this.thePlayer.setEntityId(i);
    this.playerController.setPlayerCapabilities(this.thePlayer);
    this.thePlayer.setReducedDebug(entityplayersp.hasReducedDebug());

    if (this.currentScreen instanceof GuiGameOver)
    {
        this.displayGuiScreen((GuiScreen)null);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:35,代码来源:Minecraft.java

示例14: onPlayerDeathImage

import net.minecraft.client.gui.GuiGameOver; //导入依赖的package包/类
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void onPlayerDeathImage(GuiOpenEvent e)
{
    EntityPlayer player = Minecraft.getMinecraft().thePlayer;

    if (!(e.getGui() instanceof GuiGameOver)
            || !Config.demiseImage
            || player == null
            || player.getHealth() <= 0F)
        return;

    // Getting discord and minecraft user
    try
    {
        User me = DiscordCE.client.getUserById(DiscordCE.client.getSelfInfo().getId());
        Minecraft mc = Minecraft.getMinecraft();
        ITextComponent t = ScreenShotHelper.saveScreenshot(mc.mcDataDir,
                mc.displayWidth,
                mc.displayHeight,
                mc.getFramebuffer());
        String fileName = new JSONObject(TextComponentBase.Serializer.componentToJson(t)).getJSONArray("with")
                .getJSONObject(0).getJSONObject("clickEvent").getString("value");
        File file = new File(fileName);
        TextChannel c = DiscordCE.client.getTextChannelById(Preferences.i.usingChannel);

        // Doing checks
        if (c == null || !c.checkPermission(me, Permission.MESSAGE_ATTACH_FILES))
            return;

        //Sending file
        c.sendFileAsync(file, null, m -> file.delete());
    }

    catch (Exception e1)
    {
        e1.printStackTrace();
    }
}
 
开发者ID:duke605,项目名称:DiscordCE,代码行数:40,代码来源:MinecraftEventHandler.java

示例15: DeathScreen

import net.minecraft.client.gui.GuiGameOver; //导入依赖的package包/类
public DeathScreen(GuiGameOver guiGamOver) {
    super();
    gameOver = guiGamOver;
    oldCursorStatus = CURSOR_STATUS;

    CURSOR_STATUS = CursorStatus.HIDDEN;
}
 
开发者ID:Tencao,项目名称:SAO-UI---1.8,代码行数:8,代码来源:DeathScreen.java


注:本文中的net.minecraft.client.gui.GuiGameOver类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。