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;
}
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) {
;
}
}
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;
}
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);
}
}
}
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;
}
Aggregations