Fixed uncommon error in the Seer and Divination sigils.
This commit is contained in:
parent
69eb621fc8
commit
c6b446faf9
|
@ -1,6 +1,8 @@
|
|||
package WayofTime.bloodmagic.item.sigil;
|
||||
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
@ -11,15 +13,12 @@ import net.minecraft.world.World;
|
|||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.altar.IBloodAltar;
|
||||
import WayofTime.bloodmagic.api.iface.IAltarReader;
|
||||
import WayofTime.bloodmagic.api.util.helper.BindableHelper;
|
||||
import WayofTime.bloodmagic.api.util.helper.NetworkHelper;
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
import WayofTime.bloodmagic.tile.TileIncenseAltar;
|
||||
import WayofTime.bloodmagic.util.ChatUtil;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemSigilDivination extends ItemSigilBase implements IAltarReader
|
||||
{
|
||||
public ItemSigilDivination()
|
||||
|
@ -36,10 +35,11 @@ public class ItemSigilDivination extends ItemSigilBase implements IAltarReader
|
|||
if (!world.isRemote)
|
||||
{
|
||||
MovingObjectPosition position = getMovingObjectPositionFromPlayer(world, player, false);
|
||||
int currentEssence = NetworkHelper.getSoulNetwork(getOwnerUUID(stack)).getCurrentEssence();
|
||||
|
||||
if (position == null)
|
||||
{
|
||||
int currentEssence = NetworkHelper.getSoulNetwork(getOwnerUUID(stack)).getCurrentEssence();
|
||||
|
||||
List<IChatComponent> toSend = new ArrayList<IChatComponent>();
|
||||
if (!getOwnerName(stack).equals(PlayerHelper.getUsernameFromPlayer(player)))
|
||||
toSend.add(new ChatComponentText(TextHelper.localize(tooltipBase + "otherNetwork", getOwnerName(stack))));
|
||||
|
@ -56,7 +56,7 @@ public class ItemSigilDivination extends ItemSigilBase implements IAltarReader
|
|||
{
|
||||
IBloodAltar altar = (IBloodAltar) tile;
|
||||
int tier = altar.getTier().ordinal() + 1;
|
||||
currentEssence = altar.getCurrentBlood();
|
||||
int currentEssence = altar.getCurrentBlood();
|
||||
int capacity = altar.getCapacity();
|
||||
altar.checkTier();
|
||||
ChatUtil.sendNoSpam(player, TextHelper.localize(tooltipBase + "currentAltarTier", tier), TextHelper.localize(tooltipBase + "currentEssence", currentEssence), TextHelper.localize(tooltipBase + "currentAltarCapacity", capacity));
|
||||
|
@ -68,6 +68,7 @@ public class ItemSigilDivination extends ItemSigilBase implements IAltarReader
|
|||
ChatUtil.sendNoSpam(player, TextHelper.localize(tooltipBase + "currentTranquility", (int) ((100D * (int) (100 * tranquility)) / 100d)), TextHelper.localize(tooltipBase + "currentBonus", (int) (100 * altar.incenseAddition)));
|
||||
} else
|
||||
{
|
||||
int currentEssence = NetworkHelper.getSoulNetwork(getOwnerUUID(stack)).getCurrentEssence();
|
||||
ChatUtil.sendNoSpam(player, TextHelper.localize(tooltipBase + "currentEssence", currentEssence));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package WayofTime.bloodmagic.item.sigil;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -8,9 +7,9 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.altar.IBloodAltar;
|
||||
import WayofTime.bloodmagic.api.iface.IAltarReader;
|
||||
import WayofTime.bloodmagic.api.util.helper.BindableHelper;
|
||||
import WayofTime.bloodmagic.api.util.helper.NetworkHelper;
|
||||
import WayofTime.bloodmagic.tile.TileIncenseAltar;
|
||||
import WayofTime.bloodmagic.util.ChatUtil;
|
||||
|
@ -32,10 +31,10 @@ public class ItemSigilSeer extends ItemSigilBase implements IAltarReader
|
|||
if (!world.isRemote)
|
||||
{
|
||||
MovingObjectPosition position = getMovingObjectPositionFromPlayer(world, player, false);
|
||||
int currentEssence = NetworkHelper.getSoulNetwork(getOwnerUUID(stack)).getCurrentEssence();
|
||||
|
||||
if (position == null)
|
||||
{
|
||||
int currentEssence = NetworkHelper.getSoulNetwork(getOwnerUUID(stack)).getCurrentEssence();
|
||||
ChatUtil.sendNoSpam(player, new ChatComponentText(TextHelper.localize(tooltipBase + "currentEssence", currentEssence)));
|
||||
return stack;
|
||||
} else
|
||||
|
@ -49,7 +48,7 @@ public class ItemSigilSeer extends ItemSigilBase implements IAltarReader
|
|||
{
|
||||
IBloodAltar altar = (IBloodAltar) tile;
|
||||
int tier = altar.getTier().ordinal() + 1;
|
||||
currentEssence = altar.getCurrentBlood();
|
||||
int currentEssence = altar.getCurrentBlood();
|
||||
int capacity = altar.getCapacity();
|
||||
int charge = altar.getTotalCharge();
|
||||
altar.checkTier();
|
||||
|
@ -73,6 +72,7 @@ public class ItemSigilSeer extends ItemSigilBase implements IAltarReader
|
|||
ChatUtil.sendNoSpam(player, TextHelper.localize(tooltipBase + "currentTranquility", ((int) (100 * tranquility)) / 100d), TextHelper.localize(tooltipBase + "currentBonus", (int) (100 * altar.incenseAddition)));
|
||||
} else
|
||||
{
|
||||
int currentEssence = NetworkHelper.getSoulNetwork(getOwnerUUID(stack)).getCurrentEssence();
|
||||
ChatUtil.sendNoSpam(player, TextHelper.localize(tooltipBase + "currentEssence", currentEssence));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue