Package net.minecraft.util

Examples of net.minecraft.util.ChatComponentTranslation


            sendMessage(player, s);
        }
    }

    private static void sendMessage(ICommandSender player, String message){
        player.addChatMessage(new ChatComponentTranslation(message));
    }
View Full Code Here


            changingKeybinding = false;
            updateKeybindingButtonText();

            HUDHandler.instance().keybindOpenOptions.setKeyCode(key);
            KeyBinding.resetKeyBindingArrayAndHash();
            FMLClientHandler.instance().getClient().thePlayer.addChatComponentMessage(new ChatComponentTranslation(EnumChatFormatting.GREEN + "Bound the opening of this menu to the '" + Keyboard.getKeyName(key) + "' key."));
        }
    }
View Full Code Here

        if(helmetModel == null) {
            helmetModel = AdvancedModelLoader.loadModel(Models.PNEUMATIC_HELMET);
            eyesModel = AdvancedModelLoader.loadModel(Models.PNEUMATIC_HELMET_EYES);
            faceModel = AdvancedModelLoader.loadModel(Models.PNEUMATIC_HELMET_FACE);
            if(!Config.useHelmetModel) {
                PneumaticCraft.proxy.getPlayer().addChatComponentMessage(new ChatComponentTranslation("message.date.ironman"));
            }
        }

        GL11.glDisable(GL11.GL_TEXTURE_2D);
        GL11.glColor4d(1, 0.2, 0.2, 1);
View Full Code Here

    }

    @Override
    public boolean onItemUse(ItemStack IStack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10){
        setGPSLocation(IStack, x, y, z);
        if(!world.isRemote) player.addChatComponentMessage(new ChatComponentTranslation(EnumChatFormatting.GREEN + "[GPS Tool] Set Coordinates to " + x + ", " + y + ", " + z + "."));
        return true; // we don't want to use the item.

    }
View Full Code Here

    public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player){
        if(world.isRemote) {
            if(getGPSLocation(stack) != null) {
                FMLCommonHandler.instance().showGuiScreen(new GuiGPSTool(getGPSLocation(stack)));
            } else {
                player.addChatComponentMessage(new ChatComponentTranslation(EnumChatFormatting.GREEN + "[GPS Tool] First you'll have to select a coordinate before you can alter it."));
            }
        }
        return stack;
    }
View Full Code Here

                machine.getAirHandler().printManometerMessage(player, curInfo);
            }
            if(curInfo.size() > 0) {
                ((IPressurizable)iStack.getItem()).addAir(iStack, -30);
                for(String s : curInfo) {
                    player.addChatComponentMessage(new ChatComponentTranslation(s));
                }
                return true;
            }
        } else {
            player.addChatComponentMessage(new ChatComponentTranslation(EnumChatFormatting.RED + "The Manometer doesn't have any charge!"));
            return false;
        }
        return false;
    }
View Full Code Here

                    List<String> curInfo = new ArrayList<String>();
                    ((IManoMeasurable)entity).printManometerMessage(player, curInfo);
                    if(curInfo.size() > 0) {
                        ((IPressurizable)iStack.getItem()).addAir(iStack, -30);
                        for(String s : curInfo) {
                            player.addChatComponentMessage(new ChatComponentTranslation(s));
                        }
                        return true;
                    }
                } else {
                    player.addChatComponentMessage(new ChatComponentTranslation(EnumChatFormatting.RED + "The Manometer doesn't have any charge!"));
                }
            }
        }
        return false;
    }
View Full Code Here

        if(event.action != PlayerInteractEvent.Action.RIGHT_CLICK_AIR && event.world != null && !event.world.isRemote) {
            if(event.entity.worldObj.getBlock(event.x, event.y, event.z) != Blockss.securityStation || event.action == PlayerInteractEvent.Action.LEFT_CLICK_BLOCK) {
                int blockingStations = PneumaticCraftUtils.getProtectingSecurityStations(event.entity.worldObj, event.x, event.y, event.z, event.entityPlayer, true);
                if(blockingStations > 0) {
                    event.setCanceled(true);
                    event.entityPlayer.addChatComponentMessage(new ChatComponentTranslation(EnumChatFormatting.RED + "Access is prevented by " + blockingStations + " Security Station(s)."));
                }
            }
        }
    }
View Full Code Here

public class CraftingHandler{

    @SubscribeEvent
    public void onCrafting(PlayerEvent.ItemCraftedEvent event){
        if(event.player != null && !event.player.worldObj.isRemote && event.crafting != null && (event.crafting.getItem() == Itemss.assemblyProgram && event.crafting.getItemDamage() < 2 || event.crafting.getItem() == Itemss.PCBBlueprint) && ((EntityPlayerMP)event.player).playerNetServerHandler != null) {
            event.player.addChatComponentMessage(new ChatComponentTranslation("[PneumaticCraft] Bear in mind that this crafting recipe is temporary. Once I give Mechanics (PneumaticCraft Villagers)" + " a place to live, I'll remove this crafting recipe and you'll only be able to obtain this item via trading! (Ab)use it while you can."));
        }
    }
View Full Code Here

                TileEntitySecurityStation te = (TileEntitySecurityStation)world.getTileEntity(x, y, z);
                if(te != null) {
                    if(te.isPlayerOnWhiteList(player)) {
                        player.openGui(PneumaticCraft.instance, CommonProxy.GUI_ID_SECURITY_STATION_INVENTORY, world, x, y, z);
                    } else if(!te.hasValidNetwork()) {
                        player.addChatComponentMessage(new ChatComponentTranslation(EnumChatFormatting.GREEN + "This Security Station is out of order: Its network hasn't been properly configured."));
                    } else if(te.hasPlayerHacked(player)) {
                        player.addChatComponentMessage(new ChatComponentTranslation(EnumChatFormatting.GREEN + "You've already hacked this Security Station!"));
                    } else if(getPlayerHackLevel(player) < te.getSecurityLevel()) {
                        player.addChatComponentMessage(new ChatComponentTranslation(EnumChatFormatting.RED + "You can't access or hack this Security Station. To hack it you need at least a Pneumatic Helmet upgraded with " + te.getSecurityLevel() + " Security upgrade(s)."));
                    } else {
                        player.openGui(PneumaticCraft.instance, CommonProxy.GUI_ID_HACKING, world, x, y, z);
                    }
                }
            }
View Full Code Here

TOP

Related Classes of net.minecraft.util.ChatComponentTranslation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.