mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-25 06:14:28 +00:00
1 parent
f5791ff631
commit
14a4825e33
7 files changed
+99
-90
No files matched your search
+23
-20
@@ -77,12 +77,7 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani
|
||||
.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, false);
|
||||
|
||||
if (movingobjectposition == null) {
|
||||
par3EntityPlayer.addChatMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocal("message.divinationsigil.currentessence") + " "
|
||||
+ String.format("%,d", SoulNetworkHandler.getCurrentEssence(ownerName))
|
||||
+ "LP"));
|
||||
|
||||
tellEssence(par3EntityPlayer, ownerName);
|
||||
return par1ItemStack;
|
||||
} else {
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
@@ -93,12 +88,7 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani
|
||||
TileEntity tile = par2World.getTileEntity(x, y, z);
|
||||
|
||||
if (!(tile instanceof IReagentHandler)) {
|
||||
par3EntityPlayer.addChatMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocal("message.divinationsigil.currentessence") + " "
|
||||
+ SoulNetworkHandler.getCurrentEssence(ownerName)
|
||||
+ "LP"));
|
||||
|
||||
tellEssence(par3EntityPlayer, ownerName);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@@ -108,14 +98,7 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani
|
||||
if (infoList != null) {
|
||||
for (ReagentContainerInfo info : infoList) {
|
||||
if (info != null && info.reagent != null && info.reagent.reagent != null) {
|
||||
par3EntityPlayer.addChatComponentMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocal("message.divinationsigil.reagent") + " "
|
||||
+ ReagentRegistry.getKeyForReagent(info.reagent.reagent)
|
||||
+ ","
|
||||
+ StatCollector.translateToLocal("message.divinationsigil.amount")
|
||||
+ " "
|
||||
+ info.reagent.amount));
|
||||
tellReagent(par3EntityPlayer, info);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -125,6 +108,26 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
private static void tellReagent(EntityPlayer par3EntityPlayer, ReagentContainerInfo info) {
|
||||
par3EntityPlayer.addChatComponentMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"message.divinationsigil.reagent",
|
||||
ReagentRegistry.getKeyForReagent(info.reagent.reagent))));
|
||||
par3EntityPlayer.addChatComponentMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector
|
||||
.translateToLocalFormatted("message.divinationsigil.amount", info.reagent.amount)));
|
||||
}
|
||||
|
||||
private static void tellEssence(EntityPlayer par3EntityPlayer, String ownerName) {
|
||||
par3EntityPlayer.addChatMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"message.divinationsigil.currentessence",
|
||||
SoulNetworkHandler.getCurrentEssence(ownerName))));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package WayofTime.alchemicalWizardry.common.tileEntity;
|
||||
|
||||
import java.text.NumberFormat;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -941,13 +940,16 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
|
||||
public void sendChatInfoToPlayer(EntityPlayer player) {
|
||||
player.addChatMessage(
|
||||
new ChatComponentTranslation(String.format("message.altar.currentessence"), this.fluid.amount));
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocalFormatted("message.altar.currentessence", this.fluid.amount)));
|
||||
player.addChatMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"message.altar.currenttier",
|
||||
UpgradedAltars.isAltarValid(worldObj, xCoord, yCoord, zCoord))));
|
||||
player.addChatMessage(
|
||||
new ChatComponentTranslation(
|
||||
String.format("message.altar.currenttier"),
|
||||
UpgradedAltars.isAltarValid(worldObj, xCoord, yCoord, zCoord)));
|
||||
player.addChatMessage(
|
||||
new ChatComponentTranslation(String.format("message.altar.capacity"), this.getCapacity()));
|
||||
StatCollector.translateToLocalFormatted("message.altar.capacity", this.getCapacity())));
|
||||
}
|
||||
|
||||
public void sendMoreChatInfoToPlayer(EntityPlayer player) {
|
||||
@@ -955,23 +957,25 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
int stackSize = getStackInSlot(0).stackSize;
|
||||
player.addChatMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocal("message.altar.progress") + " "
|
||||
+ progress
|
||||
+ "LP/"
|
||||
+ liquidRequired * stackSize
|
||||
+ "LP"));
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"message.altar.progress",
|
||||
progress,
|
||||
liquidRequired * stackSize)));
|
||||
player.addChatMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocal("message.altar.consumptionrate") + " "
|
||||
+ (int) (consumptionRate * (1 + consumptionMultiplier))
|
||||
+ "LP/t"));
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"message.altar.consumptionrate",
|
||||
(int) (consumptionRate * (1 + consumptionMultiplier)))));
|
||||
}
|
||||
player.addChatMessage(
|
||||
new ChatComponentTranslation(String.format("message.altar.currentessence"), this.fluid.amount));
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocalFormatted("message.altar.currentessence", this.fluid.amount)));
|
||||
player.addChatMessage(
|
||||
new ChatComponentTranslation(String.format("message.altar.inputtank"), this.fluidInput.amount));
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocalFormatted("message.altar.inputtank", this.fluidInput.amount)));
|
||||
player.addChatMessage(
|
||||
new ChatComponentTranslation(String.format("message.altar.outputtank"), this.fluidOutput.amount));
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocalFormatted("message.altar.outputtank", this.fluidOutput.amount)));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -988,26 +992,27 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
return;
|
||||
|
||||
final NBTTagCompound altarData = accessor.getNBTData().getCompoundTag("altar");
|
||||
final NumberFormat numberFormat = NumberFormat.getIntegerInstance();
|
||||
|
||||
if (altarData.hasKey("stored")) {
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocal("tooltip.waila.currentFluid")
|
||||
+ numberFormat.format(altarData.getInteger("stored")));
|
||||
StatCollector
|
||||
.translateToLocalFormatted("tooltip.waila.currentFluid", altarData.getInteger("stored")));
|
||||
} else {
|
||||
currenttip.add(StatCollector.translateToLocal("tooltip.waila.noFluid"));
|
||||
}
|
||||
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocal("tooltip.waila.altarCapacity")
|
||||
+ numberFormat.format(altarData.getInteger("capacity")));
|
||||
currenttip.add(StatCollector.translateToLocal("tooltip.waila.tier") + altarData.getInteger("tier"));
|
||||
StatCollector
|
||||
.translateToLocalFormatted("tooltip.waila.altarCapacity", altarData.getInteger("capacity")));
|
||||
currenttip.add(StatCollector.translateToLocalFormatted("tooltip.waila.tier", altarData.getInteger("tier")));
|
||||
|
||||
if (altarData.hasKey("progress")) {
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocal("tooltip.waila.altarProgress") + altarData.getInteger("progress")
|
||||
+ "%");
|
||||
currenttip.add(StatCollector.translateToLocal("tooltip.waila.crafting") + altarData.getString("crafting"));
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"tooltip.waila.altarProgress",
|
||||
altarData.getInteger("progress")));
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocalFormatted("tooltip.waila.crafting", altarData.getString("crafting")));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -733,10 +733,11 @@ public class TEWritingTable extends TEInventory implements ISidedInventory, IBlo
|
||||
final NBTTagCompound tag = accessor.getNBTData();
|
||||
final int curProgress = tag.getInteger("progress");
|
||||
if (curProgress > 0) {
|
||||
currenttip.add(StatCollector.translateToLocal("tooltip.waila.altarProgress") + curProgress + "%");
|
||||
currenttip.add(StatCollector.translateToLocalFormatted("tooltip.waila.chemistrySetProgress", curProgress));
|
||||
}
|
||||
if (tag.hasKey("crafting")) {
|
||||
currenttip.add(StatCollector.translateToLocal("tooltip.waila.crafting") + tag.getString("crafting"));
|
||||
currenttip
|
||||
.add(StatCollector.translateToLocalFormatted("tooltip.waila.crafting", tag.getString("crafting")));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user