Search in sources :

Example 56 with ChatComponentText

use of net.minecraft.util.ChatComponentText in project LogisticsPipes by RS485.

the class ClearCommand method executeCommand.

@Override
public void executeCommand(ICommandSender sender, String[] args) {
    if (args.length <= 0 || !args[0].equalsIgnoreCase("all")) {
        sender.addChatMessage(new ChatComponentText("%LPSTORESENDMESSAGE%"));
        sender.addChatMessage(new ChatComponentText("%LPCLEARCHAT%"));
        sender.addChatMessage(new ChatComponentText("%LPRESTORESENDMESSAGE%"));
    } else {
        sender.addChatMessage(new ChatComponentText("%LPCLEARCHAT%"));
    }
}
Also used : ChatComponentText(net.minecraft.util.ChatComponentText)

Example 57 with ChatComponentText

use of net.minecraft.util.ChatComponentText in project LogisticsPipes by RS485.

the class NameLookupCommand method executeCommand.

@Override
public void executeCommand(ICommandSender sender, String[] args) {
    if (args.length < 2) {
        throw new MissingArgumentException();
    }
    String idString = args[0];
    String metaString = args[1];
    int id = Integer.valueOf(idString);
    int meta = Integer.valueOf(metaString);
    ItemIdentifier item = ItemIdentifier.get(Item.getItemById(id), meta, null);
    sender.addChatMessage(new ChatComponentText("Name: " + item.getFriendlyNameCC()));
}
Also used : ItemIdentifier(logisticspipes.utils.item.ItemIdentifier) MissingArgumentException(logisticspipes.commands.exception.MissingArgumentException) ChatComponentText(net.minecraft.util.ChatComponentText)

Example 58 with ChatComponentText

use of net.minecraft.util.ChatComponentText in project LogisticsPipes by RS485.

the class TransferNamesCommand method executeCommand.

@Override
public void executeCommand(ICommandSender sender, String[] args) {
    sender.addChatMessage(new ChatComponentText("Requesting Transfer"));
    MainProxy.sendPacketToPlayer(PacketHandler.getPacket(RequestUpdateNamesPacket.class), (EntityPlayer) sender);
    MainProxy.proxy.sendNameUpdateRequest((EntityPlayer) sender);
}
Also used : RequestUpdateNamesPacket(logisticspipes.network.packets.RequestUpdateNamesPacket) ChatComponentText(net.minecraft.util.ChatComponentText)

Example 59 with ChatComponentText

use of net.minecraft.util.ChatComponentText in project LogisticsPipes by RS485.

the class VersionCommand method executeCommand.

@Override
public void executeCommand(ICommandSender sender, String[] args) {
    sender.addChatMessage(new ChatComponentText(String.format("LogisticsPipes %s for Minecraft %s.", LogisticsPipes.class.getAnnotation(Mod.class).version(), LPConstants.MCVersion)));
    VersionChecker versionChecker = LogisticsPipes.versionChecker;
    sender.addChatMessage(new ChatComponentText(versionChecker.getVersionCheckerStatus()));
    if (versionChecker.isVersionCheckDone() && versionChecker.getVersionInfo().isNewVersionAvailable()) {
        sender.addChatMessage(new ChatComponentText("Use \"/logisticspipes changelog\" to see a changelog."));
    }
}
Also used : VersionChecker(logisticspipes.ticks.VersionChecker) ChatComponentText(net.minecraft.util.ChatComponentText)

Example 60 with ChatComponentText

use of net.minecraft.util.ChatComponentText in project LogisticsPipes by RS485.

the class PipeDebugLogResponse method processPacket.

@Override
public void processPacket(EntityPlayer player) {
    LogisticsTileGenericPipe tile = this.getPipe(player.getEntityWorld());
    if (tile != null) {
        ((CoreRoutedPipe) tile.pipe).debug.openForPlayer(player);
        player.addChatComponentMessage(new ChatComponentText("Debug log enabled."));
    }
}
Also used : LogisticsTileGenericPipe(logisticspipes.pipes.basic.LogisticsTileGenericPipe) ChatComponentText(net.minecraft.util.ChatComponentText)

Aggregations

ChatComponentText (net.minecraft.util.ChatComponentText)108 EntityPlayer (net.minecraft.entity.player.EntityPlayer)19 ItemStack (net.minecraft.item.ItemStack)16 TileEntity (net.minecraft.tileentity.TileEntity)9 Entity (net.minecraft.entity.Entity)8 SubscribeEvent (cpw.mods.fml.common.eventhandler.SubscribeEvent)7 ArrayList (java.util.ArrayList)7 Block (net.minecraft.block.Block)6 AMVector3 (am2.api.math.AMVector3)4 AccessGroup (com.builtbroken.mc.framework.access.AccessGroup)4 Pos (com.builtbroken.mc.imp.transform.vector.Pos)4 OpenChatGui (logisticspipes.network.packets.gui.OpenChatGui)4 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)4 ChatStyle (net.minecraft.util.ChatStyle)4 IPowerNode (am2.api.power.IPowerNode)3 IItemActivationListener (com.builtbroken.mc.api.items.listeners.IItemActivationListener)3 IItemEventListener (com.builtbroken.mc.api.items.listeners.IItemEventListener)3 AbstractCommand (com.builtbroken.mc.core.commands.prefab.AbstractCommand)3 ItemListenerIterator (com.builtbroken.mc.prefab.items.listeners.ItemListenerIterator)3 EntityLivingBase (net.minecraft.entity.EntityLivingBase)3