Fixed formatting not working properly on servers.
This commit is contained in:
parent
d20ad198be
commit
be87a96a5f
|
@ -1,3 +1,8 @@
|
||||||
|
------------------------------------------------------
|
||||||
|
Version 2.0.0-29
|
||||||
|
------------------------------------------------------
|
||||||
|
- Fixed formatting not working properly on servers.
|
||||||
|
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
Version 2.0.0-28
|
Version 2.0.0-28
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
|
|
|
@ -10,7 +10,7 @@ import net.minecraft.util.ActionResult;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
import net.minecraft.util.math.RayTraceResult;
|
import net.minecraft.util.math.RayTraceResult;
|
||||||
import net.minecraft.util.text.ITextComponent;
|
import net.minecraft.util.text.ITextComponent;
|
||||||
import net.minecraft.util.text.TextComponentString;
|
import net.minecraft.util.text.TextComponentTranslation;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import WayofTime.bloodmagic.api.Constants;
|
import WayofTime.bloodmagic.api.Constants;
|
||||||
import WayofTime.bloodmagic.api.altar.IBloodAltar;
|
import WayofTime.bloodmagic.api.altar.IBloodAltar;
|
||||||
|
@ -19,7 +19,6 @@ import WayofTime.bloodmagic.api.util.helper.NetworkHelper;
|
||||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||||
import WayofTime.bloodmagic.tile.TileIncenseAltar;
|
import WayofTime.bloodmagic.tile.TileIncenseAltar;
|
||||||
import WayofTime.bloodmagic.util.ChatUtil;
|
import WayofTime.bloodmagic.util.ChatUtil;
|
||||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
|
||||||
|
|
||||||
public class ItemSigilDivination extends ItemSigilBase implements IAltarReader
|
public class ItemSigilDivination extends ItemSigilBase implements IAltarReader
|
||||||
{
|
{
|
||||||
|
@ -35,16 +34,16 @@ public class ItemSigilDivination extends ItemSigilBase implements IAltarReader
|
||||||
if (!world.isRemote)
|
if (!world.isRemote)
|
||||||
{
|
{
|
||||||
super.onItemRightClick(stack, world, player, hand);
|
super.onItemRightClick(stack, world, player, hand);
|
||||||
|
|
||||||
RayTraceResult position = getMovingObjectPositionFromPlayer(world, player, false);
|
RayTraceResult position = getMovingObjectPositionFromPlayer(world, player, false);
|
||||||
|
|
||||||
if (position == null)
|
if (position == null)
|
||||||
{
|
{
|
||||||
int currentEssence = NetworkHelper.getSoulNetwork(getOwnerUUID(stack)).getCurrentEssence();
|
int currentEssence = NetworkHelper.getSoulNetwork(getOwnerUUID(stack)).getCurrentEssence();
|
||||||
System.out.println("Hai~");
|
|
||||||
List<ITextComponent> toSend = new ArrayList<ITextComponent>();
|
List<ITextComponent> toSend = new ArrayList<ITextComponent>();
|
||||||
if (!getOwnerName(stack).equals(PlayerHelper.getUsernameFromPlayer(player)))
|
if (!getOwnerName(stack).equals(PlayerHelper.getUsernameFromPlayer(player)))
|
||||||
toSend.add(new TextComponentString(TextHelper.localize(tooltipBase + "otherNetwork", getOwnerName(stack))));
|
toSend.add(new TextComponentTranslation(tooltipBase + "otherNetwork", getOwnerName(stack)));
|
||||||
toSend.add(new TextComponentString(TextHelper.localize(tooltipBase + "currentEssence", currentEssence)));
|
toSend.add(new TextComponentTranslation(tooltipBase + "currentEssence", currentEssence));
|
||||||
ChatUtil.sendNoSpam(player, toSend.toArray(new ITextComponent[toSend.size()]));
|
ChatUtil.sendNoSpam(player, toSend.toArray(new ITextComponent[toSend.size()]));
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
@ -59,17 +58,17 @@ public class ItemSigilDivination extends ItemSigilBase implements IAltarReader
|
||||||
int currentEssence = altar.getCurrentBlood();
|
int currentEssence = altar.getCurrentBlood();
|
||||||
int capacity = altar.getCapacity();
|
int capacity = altar.getCapacity();
|
||||||
altar.checkTier();
|
altar.checkTier();
|
||||||
ChatUtil.sendNoSpam(player, TextHelper.localize(tooltipBase + "currentAltarTier", tier), TextHelper.localize(tooltipBase + "currentEssence", currentEssence), TextHelper.localize(tooltipBase + "currentAltarCapacity", capacity));
|
ChatUtil.sendNoSpam(player, new TextComponentTranslation(tooltipBase + "currentAltarTier", tier), new TextComponentTranslation(tooltipBase + "currentEssence", currentEssence), new TextComponentTranslation(tooltipBase + "currentAltarCapacity", capacity));
|
||||||
} else if (tile != null && tile instanceof TileIncenseAltar)
|
} else if (tile != null && tile instanceof TileIncenseAltar)
|
||||||
{
|
{
|
||||||
TileIncenseAltar altar = (TileIncenseAltar) tile;
|
TileIncenseAltar altar = (TileIncenseAltar) tile;
|
||||||
altar.recheckConstruction();
|
altar.recheckConstruction();
|
||||||
double tranquility = altar.tranquility;
|
double tranquility = altar.tranquility;
|
||||||
ChatUtil.sendNoSpam(player, TextHelper.localize(tooltipBase + "currentTranquility", (int) ((100D * (int) (100 * tranquility)) / 100d)), TextHelper.localize(tooltipBase + "currentBonus", (int) (100 * altar.incenseAddition)));
|
ChatUtil.sendNoSpam(player, new TextComponentTranslation(tooltipBase + "currentTranquility", (int) ((100D * (int) (100 * tranquility)) / 100d)), new TextComponentTranslation(tooltipBase + "currentBonus", (int) (100 * altar.incenseAddition)));
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
int currentEssence = NetworkHelper.getSoulNetwork(getOwnerUUID(stack)).getCurrentEssence();
|
int currentEssence = NetworkHelper.getSoulNetwork(getOwnerUUID(stack)).getCurrentEssence();
|
||||||
ChatUtil.sendNoSpam(player, TextHelper.localize(tooltipBase + "currentEssence", currentEssence));
|
ChatUtil.sendNoSpam(player, new TextComponentTranslation(tooltipBase + "currentEssence", currentEssence));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import net.minecraft.util.ActionResult;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
import net.minecraft.util.math.RayTraceResult;
|
import net.minecraft.util.math.RayTraceResult;
|
||||||
import net.minecraft.util.text.ITextComponent;
|
import net.minecraft.util.text.ITextComponent;
|
||||||
import net.minecraft.util.text.TextComponentString;
|
import net.minecraft.util.text.TextComponentTranslation;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import WayofTime.bloodmagic.api.Constants;
|
import WayofTime.bloodmagic.api.Constants;
|
||||||
import WayofTime.bloodmagic.api.altar.IBloodAltar;
|
import WayofTime.bloodmagic.api.altar.IBloodAltar;
|
||||||
|
@ -20,7 +20,6 @@ import WayofTime.bloodmagic.api.util.helper.NetworkHelper;
|
||||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||||
import WayofTime.bloodmagic.tile.TileIncenseAltar;
|
import WayofTime.bloodmagic.tile.TileIncenseAltar;
|
||||||
import WayofTime.bloodmagic.util.ChatUtil;
|
import WayofTime.bloodmagic.util.ChatUtil;
|
||||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
|
||||||
|
|
||||||
public class ItemSigilSeer extends ItemSigilBase implements IAltarReader
|
public class ItemSigilSeer extends ItemSigilBase implements IAltarReader
|
||||||
{
|
{
|
||||||
|
@ -44,8 +43,8 @@ public class ItemSigilSeer extends ItemSigilBase implements IAltarReader
|
||||||
|
|
||||||
List<ITextComponent> toSend = new ArrayList<ITextComponent>();
|
List<ITextComponent> toSend = new ArrayList<ITextComponent>();
|
||||||
if (!getOwnerName(stack).equals(PlayerHelper.getUsernameFromPlayer(player)))
|
if (!getOwnerName(stack).equals(PlayerHelper.getUsernameFromPlayer(player)))
|
||||||
toSend.add(new TextComponentString(TextHelper.localize(tooltipBase + "otherNetwork", getOwnerName(stack))));
|
toSend.add(new TextComponentTranslation(tooltipBase + "otherNetwork", getOwnerName(stack)));
|
||||||
toSend.add(new TextComponentString(TextHelper.localize(tooltipBase + "currentEssence", currentEssence)));
|
toSend.add(new TextComponentTranslation(tooltipBase + "currentEssence", currentEssence));
|
||||||
ChatUtil.sendNoSpam(player, toSend.toArray(new ITextComponent[toSend.size()]));
|
ChatUtil.sendNoSpam(player, toSend.toArray(new ITextComponent[toSend.size()]));
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
@ -69,10 +68,10 @@ public class ItemSigilSeer extends ItemSigilBase implements IAltarReader
|
||||||
int progress = altar.getProgress();
|
int progress = altar.getProgress();
|
||||||
int totalLiquidRequired = altar.getLiquidRequired() * ((IInventory) tile).getStackInSlot(0).stackSize;
|
int totalLiquidRequired = altar.getLiquidRequired() * ((IInventory) tile).getStackInSlot(0).stackSize;
|
||||||
int consumptionRate = (int) (altar.getConsumptionRate() * (altar.getConsumptionMultiplier() + 1));
|
int consumptionRate = (int) (altar.getConsumptionRate() * (altar.getConsumptionMultiplier() + 1));
|
||||||
ChatUtil.sendNoSpam(player, TextHelper.localize(tooltipBase + "currentAltarProgress", progress, totalLiquidRequired), TextHelper.localize(tooltipBase + "currentAltarConsumptionRate", consumptionRate), TextHelper.localize(tooltipBase + "currentAltarTier", tier), TextHelper.localize(tooltipBase + "currentEssence", currentEssence), TextHelper.localize(tooltipBase + "currentAltarCapacity", capacity), TextHelper.localize(tooltipBase + "currentCharge", charge));
|
ChatUtil.sendNoSpam(player, new TextComponentTranslation(tooltipBase + "currentAltarProgress", progress, totalLiquidRequired), new TextComponentTranslation(tooltipBase + "currentAltarConsumptionRate", consumptionRate), new TextComponentTranslation(tooltipBase + "currentAltarTier", tier), new TextComponentTranslation(tooltipBase + "currentEssence", currentEssence), new TextComponentTranslation(tooltipBase + "currentAltarCapacity", capacity), new TextComponentTranslation(tooltipBase + "currentCharge", charge));
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
ChatUtil.sendNoSpam(player, TextHelper.localize(tooltipBase + "currentAltarTier", tier), TextHelper.localize(tooltipBase + "currentEssence", currentEssence), TextHelper.localize(tooltipBase + "currentAltarCapacity", capacity), TextHelper.localize(tooltipBase + "currentCharge", charge));
|
ChatUtil.sendNoSpam(player, new TextComponentTranslation(tooltipBase + "currentAltarTier", tier), new TextComponentTranslation(tooltipBase + "currentEssence", currentEssence), new TextComponentTranslation(tooltipBase + "currentAltarCapacity", capacity), new TextComponentTranslation(tooltipBase + "currentCharge", charge));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (tile != null && tile instanceof TileIncenseAltar)
|
} else if (tile != null && tile instanceof TileIncenseAltar)
|
||||||
|
@ -80,11 +79,11 @@ public class ItemSigilSeer extends ItemSigilBase implements IAltarReader
|
||||||
TileIncenseAltar altar = (TileIncenseAltar) tile;
|
TileIncenseAltar altar = (TileIncenseAltar) tile;
|
||||||
altar.recheckConstruction();
|
altar.recheckConstruction();
|
||||||
double tranquility = altar.tranquility;
|
double tranquility = altar.tranquility;
|
||||||
ChatUtil.sendNoSpam(player, TextHelper.localize(tooltipBase + "currentTranquility", (int) ((100D * (int) (100 * tranquility)) / 100d)), TextHelper.localize(tooltipBase + "currentBonus", (int) (100 * altar.incenseAddition)));
|
ChatUtil.sendNoSpam(player, new TextComponentTranslation(tooltipBase + "currentTranquility", (int) ((100D * (int) (100 * tranquility)) / 100d)), new TextComponentTranslation(tooltipBase + "currentBonus", (int) (100 * altar.incenseAddition)));
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
int currentEssence = NetworkHelper.getSoulNetwork(getOwnerUUID(stack)).getCurrentEssence();
|
int currentEssence = NetworkHelper.getSoulNetwork(getOwnerUUID(stack)).getCurrentEssence();
|
||||||
ChatUtil.sendNoSpam(player, TextHelper.localize(tooltipBase + "currentEssence", currentEssence));
|
ChatUtil.sendNoSpam(player, new TextComponentTranslation(tooltipBase + "currentEssence", currentEssence));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -235,10 +235,10 @@ 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.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
|
||||||
tooltip.BloodMagic.sigil.divination.currentTranquility=Current Tranquility: %,d
|
tooltip.BloodMagic.sigil.divination.currentTranquility=Current Tranquility: %d
|
||||||
tooltip.BloodMagic.sigil.divination.currentBonus=Current Bonus: +%,d%%
|
tooltip.BloodMagic.sigil.divination.currentBonus=Current Bonus: +%d%%
|
||||||
tooltip.BloodMagic.sigil.water.desc=&oInfinite water, anyone?
|
tooltip.BloodMagic.sigil.water.desc=&oInfinite water, anyone?
|
||||||
tooltip.BloodMagic.sigil.lava.desc=&oHOT! DO NOT EAT
|
tooltip.BloodMagic.sigil.lava.desc=&oHOT! DO NOT EAT
|
||||||
tooltip.BloodMagic.sigil.void.desc=&oBetter than a Swiffer®!
|
tooltip.BloodMagic.sigil.void.desc=&oBetter than a Swiffer®!
|
||||||
|
@ -249,15 +249,15 @@ tooltip.BloodMagic.sigil.haste.desc=&o42 doses of caffeine later...
|
||||||
tooltip.BloodMagic.sigil.fastMiner.desc=&oKeep mining, and mining...
|
tooltip.BloodMagic.sigil.fastMiner.desc=&oKeep mining, and mining...
|
||||||
tooltip.BloodMagic.sigil.elementalAffinity.desc=&oFalling fire fishes!
|
tooltip.BloodMagic.sigil.elementalAffinity.desc=&oFalling fire fishes!
|
||||||
tooltip.BloodMagic.sigil.seer.desc=&oWhen seeing all is not enough
|
tooltip.BloodMagic.sigil.seer.desc=&oWhen seeing all is not enough
|
||||||
tooltip.BloodMagic.sigil.seer.currentAltarProgress=Current Progress: %,d LP/ %s LP
|
tooltip.BloodMagic.sigil.seer.currentAltarProgress=Current Progress: %d LP/ %s LP
|
||||||
tooltip.BloodMagic.sigil.seer.currentAltarProgress.percent=Current Progress: %s
|
tooltip.BloodMagic.sigil.seer.currentAltarProgress.percent=Current Progress: %s
|
||||||
tooltip.BloodMagic.sigil.seer.currentAltarConsumptionRate=Consumption Rate: %,d LP
|
tooltip.BloodMagic.sigil.seer.currentAltarConsumptionRate=Consumption Rate: %d LP
|
||||||
tooltip.BloodMagic.sigil.seer.currentAltarTier=Current Tier: %d
|
tooltip.BloodMagic.sigil.seer.currentAltarTier=Current Tier: %d
|
||||||
tooltip.BloodMagic.sigil.seer.currentEssence=Current Essence: %,d LP
|
tooltip.BloodMagic.sigil.seer.currentEssence=Current Essence: %d LP
|
||||||
tooltip.BloodMagic.sigil.seer.currentAltarCapacity=Current Capacity: %,d LP
|
tooltip.BloodMagic.sigil.seer.currentAltarCapacity=Current Capacity: %d LP
|
||||||
tooltip.BloodMagic.sigil.seer.currentCharge=Current Charge: %,d
|
tooltip.BloodMagic.sigil.seer.currentCharge=Current Charge: %d
|
||||||
tooltip.BloodMagic.sigil.seer.currentTranquility=Current Tranquility: %,d
|
tooltip.BloodMagic.sigil.seer.currentTranquility=Current Tranquility: %d
|
||||||
tooltip.BloodMagic.sigil.seer.currentBonus=Current Bonus: +%,d%%
|
tooltip.BloodMagic.sigil.seer.currentBonus=Current Bonus: +%d%%
|
||||||
tooltip.BloodMagic.sigil.phantomBridge.desc=&oWalking on thin air...
|
tooltip.BloodMagic.sigil.phantomBridge.desc=&oWalking on thin air...
|
||||||
tooltip.BloodMagic.sigil.whirlwind.desc=&oBest not to wear a skirt
|
tooltip.BloodMagic.sigil.whirlwind.desc=&oBest not to wear a skirt
|
||||||
tooltip.BloodMagic.sigil.enderSeverance.desc=&oPutting Endermen in Dire situations!
|
tooltip.BloodMagic.sigil.enderSeverance.desc=&oPutting Endermen in Dire situations!
|
||||||
|
@ -275,7 +275,7 @@ tooltip.BloodMagic.inscriber.desc=The writing is on the wall...
|
||||||
|
|
||||||
tooltip.BloodMagic.pack.selfSacrifice.desc=This pack really chafes...
|
tooltip.BloodMagic.pack.selfSacrifice.desc=This pack really chafes...
|
||||||
tooltip.BloodMagic.pack.sacrifice.desc=Description
|
tooltip.BloodMagic.pack.sacrifice.desc=Description
|
||||||
tooltip.BloodMagic.pack.stored=Stored: %,d LP
|
tooltip.BloodMagic.pack.stored=Stored: %d LP
|
||||||
|
|
||||||
tooltip.BloodMagic.activationCrystal.weak=Activates low-level rituals
|
tooltip.BloodMagic.activationCrystal.weak=Activates low-level rituals
|
||||||
tooltip.BloodMagic.activationCrystal.awakened=Activates more powerful rituals
|
tooltip.BloodMagic.activationCrystal.awakened=Activates more powerful rituals
|
||||||
|
@ -295,7 +295,7 @@ tooltip.BloodMagic.diviner.currentDirection=Current Direction: %s
|
||||||
|
|
||||||
tooltip.BloodMagic.arcaneAshes=Ashes used to draw an alchemy circle
|
tooltip.BloodMagic.arcaneAshes=Ashes used to draw an alchemy circle
|
||||||
|
|
||||||
tooltip.BloodMagic.telepositionFocus.coords=Current coordinates: (%,d, %,d, %,d)
|
tooltip.BloodMagic.telepositionFocus.coords=Current coordinates: (%d, %d, %d)
|
||||||
tooltip.BloodMagic.telepositionFocus.dimension=Dimension ID: %d
|
tooltip.BloodMagic.telepositionFocus.dimension=Dimension ID: %d
|
||||||
tooltip.BloodMagic.telepositionFocus.weak=Used to move blocks in the world
|
tooltip.BloodMagic.telepositionFocus.weak=Used to move blocks in the world
|
||||||
tooltip.BloodMagic.telepositionFocus.enhanced=Used to move blocks in the world
|
tooltip.BloodMagic.telepositionFocus.enhanced=Used to move blocks in the world
|
||||||
|
@ -466,10 +466,10 @@ jei.BloodMagic.recipe.altar=Blood Altar
|
||||||
jei.BloodMagic.recipe.binding=Alchemy Array (Binding)
|
jei.BloodMagic.recipe.binding=Alchemy Array (Binding)
|
||||||
jei.BloodMagic.recipe.alchemyArrayCrafting=Alchemy Array
|
jei.BloodMagic.recipe.alchemyArrayCrafting=Alchemy Array
|
||||||
jei.BloodMagic.recipe.soulForge=Hellfire Forge
|
jei.BloodMagic.recipe.soulForge=Hellfire Forge
|
||||||
jei.BloodMagic.recipe.requiredLP=LP: %,d
|
jei.BloodMagic.recipe.requiredLP=LP: %d
|
||||||
jei.BloodMagic.recipe.requiredTier=Tier: %d
|
jei.BloodMagic.recipe.requiredTier=Tier: %d
|
||||||
jei.BloodMagic.recipe.consumptionRate=Consumption: %,d LP/t
|
jei.BloodMagic.recipe.consumptionRate=Consumption: %d LP/t
|
||||||
jei.BloodMagic.recipe.drainRate=Drain: %,d LP/t
|
jei.BloodMagic.recipe.drainRate=Drain: %d LP/t
|
||||||
jei.BloodMagic.recipe.minimumSouls=Minimum: %1$,.2f Will
|
jei.BloodMagic.recipe.minimumSouls=Minimum: %1$,.2f Will
|
||||||
jei.BloodMagic.recipe.soulsDrained=Drained: %1$,.2f Will
|
jei.BloodMagic.recipe.soulsDrained=Drained: %1$,.2f Will
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue