mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-18 19:29:34 +00:00
Make a generic method in order to remove tons of duplicate code that adds an item's owner and its active state to the tooltip.
This commit is contained in:
1 parent
ead07b752b
commit
aad613b221
42 files changed
+74
-408
No files matched your search
@@ -1,4 +1,33 @@
|
||||
package WayofTime.alchemicalWizardry.api.items.interfaces;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public interface IBindable {
|
||||
default void addBindingInformation(ItemStack par1ItemStack, List par3List) {
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
if (!(itemTag == null)) {
|
||||
if (itemTag.getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else if (itemTag.hasKey("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
if (!itemTag.getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ itemTag.getString("ownerName"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -92,11 +92,7 @@ public class ActivationCrystal extends EnergyItems {
|
||||
}
|
||||
}
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -113,7 +109,7 @@ public class ActivationCrystal extends EnergyItems {
|
||||
public String getUnlocalizedName(ItemStack itemStack) {
|
||||
// This is what will do all the localisation things on the alchemy components so you dont have to set it :D
|
||||
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ACTIVATION_CRYSTAL_NAMES.length - 1);
|
||||
return ("" + "item.activationCrystal" + ACTIVATION_CRYSTAL_NAMES[meta]);
|
||||
return ("item.activationCrystal" + ACTIVATION_CRYSTAL_NAMES[meta]);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -37,18 +37,7 @@ public class ArmourInhibitor extends EnergyItems {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.armorinhibitor.desc1"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.armorinhibitor.desc2"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -33,16 +33,11 @@ public class BlankSpell extends EnergyItems {
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.blankspell.desc"));
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.alchemy.coords") + " "
|
||||
+ itemTag.getInteger("xCoord")
|
||||
|
||||
@@ -62,20 +62,7 @@ public class BoundAxe extends ItemAxe implements IBindable {
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.boundaxe.desc"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -64,20 +64,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.boundpickaxe.desc1"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.boundpickaxe.desc2"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -64,20 +64,7 @@ public class BoundShovel extends ItemSpade implements IBindable {
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.boundshovel.desc"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -39,12 +39,7 @@ public class CheatyItem extends Item implements IBindable {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.mode.creative"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.cheatyitem.desc1"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.cheatyitem.desc2"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
|
||||
+1
-6
@@ -27,16 +27,11 @@ public class DemonicTelepositionFocus extends TelepositionFocus {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.demonictelepfocus.desc1"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.demonictelepfocus.desc2"));
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.alchemy.coords") + " "
|
||||
+ itemTag.getInteger("xCoord")
|
||||
|
||||
@@ -43,11 +43,7 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.energybattery.desc"));
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
|
||||
@@ -204,45 +204,6 @@ public class EnergyBazooka extends EnergyItems {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.energybazooka.desc"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.alchemy.damage") + " " + this.damage);
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setActivated(ItemStack par1ItemStack, boolean newActivated) {
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
par1ItemStack.getTagCompound().setBoolean("isActive", newActivated);
|
||||
}
|
||||
|
||||
public boolean getActivated(ItemStack par1ItemStack) {
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
return par1ItemStack.getTagCompound().getBoolean("isActive");
|
||||
}
|
||||
|
||||
public void setDelay(ItemStack par1ItemStack, int newDelay) {
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
par1ItemStack.getTagCompound().setInteger("delay", newDelay);
|
||||
}
|
||||
|
||||
public int getDelay(ItemStack par1ItemStack) {
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
return par1ItemStack.getTagCompound().getInteger("delay");
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
}
|
||||
@@ -191,45 +191,6 @@ public class EnergyBlast extends EnergyItems {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.energyblast.desc1"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.energyblast.desc2"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.alchemy.damage") + " " + this.damage);
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setActivated(ItemStack par1ItemStack, boolean newActivated) {
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
par1ItemStack.getTagCompound().setBoolean("isActive", newActivated);
|
||||
}
|
||||
|
||||
public boolean getActivated(ItemStack par1ItemStack) {
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
return par1ItemStack.getTagCompound().getBoolean("isActive");
|
||||
}
|
||||
|
||||
public void setDelay(ItemStack par1ItemStack, int newDelay) {
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
par1ItemStack.getTagCompound().setInteger("delay", newDelay);
|
||||
}
|
||||
|
||||
public int getDelay(ItemStack par1ItemStack) {
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
return par1ItemStack.getTagCompound().getInteger("delay");
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
}
|
||||
@@ -19,12 +19,13 @@ import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm;
|
||||
import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class EnergySword extends ItemSword {
|
||||
public class EnergySword extends ItemSword implements IBindable {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIcon;
|
||||
@@ -180,20 +181,7 @@ public class EnergySword extends ItemSword {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.caution.desc1"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.caution.desc2"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-6
@@ -26,16 +26,11 @@ public class EnhancedTelepositionFocus extends TelepositionFocus {
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.enhancedtelepfocus.desc"));
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.alchemy.coords") + " "
|
||||
+ itemTag.getInteger("xCoord")
|
||||
|
||||
+1
-6
@@ -33,16 +33,11 @@ public class ItemComplexSpellCrystal extends EnergyItems {
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.complexspellcrystal.desc"));
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.alchemy.coords") + " "
|
||||
+ itemTag.getInteger("xCoord")
|
||||
|
||||
@@ -38,11 +38,7 @@ public class ItemDiabloKey extends EnergyItems {
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.diablokey.desc"));
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
|
||||
@@ -36,9 +36,7 @@ public class ItemRitualDismantler extends EnergyItems {
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List par3List, boolean x) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.dismatler.desc"));
|
||||
if (stack.hasTagCompound()) par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ stack.getTagCompound().getString("ownerName"));
|
||||
addBindingInformation(stack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -74,9 +74,7 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner {
|
||||
if (!(stack.getTagCompound() == null)) {
|
||||
String ritualID = this.getCurrentRitual(stack);
|
||||
// TODO
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ stack.getTagCompound().getString("ownerName"));
|
||||
addBindingInformation(stack, par3List);
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.alchemy.ritualid") + " " + ritualID);
|
||||
List<RitualComponent> ritualList = Rituals.getRitualList(this.getCurrentRitual(stack));
|
||||
if (ritualList == null) {
|
||||
|
||||
@@ -60,12 +60,7 @@ public class LavaCrystal extends EnergyItems {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.lavacrystal.desc1"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.lavacrystal.desc2"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
public boolean hasEnoughEssence(ItemStack itemStack) {
|
||||
|
||||
+1
-6
@@ -27,16 +27,11 @@ public class ReinforcedTelepositionFocus extends TelepositionFocus {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.reinforcedtelepfocus.desc1"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.reinforcedtelepfocus.desc2"));
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.alchemy.coords") + " "
|
||||
+ itemTag.getInteger("xCoord")
|
||||
|
||||
@@ -34,16 +34,11 @@ public class TelepositionFocus extends EnergyItems {
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.telepositionfocus.desc"));
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.alchemy.coords") + " "
|
||||
+ itemTag.getInteger("xCoord")
|
||||
|
||||
@@ -275,14 +275,9 @@ public class BoundArmour extends ItemArmor
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.boundarmor.devprotect"));
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
|
||||
ItemStack[] inv = getInternalInventory(par1ItemStack);
|
||||
|
||||
if (inv == null) {
|
||||
|
||||
@@ -30,12 +30,7 @@ public class SigilAir extends EnergyItems implements ArmourUpgrade, ISigil {
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.airsigil.desc"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -33,12 +33,7 @@ public class SigilBloodLight extends EnergyItems implements IHolding, ArmourUpgr
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.bloodlightsigil.desc"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -45,12 +45,7 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.divinationsigil.desc1"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.divinationsigil.desc2"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -38,18 +38,7 @@ public class SigilHarvest extends EnergyItems implements IHolding, ArmourUpgrade
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.harvestsigil.desc"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -62,12 +62,7 @@ public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.lavasigil.desc1"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.lavasigil.desc2"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-12
@@ -38,18 +38,7 @@ public class SigilOfElementalAffinity extends EnergyItems implements ISigil {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigilofelementalaffinity.desc1"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigilofelementalaffinity.desc2"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-12
@@ -39,18 +39,7 @@ public class SigilOfEnderSeverance extends EnergyItems implements IHolding, ISig
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigilofenderseverance.desc"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -45,18 +45,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigilofgrowth.desc1"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigilofgrowth.desc2"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -37,18 +37,7 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade, ISigil {
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigilofhaste.desc"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-12
@@ -42,18 +42,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHol
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigilofmagnetism.desc"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-12
@@ -44,18 +44,7 @@ public class SigilOfSupression extends EnergyItems implements ArmourUpgrade, ISi
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigilofsupression.desc"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-6
@@ -62,12 +62,7 @@ public class SigilOfTheAssassin extends EnergyItems implements ArmourUpgrade, IS
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigiloftheassassin.desc"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-12
@@ -43,18 +43,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade, ISig
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigilofthebridge.desc1"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigilofthebridge.desc2"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-12
@@ -38,18 +38,7 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade, I
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigilofthefastminer.desc"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -37,18 +37,7 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade, ISigil {
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigilofwind.desc"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -39,18 +39,7 @@ public class SigilPackRat extends EnergyItems implements IHolding, ArmourUpgrade
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.packratsigil.desc"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -35,12 +35,7 @@ public class SigilSeer extends Item implements IHolding, ArmourUpgrade, ISigil {
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.seersigil.desc"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -43,12 +43,7 @@ public class SigilVoid extends ItemBucket implements ArmourUpgrade, ISigil {
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.voidsigil.desc"));
|
||||
|
||||
if (!(stack.getTagCompound() == null)) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ stack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(stack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -60,12 +60,7 @@ public class SigilWater extends ItemBucket implements ArmourUpgrade, ISigil {
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.watersigil.desc"));
|
||||
|
||||
if (!(stack.getTagCompound() == null)) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ stack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(stack, par3List);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-3
@@ -60,9 +60,8 @@ public class SigilOfHolding extends EnergyItems {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigilofholding.desc"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
|
||||
ItemStack[] inv = getInternalInventory(par1ItemStack);
|
||||
|
||||
if (inv == null) {
|
||||
|
||||
Reference in new issue
Block a user