Inform players if they are not using their Divination sigil
Should lower the amount of "why isn't my network filling?" questions.
This commit is contained in:
parent
10b58ee7ad
commit
ca64ecfc66
|
@ -1,9 +1,11 @@
|
||||||
package WayofTime.bloodmagic.item.sigil;
|
package WayofTime.bloodmagic.item.sigil;
|
||||||
|
|
||||||
|
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.ChatComponentText;
|
import net.minecraft.util.ChatComponentText;
|
||||||
|
import net.minecraft.util.IChatComponent;
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import WayofTime.bloodmagic.api.Constants;
|
import WayofTime.bloodmagic.api.Constants;
|
||||||
|
@ -15,6 +17,9 @@ import WayofTime.bloodmagic.tile.TileIncenseAltar;
|
||||||
import WayofTime.bloodmagic.util.ChatUtil;
|
import WayofTime.bloodmagic.util.ChatUtil;
|
||||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class ItemSigilDivination extends ItemSigilBase implements IAltarReader
|
public class ItemSigilDivination extends ItemSigilBase implements IAltarReader
|
||||||
{
|
{
|
||||||
public ItemSigilDivination()
|
public ItemSigilDivination()
|
||||||
|
@ -35,7 +40,11 @@ public class ItemSigilDivination extends ItemSigilBase implements IAltarReader
|
||||||
|
|
||||||
if (position == null)
|
if (position == null)
|
||||||
{
|
{
|
||||||
ChatUtil.sendNoSpam(player, new ChatComponentText(TextHelper.localize(tooltipBase + "currentEssence", currentEssence)));
|
List<IChatComponent> toSend = new ArrayList<IChatComponent>();
|
||||||
|
if (!getOwnerName(stack).equals(PlayerHelper.getUsernameFromPlayer(player)))
|
||||||
|
toSend.add(new ChatComponentText(TextHelper.localize(tooltipBase + "otherNetwork", getOwnerName(stack))));
|
||||||
|
toSend.add(new ChatComponentText(TextHelper.localize(tooltipBase + "currentEssence", currentEssence)));
|
||||||
|
ChatUtil.sendNoSpam(player, toSend.toArray(new IChatComponent[toSend.size()]));
|
||||||
return stack;
|
return stack;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
|
|
@ -199,6 +199,7 @@ tooltip.BloodMagic.sigil.air.desc=&oI feel lighter already...
|
||||||
tooltip.BloodMagic.sigil.bloodLight.desc=&oI see a light!
|
tooltip.BloodMagic.sigil.bloodLight.desc=&oI see a light!
|
||||||
tooltip.BloodMagic.sigil.compression.desc=&oHands of diamonds
|
tooltip.BloodMagic.sigil.compression.desc=&oHands of diamonds
|
||||||
tooltip.BloodMagic.sigil.divination.desc=&oPeer into the soul
|
tooltip.BloodMagic.sigil.divination.desc=&oPeer into the soul
|
||||||
|
tooltip.BloodMagic.sigil.divination.otherNetwork=Peering into the soul of %s
|
||||||
tooltip.BloodMagic.sigil.divination.currentAltarTier=Current Tier: %d
|
tooltip.BloodMagic.sigil.divination.currentAltarTier=Current Tier: %d
|
||||||
tooltip.BloodMagic.sigil.divination.currentEssence=Current Essence: %,d LP
|
tooltip.BloodMagic.sigil.divination.currentEssence=Current Essence: %,d LP
|
||||||
tooltip.BloodMagic.sigil.divination.currentAltarCapacity=Current Capacity: %,d LP
|
tooltip.BloodMagic.sigil.divination.currentAltarCapacity=Current Capacity: %,d LP
|
||||||
|
|
Loading…
Reference in a new issue