Search in sources :

Example 61 with ChatComponentText

use of v1_8_9.net.minecraft.util.ChatComponentText in project Tale-of-Kingdoms by Ivasik78.

the class EntityDefendBandit method interact.

public boolean interact(EntityPlayer entityplayer) {
    if (!this.follow) {
        this.follow = true;
        if (!worldObj.isRemote) {
            entityplayer.addChatMessage(new ChatComponentText("Bandit: I will follow you."));
        }
        this.defend.setDead();
        this.createdMarker = false;
    } else {
        this.follow = false;
        if (!worldObj.isRemote) {
            entityplayer.addChatMessage(new ChatComponentText("Bandit: I will guard this area."));
        }
    }
    return true;
}
Also used : ChatComponentText(net.minecraft.util.ChatComponentText)

Example 62 with ChatComponentText

use of v1_8_9.net.minecraft.util.ChatComponentText in project Tale-of-Kingdoms by Ivasik78.

the class GuiLibrary method actionPerformed.

@Override
protected void actionPerformed(GuiButton guibutton) {
    if (guibutton.id == 1) {
        if (this.get.studied) {
            if (!this.world.isRemote) {
                this.world.spawnEntityInWorld(new EntityXPOrb(this.world, this.player.posX, this.player.posY, this.player.posZ, 150));
                this.player.addChatMessage(new ChatComponentText("You have gained experience."));
            }
            this.get.studied = false;
        } else if (!this.world.isRemote) {
            this.player.addChatMessage(new ChatComponentText("You have already studied for a while, go back in a few moments"));
        }
        this.goldchecker = false;
    }
    if (guibutton.id == 2) {
        if (500 + playerProvider.libraryInvestment * 2 <= playerProvider.getGoldTotal()) {
            playerProvider.libraryInvestment += 5;
            if (!this.world.isRemote) {
                this.player.addChatMessage(new ChatComponentText("Tax is now increased by " + playerProvider.libraryInvestment + " gold per house."));
            }
            playerProvider.decreaseGold(500 + playerProvider.libraryInvestment * 2);
        } else {
            this.goldchecker = true;
        }
    }
    if (guibutton.id == 3) {
        this.mc.displayGuiScreen(null);
        this.goldchecker = false;
    }
    if (guibutton.id == 4) {
        ;
    }
}
Also used : ChatComponentText(net.minecraft.util.ChatComponentText) EntityXPOrb(net.minecraft.entity.item.EntityXPOrb)

Example 63 with ChatComponentText

use of v1_8_9.net.minecraft.util.ChatComponentText in project Tale-of-Kingdoms by Ivasik78.

the class EntityDefendPaladin method interact.

public boolean interact(EntityPlayer entityplayer) {
    if (!this.follow) {
        this.follow = true;
        if (!this.worldObj.isRemote) {
            entityplayer.addChatMessage(new ChatComponentText("Paladin: I will follow you."));
        }
        this.defend.setDead();
        this.createdMarker = false;
    } else {
        this.follow = false;
        if (!this.worldObj.isRemote) {
            entityplayer.addChatMessage(new ChatComponentText("Paladin:I will guard this area."));
        }
    }
    return true;
}
Also used : ChatComponentText(net.minecraft.util.ChatComponentText)

Example 64 with ChatComponentText

use of v1_8_9.net.minecraft.util.ChatComponentText in project Tale-of-Kingdoms by Ivasik78.

the class EntityGuildMember method onDeath.

@Override
public void onDeath(DamageSource damagesource) {
    if (!worldObj.isRemote) {
        if (this.fight && this.player != null) {
            PlayerProvider.get(player).addGlory(50);
            this.player.addChatMessage(new ChatComponentText("Guild Member: Your a good fighter my friend, I will let the guild master know of your strength."));
            this.fight = false;
            counter = 0;
            this.setAIMoveSpeed(0.5F);
            Entity entity = UltimateHelper.INSTANCE.getEntity("GuildMember", worldObj);
            entity.setLocationAndAngles(player.posX + 2, player.posY, player.posZ + 2, 0, 0);
            worldObj.spawnEntityInWorld(entity);
        }
    }
}
Also used : Entity(net.minecraft.entity.Entity) ChatComponentText(net.minecraft.util.ChatComponentText)

Example 65 with ChatComponentText

use of v1_8_9.net.minecraft.util.ChatComponentText in project Tale-of-Kingdoms by Ivasik78.

the class EntityGuildMember method interact.

@Override
public boolean interact(EntityPlayer entityplayer) {
    this.player = entityplayer;
    if (ended) {
        ItemStack itemstack = entityplayer.getHeldItem();
        if (itemstack != null) {
            if (itemstack.getItem() == Items.wooden_sword) {
                defaultHeldItem = new ItemStack(Items.wooden_sword, 1);
                this.swingItem();
                if (!worldObj.isRemote) {
                    entityplayer.addChatMessage(new ChatComponentText("Guild Member: Get Ready."));
                }
                this.fight = true;
            } else if (!worldObj.isRemote) {
                entityplayer.addChatMessage(new ChatComponentText("Guild Member: Greetings. You seem like a tough fighter. Give me a wooden sword and lets have a sparing match!"));
            }
        } else if (!worldObj.isRemote) {
            entityplayer.addChatMessage(new ChatComponentText("Guild Member: Greetings. You seem like a tough fighter. Give me a wooden sword and lets have a sparing match!"));
        }
    } else if (!worldObj.isRemote) {
        entityplayer.addChatMessage(new ChatComponentText("Guild Member: Damn this Reficules"));
    }
    return true;
}
Also used : ItemStack(net.minecraft.item.ItemStack) ChatComponentText(net.minecraft.util.ChatComponentText)

Aggregations

ChatComponentText (net.minecraft.util.ChatComponentText)383 IChatComponent (net.minecraft.util.IChatComponent)55 EntityPlayer (net.minecraft.entity.player.EntityPlayer)43 ChatStyle (net.minecraft.util.ChatStyle)39 ItemStack (net.minecraft.item.ItemStack)36 ClickEvent (net.minecraft.event.ClickEvent)31 World (net.minecraft.world.World)28 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)26 TileEntity (net.minecraft.tileentity.TileEntity)25 ChatComponentTranslation (net.minecraft.util.ChatComponentTranslation)25 HoverEvent (net.minecraft.event.HoverEvent)23 EntityPlayerMP (net.minecraft.entity.player.EntityPlayerMP)21 ArrayList (java.util.ArrayList)17 RfToolsDimensionManager (mcjty.rftools.dimension.RfToolsDimensionManager)16 Block (net.minecraft.block.Block)15 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)15 SubscribeEvent (cpw.mods.fml.common.eventhandler.SubscribeEvent)14 Entity (net.minecraft.entity.Entity)14 DimensionInformation (mcjty.rftools.dimension.DimensionInformation)13 File (java.io.File)12