mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
and now for custom fluids
This commit is contained in:
parent
d247f1dff0
commit
89638ae817
@ -145,7 +145,7 @@ public class BlockBedrockOreTE extends BlockContainer implements ILookOverlay, I
|
||||
text.add("Tier: " + ore.tier);
|
||||
|
||||
if(ore.acidRequirement != null) {
|
||||
text.add("Requires: " + ore.acidRequirement.fill + "mB " + I18nUtil.resolveKey(ore.acidRequirement.type.getUnlocalizedName()));
|
||||
text.add("Requires: " + ore.acidRequirement.fill + "mB " + ore.acidRequirement.type.getLocalizedName());
|
||||
}
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
|
||||
@ -12,7 +12,6 @@ import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.IPersistentNBT;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityBarrel;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
@ -183,9 +182,9 @@ public class BlockFluidBarrel extends BlockContainer implements ITooltipProvider
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, NBTTagCompound persistentTag, EntityPlayer player, List list, boolean ext) {
|
||||
FluidTank tank = new FluidTank(Fluids.NONE, 0, 0);
|
||||
FluidTank tank = new FluidTank(Fluids.NONE, 0);
|
||||
tank.readFromNBT(persistentTag, "tank");
|
||||
list.add(EnumChatFormatting.YELLOW + "" + tank.getFill() + "/" + tank.getMaxFill() + "mB " + I18nUtil.resolveKey(tank.getTankType().getUnlocalizedName()));
|
||||
list.add(EnumChatFormatting.YELLOW + "" + tank.getFill() + "/" + tank.getMaxFill() + "mB " + tank.getTankType().getLocalizedName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
@ -78,7 +77,7 @@ public class DeuteriumTower extends BlockDummyable implements ILookOverlay {
|
||||
text.add((tower.power < tower.getMaxPower() / 20 ? EnumChatFormatting.RED : EnumChatFormatting.GREEN) + "Power: " + BobMathUtil.getShortNumber(tower.power) + "HE");
|
||||
|
||||
for(int i = 0; i < tower.tanks.length; i++)
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + tower.tanks[i].getTankType().getName().toLowerCase(Locale.US)) + ": " + tower.tanks[i].getFill() + "/" + tower.tanks[i].getMaxFill() + "mB");
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + tower.tanks[i].getTankType().getLocalizedName() + ": " + tower.tanks[i].getFill() + "/" + tower.tanks[i].getMaxFill() + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
@ -62,7 +61,7 @@ public class MachineAutosaw extends BlockContainer implements ILookOverlay, IToo
|
||||
if(saw.acceptedFuels.contains(type)) {
|
||||
saw.tank.setTankType(type);
|
||||
saw.markDirty();
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation("hbmfluid." + type.getName().toLowerCase(Locale.US))).appendSibling(new ChatComponentText("!")));
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation(type.getConditionalName())).appendSibling(new ChatComponentText("!")));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -84,7 +83,7 @@ public class MachineAutosaw extends BlockContainer implements ILookOverlay, IToo
|
||||
TileEntityMachineAutosaw saw = (TileEntityMachineAutosaw) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add(I18nUtil.resolveKey("hbmfluid." + saw.tank.getTankType().getName().toLowerCase(Locale.US)) + ": " + saw.tank.getFill() + "/" + saw.tank.getMaxFill() + "mB");
|
||||
text.add(saw.tank.getTankType().getLocalizedName() + ": " + saw.tank.getFill() + "/" + saw.tank.getMaxFill() + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@ -12,7 +12,6 @@ import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.IPersistentNBT;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityMachineBAT9000;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.material.Material;
|
||||
@ -117,8 +116,8 @@ public class MachineBigAssTank9000 extends BlockDummyable implements IPersistent
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, NBTTagCompound persistentTag, EntityPlayer player, List list, boolean ext) {
|
||||
FluidTank tank = new FluidTank(Fluids.NONE, 0, 0);
|
||||
FluidTank tank = new FluidTank(Fluids.NONE, 0);
|
||||
tank.readFromNBT(persistentTag, "tank");
|
||||
list.add(EnumChatFormatting.YELLOW + "" + tank.getFill() + "/" + tank.getMaxFill() + "mB " + I18nUtil.resolveKey(tank.getTankType().getUnlocalizedName()));
|
||||
list.add(EnumChatFormatting.YELLOW + "" + tank.getFill() + "/" + tank.getMaxFill() + "mB " + tank.getTankType().getLocalizedName());
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
@ -71,7 +70,7 @@ public class MachineCatalyticCracker extends BlockDummyable implements ILookOver
|
||||
FluidType type = ((IItemFluidIdentifier) player.getHeldItem().getItem()).getType(world, pos[0], pos[1], pos[2], player.getHeldItem());
|
||||
cracker.tanks[0].setTankType(type);
|
||||
cracker.markDirty();
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation("hbmfluid." + type.getName().toLowerCase(Locale.US))).appendSibling(new ChatComponentText("!")));
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation(type.getConditionalName())).appendSibling(new ChatComponentText("!")));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -130,7 +129,7 @@ public class MachineCatalyticCracker extends BlockDummyable implements ILookOver
|
||||
List<String> text = new ArrayList();
|
||||
|
||||
for(int i = 0; i < cracker.tanks.length; i++)
|
||||
text.add((i < 2 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + cracker.tanks[i].getTankType().getName().toLowerCase(Locale.US)) + ": " + cracker.tanks[i].getFill() + "/" + cracker.tanks[i].getMaxFill() + "mB");
|
||||
text.add((i < 2 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + cracker.tanks[i].getTankType().getLocalizedName() + ": " + cracker.tanks[i].getFill() + "/" + cracker.tanks[i].getMaxFill() + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.tileentity.machine.TileEntityCondenser;
|
||||
@ -39,7 +38,7 @@ public class MachineCondenser extends BlockContainer implements ILookOverlay {
|
||||
List<String> text = new ArrayList();
|
||||
|
||||
for(int i = 0; i < condenser.tanks.length; i++)
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + condenser.tanks[i].getTankType().getName().toLowerCase(Locale.US)) + ": " + condenser.tanks[i].getFill() + "/" + condenser.tanks[i].getMaxFill() + "mB");
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET +condenser.tanks[i].getTankType().getLocalizedName() + ": " + condenser.tanks[i].getFill() + "/" + condenser.tanks[i].getMaxFill() + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
@ -75,7 +74,7 @@ public class MachineCondenserPowered extends BlockDummyable implements ILookOver
|
||||
text.add(BobMathUtil.getShortNumber(tower.power) + "HE / " + BobMathUtil.getShortNumber(tower.maxPower) + "HE");
|
||||
|
||||
for(int i = 0; i < tower.tanks.length; i++)
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + tower.tanks[i].getTankType().getName().toLowerCase(Locale.US)) + ": " + tower.tanks[i].getFill() + "/" + tower.tanks[i].getMaxFill() + "mB");
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + tower.tanks[i].getTankType().getLocalizedName() + ": " + tower.tanks[i].getFill() + "/" + tower.tanks[i].getMaxFill() + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.lib.RefStrings;
|
||||
@ -67,7 +66,7 @@ public class MachineDeuteriumExtractor extends BlockContainer implements ILookOv
|
||||
text.add((extractor.power < extractor.getMaxPower() / 20 ? EnumChatFormatting.RED : EnumChatFormatting.GREEN) + "Power: " + BobMathUtil.getShortNumber(extractor.power) + "HE");
|
||||
|
||||
for(int i = 0; i < extractor.tanks.length; i++)
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + extractor.tanks[i].getTankType().getName().toLowerCase(Locale.US)) + ": " + extractor.tanks[i].getFill() + "/" + extractor.tanks[i].getMaxFill() + "mB");
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + extractor.tanks[i].getTankType().getLocalizedName() + ": " + extractor.tanks[i].getFill() + "/" + extractor.tanks[i].getMaxFill() + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@ -15,7 +15,6 @@ import com.hbm.tileentity.IPersistentNBT;
|
||||
import com.hbm.tileentity.IRepairable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityMachineFluidTank;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import api.hbm.block.IToolable;
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
@ -99,7 +98,7 @@ public class MachineFluidTank extends BlockDummyable implements IPersistentInfoP
|
||||
public void addInformation(ItemStack stack, NBTTagCompound persistentTag, EntityPlayer player, List list, boolean ext) {
|
||||
FluidTank tank = new FluidTank(Fluids.NONE, 0);
|
||||
tank.readFromNBT(persistentTag, "tank");
|
||||
list.add(EnumChatFormatting.YELLOW + "" + tank.getFill() + "/" + tank.getMaxFill() + "mB " + I18nUtil.resolveKey(tank.getTankType().getUnlocalizedName()));
|
||||
list.add(EnumChatFormatting.YELLOW + "" + tank.getFill() + "/" + tank.getMaxFill() + "mB " + tank.getTankType().getLocalizedName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -13,7 +13,6 @@ import com.hbm.tileentity.IPersistentNBT;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineFrackingTower;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.material.Material;
|
||||
@ -113,7 +112,7 @@ public class MachineFrackingTower extends BlockDummyable implements IPersistentI
|
||||
for(int i = 0; i < 2; i++) {
|
||||
FluidTank tank = new FluidTank(Fluids.NONE, 0);
|
||||
tank.readFromNBT(persistentTag, "t" + i);
|
||||
list.add(EnumChatFormatting.YELLOW + "" + tank.getFill() + "/" + tank.getMaxFill() + "mB " + I18nUtil.resolveKey(tank.getTankType().getUnlocalizedName()));
|
||||
list.add(EnumChatFormatting.YELLOW + "" + tank.getFill() + "/" + tank.getMaxFill() + "mB " + tank.getTankType().getLocalizedName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
@ -74,7 +73,7 @@ public class MachineFractionTower extends BlockDummyable implements ILookOverlay
|
||||
FluidType type = ((IItemFluidIdentifier) player.getHeldItem().getItem()).getType(world, pos[0], pos[1], pos[2], player.getHeldItem());
|
||||
frac.tanks[0].setTankType(type);
|
||||
frac.markDirty();
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation("hbmfluid." + type.getName().toLowerCase(Locale.US))).appendSibling(new ChatComponentText("!")));
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation(type.getConditionalName())).appendSibling(new ChatComponentText("!")));
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -116,7 +115,7 @@ public class MachineFractionTower extends BlockDummyable implements ILookOverlay
|
||||
List<String> text = new ArrayList();
|
||||
|
||||
for(int i = 0; i < cracker.tanks.length; i++)
|
||||
text.add((i == 0 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + cracker.tanks[i].getTankType().getName().toLowerCase(Locale.US)) + ": " + cracker.tanks[i].getFill() + "/" + cracker.tanks[i].getMaxFill() + "mB");
|
||||
text.add((i == 0 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + cracker.tanks[i].getTankType().getLocalizedName() + ": " + cracker.tanks[i].getFill() + "/" + cracker.tanks[i].getMaxFill() + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ public class MachineHeatBoiler extends BlockDummyable implements ILookOverlay, I
|
||||
if(type.hasTrait(FT_Heatable.class) && type.getTrait(FT_Heatable.class).getEfficiency(HeatingType.BOILER) > 0) {
|
||||
boiler.tanks[0].setTankType(type);
|
||||
boiler.markDirty();
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation("hbmfluid." + type.getName().toLowerCase(Locale.US))).appendSibling(new ChatComponentText("!")));
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation(type.getConditionalName())).appendSibling(new ChatComponentText("!")));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -176,8 +176,8 @@ public class MachineHeatBoiler extends BlockDummyable implements ILookOverlay, I
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add(String.format(Locale.US, "%,d", boiler.heat) + "TU");
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + I18nUtil.resolveKey(boiler.tanks[0].getTankType().getUnlocalizedName()) + ": " + String.format(Locale.US, "%,d", boiler.tanks[0].getFill()) + " / " + String.format(Locale.US, "%,d", boiler.tanks[0].getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + I18nUtil.resolveKey(boiler.tanks[1].getTankType().getUnlocalizedName()) + ": " + String.format(Locale.US, "%,d", boiler.tanks[1].getFill()) + " / " + String.format(Locale.US, "%,d", boiler.tanks[1].getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + boiler.tanks[0].getTankType().getLocalizedName() + ": " + String.format(Locale.US, "%,d", boiler.tanks[0].getFill()) + " / " + String.format(Locale.US, "%,d", boiler.tanks[0].getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + boiler.tanks[1].getTankType().getLocalizedName() + ": " + String.format(Locale.US, "%,d", boiler.tanks[1].getFill()) + " / " + String.format(Locale.US, "%,d", boiler.tanks[1].getMaxFill()) + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ public class MachineHeatBoilerIndustrial extends BlockDummyable implements ILook
|
||||
if(type.hasTrait(FT_Heatable.class) && type.getTrait(FT_Heatable.class).getEfficiency(HeatingType.BOILER) > 0) {
|
||||
boiler.tanks[0].setTankType(type);
|
||||
boiler.markDirty();
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation("hbmfluid." + type.getName().toLowerCase(Locale.US))).appendSibling(new ChatComponentText("!")));
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation(type.getConditionalName())).appendSibling(new ChatComponentText("!")));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -113,8 +113,8 @@ public class MachineHeatBoilerIndustrial extends BlockDummyable implements ILook
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add(String.format(Locale.US, "%,d", boiler.heat) + "TU");
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + I18nUtil.resolveKey(boiler.tanks[0].getTankType().getUnlocalizedName()) + ": " + String.format(Locale.US, "%,d", boiler.tanks[0].getFill()) + " / " + String.format(Locale.US, "%,d", boiler.tanks[0].getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + I18nUtil.resolveKey(boiler.tanks[1].getTankType().getUnlocalizedName()) + ": " + String.format(Locale.US, "%,d", boiler.tanks[1].getFill()) + " / " + String.format(Locale.US, "%,d", boiler.tanks[1].getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + boiler.tanks[0].getTankType().getLocalizedName() + ": " + String.format(Locale.US, "%,d", boiler.tanks[0].getFill()) + " / " + String.format(Locale.US, "%,d", boiler.tanks[0].getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + boiler.tanks[1].getTankType().getLocalizedName() + ": " + String.format(Locale.US, "%,d", boiler.tanks[1].getFill()) + " / " + String.format(Locale.US, "%,d", boiler.tanks[1].getMaxFill()) + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@ -16,6 +16,9 @@ import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
@ -82,6 +85,8 @@ public class MachineHephaestus extends BlockDummyable implements ILookOverlay {
|
||||
FluidType type = ((IItemFluidIdentifier) player.getHeldItem().getItem()).getType(world, pos[0], pos[1], pos[2], player.getHeldItem());
|
||||
heatex.input.setTankType(type);
|
||||
heatex.markDirty();
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation(type.getConditionalName())).appendSibling(new ChatComponentText("!")));
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -111,7 +116,7 @@ public class MachineHephaestus extends BlockDummyable implements ILookOverlay {
|
||||
|
||||
for(int i = 0; i < heatex.getAllTanks().length; i++) {
|
||||
FluidTank tank = heatex.getAllTanks()[i];
|
||||
text.add((i == 0 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + tank.getTankType().getName().toLowerCase(Locale.US)) + ": " + tank.getFill() + "/" + tank.getMaxFill() + "mB");
|
||||
text.add((i == 0 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + tank.getTankType().getLocalizedName() + ": " + tank.getFill() + "/" + tank.getMaxFill() + "mB");
|
||||
}
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
|
||||
@ -12,7 +12,6 @@ import com.hbm.tileentity.IPersistentNBT;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineOilWell;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.material.Material;
|
||||
@ -87,7 +86,7 @@ public class MachineOilWell extends BlockDummyable implements IPersistentInfoPro
|
||||
for(int i = 0; i < 2; i++) {
|
||||
FluidTank tank = new FluidTank(Fluids.NONE, 0);
|
||||
tank.readFromNBT(persistentTag, "t" + i);
|
||||
list.add(EnumChatFormatting.YELLOW + "" + tank.getFill() + "/" + tank.getMaxFill() + "mB " + I18nUtil.resolveKey(tank.getTankType().getUnlocalizedName()));
|
||||
list.add(EnumChatFormatting.YELLOW + "" + tank.getFill() + "/" + tank.getMaxFill() + "mB " + tank.getTankType().getLocalizedName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,7 +11,6 @@ import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.IPersistentNBT;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityMachineOrbus;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.material.Material;
|
||||
@ -91,8 +90,8 @@ public class MachineOrbus extends BlockDummyable implements IPersistentInfoProvi
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, NBTTagCompound persistentTag, EntityPlayer player, List list, boolean ext) {
|
||||
FluidTank tank = new FluidTank(Fluids.NONE, 0, 0);
|
||||
FluidTank tank = new FluidTank(Fluids.NONE, 0);
|
||||
tank.readFromNBT(persistentTag, "tank");
|
||||
list.add(EnumChatFormatting.YELLOW + "" + tank.getFill() + "/" + tank.getMaxFill() + "mB " + I18nUtil.resolveKey(tank.getTankType().getUnlocalizedName()));
|
||||
list.add(EnumChatFormatting.YELLOW + "" + tank.getFill() + "/" + tank.getMaxFill() + "mB " + tank.getTankType().getLocalizedName());
|
||||
}
|
||||
}
|
||||
|
||||
@ -84,15 +84,15 @@ public class MachinePump extends BlockDummyable implements ITooltipProvider, ILo
|
||||
|
||||
if(te instanceof TileEntityMachinePumpSteam) {
|
||||
TileEntityMachinePumpSteam pump = (TileEntityMachinePumpSteam) te;
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + I18nUtil.resolveKey(pump.steam.getTankType().getUnlocalizedName()) + ": " + String.format(Locale.US, "%,d", pump.steam.getFill()) + " / " + String.format(Locale.US, "%,d", pump.steam.getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + I18nUtil.resolveKey(pump.lps.getTankType().getUnlocalizedName()) + ": " + String.format(Locale.US, "%,d", pump.lps.getFill()) + " / " + String.format(Locale.US, "%,d", pump.lps.getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + I18nUtil.resolveKey(pump.water.getTankType().getUnlocalizedName()) + ": " + String.format(Locale.US, "%,d", pump.water.getFill()) + " / " + String.format(Locale.US, "%,d", pump.water.getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + pump.steam.getTankType().getLocalizedName() + ": " + String.format(Locale.US, "%,d", pump.steam.getFill()) + " / " + String.format(Locale.US, "%,d", pump.steam.getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + pump.lps.getTankType().getLocalizedName() + ": " + String.format(Locale.US, "%,d", pump.lps.getFill()) + " / " + String.format(Locale.US, "%,d", pump.lps.getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + pump.water.getTankType().getLocalizedName() + ": " + String.format(Locale.US, "%,d", pump.water.getFill()) + " / " + String.format(Locale.US, "%,d", pump.water.getMaxFill()) + "mB");
|
||||
}
|
||||
|
||||
if(te instanceof TileEntityMachinePumpElectric) {
|
||||
TileEntityMachinePumpElectric pump = (TileEntityMachinePumpElectric) te;
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + String.format(Locale.US, "%,d", pump.power) + " / " + String.format(Locale.US, "%,d", pump.maxPower) + "HE");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + I18nUtil.resolveKey(pump.water.getTankType().getUnlocalizedName()) + ": " + String.format(Locale.US, "%,d", pump.water.getFill()) + " / " + String.format(Locale.US, "%,d", pump.water.getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + pump.water.getTankType().getLocalizedName() + ": " + String.format(Locale.US, "%,d", pump.water.getFill()) + " / " + String.format(Locale.US, "%,d", pump.water.getMaxFill()) + "mB");
|
||||
}
|
||||
|
||||
if(pos[1] > 70) {
|
||||
|
||||
@ -13,7 +13,6 @@ import com.hbm.tileentity.IPersistentNBT;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachinePumpjack;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.material.Material;
|
||||
@ -100,7 +99,7 @@ public class MachinePumpjack extends BlockDummyable implements IPersistentInfoPr
|
||||
for(int i = 0; i < 2; i++) {
|
||||
FluidTank tank = new FluidTank(Fluids.NONE, 0);
|
||||
tank.readFromNBT(persistentTag, "t" + i);
|
||||
list.add(EnumChatFormatting.YELLOW + "" + tank.getFill() + "/" + tank.getMaxFill() + "mB " + I18nUtil.resolveKey(tank.getTankType().getUnlocalizedName()));
|
||||
list.add(EnumChatFormatting.YELLOW + "" + tank.getFill() + "/" + tank.getMaxFill() + "mB " + tank.getTankType().getLocalizedName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,6 @@ import com.hbm.tileentity.IPersistentNBT;
|
||||
import com.hbm.tileentity.IRepairable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineRefinery;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import api.hbm.block.IToolable;
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
@ -116,7 +115,7 @@ public class MachineRefinery extends BlockDummyable implements IPersistentInfoPr
|
||||
for(int i = 0; i < 5; i++) {
|
||||
FluidTank tank = new FluidTank(Fluids.NONE, 0);
|
||||
tank.readFromNBT(persistentTag, "" + i);
|
||||
list.add(EnumChatFormatting.YELLOW + "" + tank.getFill() + "/" + tank.getMaxFill() + "mB " + I18nUtil.resolveKey(tank.getTankType().getUnlocalizedName()));
|
||||
list.add(EnumChatFormatting.YELLOW + "" + tank.getFill() + "/" + tank.getMaxFill() + "mB " + tank.getTankType().getLocalizedName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -73,8 +73,8 @@ public class MachineSteamEngine extends BlockDummyable implements ILookOverlay,
|
||||
TileEntitySteamEngine engine = (TileEntitySteamEngine) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + I18nUtil.resolveKey(engine.tanks[0].getTankType().getUnlocalizedName()) + ": " + String.format(Locale.US, "%,d", engine.tanks[0].getFill()) + " / " + String.format(Locale.US, "%,d", engine.tanks[0].getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + I18nUtil.resolveKey(engine.tanks[1].getTankType().getUnlocalizedName()) + ": " + String.format(Locale.US, "%,d", engine.tanks[1].getFill()) + " / " + String.format(Locale.US, "%,d", engine.tanks[1].getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + engine.tanks[0].getTankType().getLocalizedName() + ": " + String.format(Locale.US, "%,d", engine.tanks[0].getFill()) + " / " + String.format(Locale.US, "%,d", engine.tanks[0].getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + engine.tanks[1].getTankType().getLocalizedName() + ": " + String.format(Locale.US, "%,d", engine.tanks[1].getFill()) + " / " + String.format(Locale.US, "%,d", engine.tanks[1].getMaxFill()) + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
@ -78,7 +77,7 @@ public class MachineTowerLarge extends BlockDummyable implements ILookOverlay {
|
||||
List<String> text = new ArrayList();
|
||||
|
||||
for(int i = 0; i < tower.tanks.length; i++)
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + tower.tanks[i].getTankType().getName().toLowerCase(Locale.US)) + ": " + tower.tanks[i].getFill() + "/" + tower.tanks[i].getMaxFill() + "mB");
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + tower.tanks[i].getTankType().getLocalizedName() + ": " + tower.tanks[i].getFill() + "/" + tower.tanks[i].getMaxFill() + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
@ -75,7 +74,7 @@ public class MachineTowerSmall extends BlockDummyable implements ILookOverlay {
|
||||
List<String> text = new ArrayList();
|
||||
|
||||
for(int i = 0; i < tower.tanks.length; i++)
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + tower.tanks[i].getTankType().getName().toLowerCase(Locale.US)) + ": " + tower.tanks[i].getFill() + "/" + tower.tanks[i].getMaxFill() + "mB");
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + tower.tanks[i].getTankType().getLocalizedName() + ": " + tower.tanks[i].getFill() + "/" + tower.tanks[i].getMaxFill() + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@ -6,11 +6,9 @@ import com.hbm.util.I18nUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -87,17 +85,16 @@ public class MachineTurbineGas extends BlockDummyable implements ILookOverlay {
|
||||
List<String> text = new ArrayList();
|
||||
|
||||
if(hitCheck(dir, pos[0], pos[1], pos[2], -1, -1, 0, x, y, z) || hitCheck(dir, pos[0], pos[1], pos[2], 1, -1, 0, x, y, z)) {
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + turbine.tanks[0].getTankType().getName().toLowerCase(Locale.US)));
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + turbine.tanks[1].getTankType().getName().toLowerCase(Locale.US)));
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + I18nUtil.resolveKey(Fluids.SMOKE.getUnlocalizedName()));
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + turbine.tanks[0].getTankType().getLocalizedName());
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + turbine.tanks[1].getTankType().getLocalizedName());
|
||||
}
|
||||
|
||||
if(hitCheck(dir, pos[0], pos[1], pos[2], -1, 4, 0, x, y, z) || hitCheck(dir, pos[0], pos[1], pos[2], 1, 4, 0, x, y, z)) {
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + turbine.tanks[2].getTankType().getName().toLowerCase(Locale.US)));
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + turbine.tanks[2].getTankType().getLocalizedName());
|
||||
}
|
||||
|
||||
if(hitCheck(dir, pos[0], pos[1], pos[2], 0, 5, 1, x, y, z)) {
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + turbine.tanks[3].getTankType().getName().toLowerCase(Locale.US)));
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + turbine.tanks[3].getTankType().getLocalizedName());
|
||||
}
|
||||
|
||||
if(hitCheck(dir, pos[0], pos[1], pos[2], 0, -4, 1, x, y, z)) {
|
||||
|
||||
@ -97,7 +97,7 @@ public class BlockFluidDuct extends BlockContainer implements ILookOverlay {
|
||||
TileEntityFluidDuctSimple duct = (TileEntityFluidDuctSimple) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add("&[" + duct.getType().getColor() + "&]" +I18nUtil.resolveKey(duct.getType().getUnlocalizedName()));
|
||||
text.add("&[" + duct.getType().getColor() + "&]" + duct.getType().getLocalizedName());
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ public class BlockFluidDuctSolid extends BlockContainer implements IBlockMultiPa
|
||||
TileEntityFluidDuctSimple duct = (TileEntityFluidDuctSimple) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add("&[" + duct.getType().getColor() + "&]" +I18nUtil.resolveKey(duct.getType().getUnlocalizedName()));
|
||||
text.add("&[" + duct.getType().getColor() + "&]" + duct.getType().getLocalizedName());
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
|
||||
@ -305,7 +305,7 @@ public class FluidDuctBox extends FluidDuctBase implements IBlockMulti, ILookOve
|
||||
TileEntityPipeBaseNT duct = (TileEntityPipeBaseNT) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add("&[" + duct.getType().getColor() + "&]" + I18nUtil.resolveKey(duct.getType().getUnlocalizedName()));
|
||||
text.add("&[" + duct.getType().getColor() + "&]" + duct.getType().getLocalizedName());
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
|
||||
@ -78,9 +78,9 @@ public class FluidDuctBoxExhaust extends FluidDuctBox {
|
||||
@Override
|
||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||
List<String> text = new ArrayList();
|
||||
text.add(I18nUtil.resolveKey(Fluids.SMOKE.getUnlocalizedName()));
|
||||
text.add(I18nUtil.resolveKey(Fluids.SMOKE_LEADED.getUnlocalizedName()));
|
||||
text.add(I18nUtil.resolveKey(Fluids.SMOKE_POISON.getUnlocalizedName()));
|
||||
text.add(Fluids.SMOKE.getLocalizedName());
|
||||
text.add(Fluids.SMOKE_LEADED.getLocalizedName());
|
||||
text.add(Fluids.SMOKE_POISON.getLocalizedName());
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ public class FluidDuctGauge extends FluidDuctBase implements IBlockMultiPass, IL
|
||||
TileEntityPipeGauge duct = (TileEntityPipeGauge) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add("&[" + duct.getType().getColor() + "&]" +I18nUtil.resolveKey(duct.getType().getUnlocalizedName()));
|
||||
text.add("&[" + duct.getType().getColor() + "&]" + duct.getType().getLocalizedName());
|
||||
text.add(String.format(Locale.US, "%,d", duct.deltaTick) + " mB/t");
|
||||
text.add(String.format(Locale.US, "%,d", duct.deltaLastSecond) + " mB/s");
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
|
||||
@ -160,7 +160,7 @@ public class FluidDuctPaintable extends FluidDuctBase implements IToolable, IBlo
|
||||
TileEntityPipeBaseNT duct = (TileEntityPipeBaseNT) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add("&[" + duct.getType().getColor() + "&]" +I18nUtil.resolveKey(duct.getType().getUnlocalizedName()));
|
||||
text.add("&[" + duct.getType().getColor() + "&]" + duct.getType().getLocalizedName());
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
|
||||
@ -201,7 +201,7 @@ public class FluidDuctStandard extends FluidDuctBase implements IBlockMulti, ILo
|
||||
TileEntityPipeBaseNT duct = (TileEntityPipeBaseNT) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add("&[" + duct.getType().getColor() + "&]" +I18nUtil.resolveKey(duct.getType().getUnlocalizedName()));
|
||||
text.add("&[" + duct.getType().getColor() + "&]" + duct.getType().getLocalizedName());
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ public class FluidSwitch extends FluidDuctBase implements ILookOverlay {
|
||||
TileEntityFluidValve duct = (TileEntityFluidValve) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add("&[" + duct.getType().getColor() + "&]" +I18nUtil.resolveKey(duct.getType().getUnlocalizedName()));
|
||||
text.add("&[" + duct.getType().getColor() + "&]" + duct.getType().getLocalizedName());
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ public class FluidValve extends FluidDuctBase implements ILookOverlay {
|
||||
TileEntityFluidValve duct = (TileEntityFluidValve) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add("&[" + duct.getType().getColor() + "&]" +I18nUtil.resolveKey(duct.getType().getUnlocalizedName()));
|
||||
text.add("&[" + duct.getType().getColor() + "&]" + duct.getType().getLocalizedName());
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ public class EntityDeliveryDrone extends EntityDroneBase implements IInventory,
|
||||
nbt.setTag("Items", nbttaglist);
|
||||
|
||||
if(fluid != null) {
|
||||
nbt.setString("fluidType", fluid.type.getUnlocalizedName());
|
||||
nbt.setString("fluidType", fluid.type.getName());
|
||||
nbt.setInteger("fluidAmount", fluid.fill);
|
||||
}
|
||||
|
||||
|
||||
@ -13,6 +13,7 @@ import com.hbm.inventory.fluid.trait.*;
|
||||
import com.hbm.inventory.fluid.trait.FluidTraitSimple.*;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.util.EnumSymbol;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -31,21 +32,21 @@ public class FluidType {
|
||||
private int color;
|
||||
//Unlocalized string ID of the fluid
|
||||
private String unlocalized;
|
||||
//localization override for custom fluids
|
||||
private String localizedOverride;
|
||||
private int guiTint = 0xffffff;
|
||||
|
||||
public int poison;
|
||||
public int flammability;
|
||||
public int reactivity;
|
||||
public EnumSymbol symbol;
|
||||
public boolean customFluid = false;
|
||||
|
||||
public static final int ROOM_TEMPERATURE = 20;
|
||||
public static final double DEFAULT_HEATCAP = 0.01D;
|
||||
public static final double DEFAULT_COMPRESSION = 1D;
|
||||
|
||||
// v v v this entire system is a pain in the ass to work with. i'd much rather define state transitions and heat values manually.
|
||||
/** How hot this fluid is. Simple enough. */
|
||||
public int temperature = ROOM_TEMPERATURE;
|
||||
/** How much "stuff" there is in one mB. 1mB of water turns into 100mB of steam, therefore steam has a compression of 0.01. Compression is only used for translating fluids into other fluids, heat calculations should ignore this. */
|
||||
public double compression = DEFAULT_COMPRESSION;
|
||||
|
||||
public HashMap<Class, Object> containers = new HashMap();
|
||||
public HashMap<Class<? extends FluidTrait>, FluidTrait> traits = new HashMap();
|
||||
@ -66,6 +67,23 @@ public class FluidType {
|
||||
this.id = Fluids.registerSelf(this);
|
||||
}
|
||||
|
||||
public FluidType(String name, int color, int p, int f, int r, EnumSymbol symbol, String texName, int tint, int id, String displayName) {
|
||||
this.stringId = name;
|
||||
this.color = color;
|
||||
this.unlocalized = "hbmfluid." + name.toLowerCase(Locale.US);
|
||||
this.poison = p;
|
||||
this.flammability = f;
|
||||
this.reactivity = r;
|
||||
this.symbol = symbol;
|
||||
this.texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/fluids/" + texName + ".png");
|
||||
this.guiTint = tint;
|
||||
this.localizedOverride = displayName;
|
||||
this.customFluid = true;
|
||||
|
||||
this.id = id;
|
||||
Fluids.register(this, id);
|
||||
}
|
||||
|
||||
public FluidType(int forcedId, String name, int color, int p, int f, int r, EnumSymbol symbol) {
|
||||
this(name, color, p, f, r, symbol);
|
||||
|
||||
@ -79,11 +97,6 @@ public class FluidType {
|
||||
return this;
|
||||
}
|
||||
|
||||
public FluidType setCompression(double compression) {
|
||||
this.compression = compression;
|
||||
return this;
|
||||
}
|
||||
|
||||
public FluidType addContainers(Object... containers) {
|
||||
for(Object container : containers) this.containers.put(container.getClass(), container);
|
||||
return this;
|
||||
@ -109,7 +122,7 @@ public class FluidType {
|
||||
public int getID() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
/** The unique mapping name for this fluid, usually matches the unlocalied name, minus the prefix */
|
||||
public String getName() {
|
||||
return this.stringId;
|
||||
}
|
||||
@ -118,12 +131,24 @@ public class FluidType {
|
||||
return this.color;
|
||||
}
|
||||
|
||||
public int getTint() {
|
||||
return this.guiTint;
|
||||
}
|
||||
|
||||
public ResourceLocation getTexture() {
|
||||
return this.texture;
|
||||
}
|
||||
public String getUnlocalizedName() {
|
||||
return this.unlocalized;
|
||||
}
|
||||
/** Returns the localized override name if present, or otherwise the I18n converted name */
|
||||
@SideOnly(Side.CLIENT) public String getLocalizedName() {
|
||||
return this.localizedOverride != null ? this.localizedOverride : I18nUtil.resolveKey(this.unlocalized);
|
||||
}
|
||||
/** Returns the localized override name if present, or otherwise the raw unlocalized name. Used for server-side code that needs ChatComponentTranslation. */
|
||||
public String getConditionalName() {
|
||||
return this.localizedOverride != null ? this.localizedOverride : this.unlocalized;
|
||||
}
|
||||
public String getDict(int quantity) {
|
||||
return "container" + quantity + this.stringId.replace("_", "").toLowerCase(Locale.US);
|
||||
}
|
||||
|
||||
@ -163,9 +163,12 @@ public class Fluids {
|
||||
public static FluidType THORIUM_SALT_HOT;
|
||||
public static FluidType THORIUM_SALT_DEPLETED;
|
||||
public static FluidType FULLERENE;
|
||||
|
||||
public static List<FluidType> customFluids = new ArrayList();
|
||||
|
||||
private static final HashMap<Integer, FluidType> idMapping = new HashMap();
|
||||
private static final HashMap<String, FluidType> nameMapping = new HashMap();
|
||||
protected static final List<FluidType> registerOrder = new ArrayList();
|
||||
protected static final List<FluidType> metaOrder = new ArrayList();
|
||||
|
||||
public static final FT_Liquid LIQUID = new FT_Liquid();
|
||||
@ -197,10 +200,10 @@ public class Fluids {
|
||||
|
||||
NONE = new FluidType("NONE", 0x888888, 0, 0, 0, EnumSymbol.NONE);
|
||||
WATER = new FluidType("WATER", 0x3333FF, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID);
|
||||
STEAM = new FluidType("STEAM", 0xe5e5e5, 3, 0, 0, EnumSymbol.NONE).setTemp(100).setCompression(0.01D).addTraits(GASEOUS);
|
||||
HOTSTEAM = new FluidType("HOTSTEAM", 0xE7D6D6, 4, 0, 0, EnumSymbol.NONE).setTemp(300).setCompression(0.1D).addTraits(GASEOUS);
|
||||
SUPERHOTSTEAM = new FluidType("SUPERHOTSTEAM", 0xE7B7B7, 4, 0, 0, EnumSymbol.NONE).setTemp(450).setCompression(1D).addTraits(GASEOUS);
|
||||
ULTRAHOTSTEAM = new FluidType("ULTRAHOTSTEAM", 0xE39393, 4, 0, 0, EnumSymbol.NONE).setTemp(600).setCompression(10D).addTraits(GASEOUS);
|
||||
STEAM = new FluidType("STEAM", 0xe5e5e5, 3, 0, 0, EnumSymbol.NONE).setTemp(100).addTraits(GASEOUS);
|
||||
HOTSTEAM = new FluidType("HOTSTEAM", 0xE7D6D6, 4, 0, 0, EnumSymbol.NONE).setTemp(300).addTraits(GASEOUS);
|
||||
SUPERHOTSTEAM = new FluidType("SUPERHOTSTEAM", 0xE7B7B7, 4, 0, 0, EnumSymbol.NONE).setTemp(450).addTraits(GASEOUS);
|
||||
ULTRAHOTSTEAM = new FluidType("ULTRAHOTSTEAM", 0xE39393, 4, 0, 0, EnumSymbol.NONE).setTemp(600).addTraits(GASEOUS);
|
||||
COOLANT = new FluidType("COOLANT", 0xd8fcff, 1, 0, 0, EnumSymbol.NONE).addTraits(LIQUID);
|
||||
LAVA = new FluidType("LAVA", 0xFF3300, 4, 0, 0, EnumSymbol.NOWATER).setTemp(1200).addTraits(LIQUID, VISCOUS);
|
||||
DEUTERIUM = new FluidType("DEUTERIUM", 0x0000FF, 3, 4, 0, EnumSymbol.NONE).addTraits(new FT_Flammable(5_000), new FT_Combustible(FuelGrade.HIGH, 10_000), GASEOUS);
|
||||
@ -243,7 +246,7 @@ public class Fluids {
|
||||
WASTEGAS = new FluidType("WASTEGAS", 0xB8B8B8, 2, 0, 1, EnumSymbol.RADIATION).addTraits(new FT_VentRadiation(0.5F), NOCON, GASEOUS);
|
||||
GASOLINE = new FluidType("GASOLINE", 0x445772, 1, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x2F7747)).addTraits(new FT_Flammable(400_000), new FT_Combustible(FuelGrade.HIGH, 1_000_000), LIQUID);
|
||||
COALGAS = new FluidType("COALGAS", 0x445772, 1, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x2E155F)).addTraits(new FT_Flammable(75_000), new FT_Combustible(FuelGrade.MEDIUM, 150_000), LIQUID);
|
||||
SPENTSTEAM = new FluidType("SPENTSTEAM", 0x445772, 2, 0, 0, EnumSymbol.NONE).setCompression(1D).addTraits(NOCON, GASEOUS);
|
||||
SPENTSTEAM = new FluidType("SPENTSTEAM", 0x445772, 2, 0, 0, EnumSymbol.NONE).addTraits(NOCON, GASEOUS);
|
||||
FRACKSOL = new FluidType("FRACKSOL", 0x798A6B, 1, 3, 3, EnumSymbol.ACID).addContainers(new CD_Canister(0x4F887F)).addTraits(new FT_Corrosive(15), new FT_Poison(false, 0), LIQUID, VISCOUS);
|
||||
PLASMA_DT = new FluidType("PLASMA_DT", 0xF7AFDE, 0, 4, 0, EnumSymbol.RADIATION).setTemp(3250).addTraits(NOCON, NOID, PLASMA);
|
||||
PLASMA_HD = new FluidType("PLASMA_HD", 0xF0ADF4, 0, 4, 0, EnumSymbol.RADIATION).setTemp(2500).addTraits(NOCON, NOID, PLASMA);
|
||||
@ -329,6 +332,12 @@ public class Fluids {
|
||||
|
||||
// ^ ^ ^ ^ ^ ^ ^ ^
|
||||
//ADD NEW FLUIDS HERE
|
||||
|
||||
File folder = MainRegistry.configHbmDir;
|
||||
File customTypes = new File(folder.getAbsolutePath() + File.separatorChar + "hbmFluidTypes.json");
|
||||
if(!customTypes.exists()) initDefaultFluids(customTypes);
|
||||
readCustomFluids(customTypes);
|
||||
|
||||
//AND DON'T FORGET THE META DOWN HERE
|
||||
// V V V V V V V V
|
||||
|
||||
@ -477,6 +486,8 @@ public class Fluids {
|
||||
metaOrder.add(SMOKE);
|
||||
metaOrder.add(SMOKE_LEADED);
|
||||
metaOrder.add(SMOKE_POISON);
|
||||
|
||||
for(FluidType custom : customFluids) metaOrder.add(custom);
|
||||
|
||||
CHLORINE.addTraits(new FT_Toxin().addEntry(new ToxinDirectDamage(ModDamageSource.cloud, 2F, 20, HazardClass.GAS_CHLORINE, false)));
|
||||
PHOSGENE.addTraits(new FT_Toxin().addEntry(new ToxinDirectDamage(ModDamageSource.cloud, 4F, 20, HazardClass.GAS_CHLORINE, false)));
|
||||
@ -619,19 +630,72 @@ public class Fluids {
|
||||
registerCalculatedFuel(SYNGAS, (coalHeat * (1000 /* bucket */ / 100 /* mB per coal */) * flammabilityLow * demandLow * complexityChemplant) * 1.5, 1.25, FuelGrade.GAS); //same as coal oil, +50% bonus
|
||||
registerCalculatedFuel(OXYHYDROGEN, 5_000, 3, FuelGrade.GAS); // whatever
|
||||
|
||||
File folder = MainRegistry.configHbmDir;
|
||||
|
||||
File config = new File(folder.getAbsolutePath() + File.separatorChar + "hbmFluids.json");
|
||||
File template = new File(folder.getAbsolutePath() + File.separatorChar + "_hbmFluids.json");
|
||||
File config = new File(folder.getAbsolutePath() + File.separatorChar + "hbmFluidTraits.json");
|
||||
File template = new File(folder.getAbsolutePath() + File.separatorChar + "_hbmFluidTraits.json");
|
||||
|
||||
if(!config.exists()) {
|
||||
writeDefault(template);
|
||||
writeDefaultTraits(template);
|
||||
} else {
|
||||
readConfig(config);
|
||||
readTraits(config);
|
||||
}
|
||||
}
|
||||
|
||||
private static void writeDefault(File file) {
|
||||
private static void initDefaultFluids(File file) {
|
||||
|
||||
try {
|
||||
JsonWriter writer = new JsonWriter(new FileWriter(file));
|
||||
writer.setIndent(" ");
|
||||
writer.beginObject();
|
||||
|
||||
writer.name("CUSTOM_DEMO").beginObject();
|
||||
writer.name("name").value("Custom Fluid Demo");
|
||||
writer.name("id").value(1000);
|
||||
writer.name("color").value(0xff0000);
|
||||
writer.name("tint").value(0xff0000);
|
||||
writer.name("p").value(1).name("f").value(2).name("r").value(0);
|
||||
writer.name("symbol").value(EnumSymbol.OXIDIZER.name());
|
||||
writer.name("texture").value("custom_water");
|
||||
writer.name("temperature").value(20);
|
||||
writer.endObject();
|
||||
|
||||
writer.endObject();
|
||||
writer.close();
|
||||
} catch(IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private static void readCustomFluids(File file) {
|
||||
|
||||
try {
|
||||
JsonObject json = gson.fromJson(new FileReader(file), JsonObject.class);
|
||||
|
||||
for(Entry<String, JsonElement> entry : json.entrySet()) {
|
||||
|
||||
JsonObject obj = (JsonObject) entry.getValue();
|
||||
|
||||
String name = entry.getKey();
|
||||
int id = obj.get("id").getAsInt();
|
||||
String displayName = obj.get("name").getAsString();
|
||||
int color = obj.get("color").getAsInt();
|
||||
int tint = obj.get("tint").getAsInt();
|
||||
int p = obj.get("p").getAsInt();
|
||||
int f = obj.get("f").getAsInt();
|
||||
int r = obj.get("r").getAsInt();
|
||||
EnumSymbol symbol = EnumSymbol.valueOf(obj.get("symbol").getAsString());
|
||||
String texture = obj.get("texture").getAsString();
|
||||
int temperature = obj.get("temperature").getAsInt();
|
||||
|
||||
FluidType type = new FluidType(name, color, p, f, r, symbol, texture, tint, id, displayName).setTemp(temperature);
|
||||
customFluids.add(type);
|
||||
}
|
||||
|
||||
} catch(Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private static void writeDefaultTraits(File file) {
|
||||
|
||||
try {
|
||||
JsonWriter writer = new JsonWriter(new FileWriter(file));
|
||||
@ -639,7 +703,7 @@ public class Fluids {
|
||||
writer.beginObject();
|
||||
|
||||
for(FluidType type : metaOrder) {
|
||||
writer.name(type.getUnlocalizedName()).beginObject();
|
||||
writer.name(type.getName()).beginObject();
|
||||
|
||||
for(Entry<Class<? extends FluidTrait>, FluidTrait> entry : type.traits.entrySet()) {
|
||||
writer.name(FluidTrait.traitNameMap.inverse().get(entry.getKey())).beginObject();
|
||||
@ -657,14 +721,14 @@ public class Fluids {
|
||||
}
|
||||
}
|
||||
|
||||
private static void readConfig(File config) {
|
||||
private static void readTraits(File config) {
|
||||
|
||||
try {
|
||||
JsonObject json = gson.fromJson(new FileReader(config), JsonObject.class);
|
||||
|
||||
for(FluidType type : metaOrder) {
|
||||
|
||||
JsonElement element = json.get(type.getUnlocalizedName());
|
||||
JsonElement element = json.get(type.getName());
|
||||
if(element != null) {
|
||||
type.traits.clear();
|
||||
JsonObject obj = element.getAsJsonObject();
|
||||
@ -715,10 +779,17 @@ public class Fluids {
|
||||
protected static int registerSelf(FluidType fluid) {
|
||||
int id = idMapping.size();
|
||||
idMapping.put(id, fluid);
|
||||
registerOrder.add(fluid);
|
||||
nameMapping.put(fluid.getName(), fluid);
|
||||
return id;
|
||||
}
|
||||
|
||||
protected static void register(FluidType fluid, int id) {
|
||||
idMapping.put(id, fluid);
|
||||
registerOrder.add(fluid);
|
||||
nameMapping.put(fluid.getName(), fluid);
|
||||
}
|
||||
|
||||
public static FluidType fromID(int id) {
|
||||
FluidType fluid = idMapping.get(id);
|
||||
|
||||
@ -749,7 +820,7 @@ public class Fluids {
|
||||
FluidType[] all = new FluidType[idMapping.size()];
|
||||
|
||||
for(int i = 0; i < all.length; i++) {
|
||||
FluidType type = nice ? metaOrder.get(i) : idMapping.get(i);
|
||||
FluidType type = nice ? metaOrder.get(i) : registerOrder.get(i);
|
||||
|
||||
if(type == null) {
|
||||
throw new IllegalStateException("A severe error has occoured with NTM's fluid system! Fluid of the ID " + i + " has returned NULL in the registry!");
|
||||
|
||||
@ -15,7 +15,6 @@ import com.hbm.packet.TEFluidPacket;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@ -205,6 +204,12 @@ public class FluidTank {
|
||||
public void renderTank(int x, int y, double z, int width, int height) {
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
|
||||
int color = type.getTint();
|
||||
double r = ((color & 0xff0000) >> 16) / 255D;
|
||||
double g = ((color & 0x00ff00) >> 8) / 255D;
|
||||
double b = ((color & 0x0000ff) >> 0) / 255D;
|
||||
GL11.glColor3d(r, g, b);
|
||||
|
||||
y -= height;
|
||||
|
||||
@ -230,6 +235,7 @@ public class FluidTank {
|
||||
tessellator.addVertexWithUV(minX, minY, z, minU, minV);
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glColor3d(1D, 1D, 1D);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
|
||||
@ -237,7 +243,7 @@ public class FluidTank {
|
||||
if(x <= mouseX && x + width > mouseX && y < mouseY && y + height >= mouseY) {
|
||||
|
||||
List<String> list = new ArrayList();
|
||||
list.add(I18n.format(this.type.getUnlocalizedName()));
|
||||
list.add(this.type.getLocalizedName());
|
||||
list.add(fluid + "/" + maxFluid + "mB");
|
||||
|
||||
if(this.pressure != 0) {
|
||||
|
||||
@ -67,7 +67,7 @@ public class FT_Coolable extends FluidTrait {
|
||||
|
||||
@Override
|
||||
public void serializeJSON(JsonWriter writer) throws IOException {
|
||||
writer.name("coolsTo").value(this.coolsTo.getUnlocalizedName());
|
||||
writer.name("coolsTo").value(this.coolsTo.getName());
|
||||
writer.name("amountReq").value(this.amountReq);
|
||||
writer.name("amountProd").value(this.amountProduced);
|
||||
writer.name("heatEnergy").value(this.heatEnergy);
|
||||
|
||||
@ -87,7 +87,7 @@ public class FT_Heatable extends FluidTrait {
|
||||
|
||||
for(HeatingStep step : steps) {
|
||||
writer.beginObject();
|
||||
writer.name("typeProduced").value(step.typeProduced.getUnlocalizedName());
|
||||
writer.name("typeProduced").value(step.typeProduced.getName());
|
||||
writer.name("amountReq").value(step.amountReq);
|
||||
writer.name("amountProd").value(step.amountProduced);
|
||||
writer.name("heatReq").value(step.heatReq);
|
||||
|
||||
@ -10,7 +10,6 @@ import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineSeleniumEngine;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
@ -45,7 +44,7 @@ public class GUIMachineSelenium extends GuiInfoContainer {
|
||||
long energy = selenium.getHEFromFuel(type);
|
||||
|
||||
if(energy > 0)
|
||||
text.add(" " + I18nUtil.resolveKey(type.getUnlocalizedName()) + " (" + BobMathUtil.getShortNumber(energy) + "HE/t)");
|
||||
text.add(" " + type.getLocalizedName() + " (" + BobMathUtil.getShortNumber(energy) + "HE/t)");
|
||||
}
|
||||
|
||||
text.add(EnumChatFormatting.ITALIC + "(These numbers are base values,");
|
||||
|
||||
@ -137,7 +137,7 @@ public class GUIMachineTurbineGas extends GuiInfoContainer {
|
||||
fuels.add(I18nUtil.resolveKey("desc.gui.turbinegas.fuels"));
|
||||
for(FluidType type : Fluids.getInNiceOrder()) {
|
||||
if(type.hasTrait(FT_Combustible.class) && type.getTrait(FT_Combustible.class).getGrade() == FuelGrade.GAS) {
|
||||
fuels.add(" " + I18nUtil.resolveKey(type.getUnlocalizedName()));
|
||||
fuels.add(" " + type.getLocalizedName());
|
||||
}
|
||||
}
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 34 + 16, 16, 16, guiLeft - 8, guiTop + 44 + 16, fuels);
|
||||
|
||||
@ -12,7 +12,6 @@ import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.NBTControlPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineMixer;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
@ -47,8 +46,8 @@ public class GUIMixer extends GuiInfoContainer {
|
||||
List<String> label = new ArrayList();
|
||||
label.add(EnumChatFormatting.YELLOW + "Current recipe (" + (mixer.recipeIndex + 1) + "/" + recipes.length + "):");
|
||||
MixerRecipe recipe = recipes[mixer.recipeIndex % recipes.length];
|
||||
if(recipe.input1 != null) label.add("-" + I18nUtil.resolveKey(recipe.input1.type.getUnlocalizedName()));
|
||||
if(recipe.input2 != null) label.add("-" + I18nUtil.resolveKey(recipe.input2.type.getUnlocalizedName()));
|
||||
if(recipe.input1 != null) label.add("-" + recipe.input1.type.getLocalizedName());
|
||||
if(recipe.input2 != null) label.add("-" + recipe.input2.type.getLocalizedName());
|
||||
if(recipe.solidInput != null) label.add("-" + recipe.solidInput.extractForCyclingDisplay(20).getDisplayName());
|
||||
label.add(EnumChatFormatting.RED + "Click to change!");
|
||||
this.drawCustomInfoStat(x, y, guiLeft + 62, guiTop + 22, 12, 12, x, y, label);
|
||||
|
||||
@ -14,7 +14,6 @@ import com.hbm.items.machine.ItemFluidIDMulti;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.NBTItemControlPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
@ -111,7 +110,7 @@ public class GUIScreenFluid extends GuiScreen {
|
||||
return;
|
||||
|
||||
if(guiLeft + 7 + k * 18 <= i && guiLeft + 7 + k * 18 + 18 > i && guiTop + 29 < j && guiTop + 29 + 18 >= j)
|
||||
func_146283_a(Arrays.asList(new String[] { I18nUtil.resolveKey(this.searchArray[k].getUnlocalizedName()) }), i, j);
|
||||
func_146283_a(Arrays.asList(new String[] { this.searchArray[k].getLocalizedName() }), i, j);
|
||||
}
|
||||
}
|
||||
|
||||
@ -170,7 +169,7 @@ public class GUIScreenFluid extends GuiScreen {
|
||||
String subs = this.search.getText().toLowerCase(Locale.US);
|
||||
|
||||
for(FluidType type : Fluids.getInNiceOrder()) {
|
||||
String name = I18nUtil.resolveKey(type.getUnlocalizedName()).toLowerCase(Locale.US);
|
||||
String name = type.getLocalizedName();
|
||||
|
||||
if(name.contains(subs) && !type.hasNoID()) {
|
||||
this.searchArray[next] = type;
|
||||
|
||||
@ -24,7 +24,6 @@ import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.ItemFolderPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
@ -146,7 +145,7 @@ public class GUIScreenTemplateFolder extends GuiScreen {
|
||||
if(stack.getItem() == ModItems.fluid_identifier) {
|
||||
FluidType fluid = Fluids.fromID(stack.getItemDamage());
|
||||
|
||||
if(I18nUtil.resolveKey(fluid.getUnlocalizedName()).toLowerCase(Locale.US).contains(sub)) {
|
||||
if(fluid.getLocalizedName().contains(sub)) {
|
||||
stacks.add(stack);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import api.hbm.fluid.IFillableItem;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -83,7 +82,7 @@ public class ArmorFSBFueled extends ArmorFSB implements IFillableItem {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
list.add(I18nUtil.resolveKey(this.fuelType.getUnlocalizedName()) + ": " + BobMathUtil.getShortNumber(getFill(stack)) + " / " + BobMathUtil.getShortNumber(getMaxFill(stack)));
|
||||
list.add(this.fuelType.getLocalizedName() + ": " + BobMathUtil.getShortNumber(getFill(stack)) + " / " + BobMathUtil.getShortNumber(getMaxFill(stack)));
|
||||
super.addInformation(stack, player, list, ext);
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@ import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.render.model.ModelJetPack;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import api.hbm.fluid.IFillableItem;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -38,7 +37,7 @@ public abstract class JetpackBase extends ItemArmorMod implements IFillableItem
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
list.add(EnumChatFormatting.LIGHT_PURPLE + I18nUtil.resolveKey(fuel.getUnlocalizedName()) + ": " + this.getFuel(itemstack) + "mB / " + this.maxFuel + "mB");
|
||||
list.add(EnumChatFormatting.LIGHT_PURPLE + fuel.getUnlocalizedName() + ": " + this.getFuel(itemstack) + "mB / " + this.maxFuel + "mB");
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
list.add(EnumChatFormatting.GOLD + "Can be worn on its own!");
|
||||
@ -52,7 +51,7 @@ public abstract class JetpackBase extends ItemArmorMod implements IFillableItem
|
||||
if(jetpack == null)
|
||||
return;
|
||||
|
||||
list.add(EnumChatFormatting.RED + " " + stack.getDisplayName() + " (" + I18nUtil.resolveKey(fuel.getUnlocalizedName()) + ": " + this.getFuel(jetpack) + "mB / " + this.maxFuel + "mB");
|
||||
list.add(EnumChatFormatting.RED + " " + stack.getDisplayName() + " (" + fuel.getLocalizedName() + ": " + this.getFuel(jetpack) + "mB / " + this.maxFuel + "mB");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -40,7 +40,7 @@ public class ItemCanister extends Item {
|
||||
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
String s = ("" + StatCollector.translateToLocal(this.getUnlocalizedName() + ".name")).trim();
|
||||
String s1 = ("" + StatCollector.translateToLocal(Fluids.fromID(stack.getItemDamage()).getUnlocalizedName())).trim();
|
||||
String s1 = ("" + StatCollector.translateToLocal(Fluids.fromID(stack.getItemDamage()).getConditionalName())).trim();
|
||||
|
||||
if(s1 != null) {
|
||||
s = s + " " + s1;
|
||||
|
||||
@ -9,7 +9,6 @@ import com.hbm.util.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@ -76,7 +75,7 @@ public class ItemChemistryTemplate extends Item {
|
||||
for(int i = 0; i < 2; i++) {
|
||||
if(recipe.outputFluids[i] != null) {
|
||||
int p = recipe.outputFluids[i].pressure;
|
||||
list.add(recipe.outputFluids[i].fill + "mB " + I18n.format(recipe.outputFluids[i].type.getUnlocalizedName()) + (p != 0 ? (" at " + p + "PU") : ""));
|
||||
list.add(recipe.outputFluids[i].fill + "mB " + recipe.outputFluids[i].type.getLocalizedName() + (p != 0 ? (" at " + p + "PU") : ""));
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,7 +90,7 @@ public class ItemChemistryTemplate extends Item {
|
||||
for(int i = 0; i < 2; i++) {
|
||||
if(recipe.inputFluids[i] != null) {
|
||||
int p = recipe.inputFluids[i].pressure;
|
||||
list.add(recipe.inputFluids[i].fill + "mB " + I18n.format(recipe.inputFluids[i].type.getUnlocalizedName()) + (p != 0 ? (" at " + p + "PU") : ""));
|
||||
list.add(recipe.inputFluids[i].fill + "mB " + recipe.inputFluids[i].type.getLocalizedName() + (p != 0 ? (" at " + p + "PU") : ""));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ public class ItemFluidDuct extends Item {
|
||||
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
String s = ("" + StatCollector.translateToLocal(this.getUnlocalizedName() + ".name")).trim();
|
||||
String s1 = ("" + StatCollector.translateToLocal(Fluids.fromID(stack.getItemDamage()).getUnlocalizedName())).trim();
|
||||
String s1 = ("" + StatCollector.translateToLocal(Fluids.fromID(stack.getItemDamage()).getConditionalName())).trim();
|
||||
|
||||
if(s1 != null) {
|
||||
s = s + " " + s1;
|
||||
|
||||
@ -20,7 +20,6 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.inventory.Container;
|
||||
@ -45,7 +44,7 @@ public class ItemFluidIDMulti extends Item implements IItemFluidIdentifier, IIte
|
||||
setType(stack, secondary, true);
|
||||
setType(stack, primary, false);
|
||||
world.playSoundAtEntity(player, "random.orb", 0.25F, 1.25F);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.startTranslation(secondary.getUnlocalizedName()).flush(), /*MainRegistry.proxy.ID_DETONATOR*/ 7, 3000), (EntityPlayerMP) player);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.startTranslation(secondary.getConditionalName()).flush(), /*MainRegistry.proxy.ID_DETONATOR*/ 7, 3000), (EntityPlayerMP) player);
|
||||
}
|
||||
|
||||
if(world.isRemote && player.isSneaking()) {
|
||||
@ -68,9 +67,9 @@ public class ItemFluidIDMulti extends Item implements IItemFluidIdentifier, IIte
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
list.add(I18nUtil.resolveKey(getUnlocalizedName() + ".info"));
|
||||
list.add(" " + I18n.format(getType(stack, true).getUnlocalizedName()));
|
||||
list.add(" " + getType(stack, true).getLocalizedName());
|
||||
list.add(I18nUtil.resolveKey(getUnlocalizedName() + ".info2"));
|
||||
list.add(" " + I18n.format(getType(stack, false).getUnlocalizedName()));
|
||||
list.add(" " + getType(stack, false).getLocalizedName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -82,7 +82,7 @@ public class ItemFluidIcon extends Item {
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
String s = (StatCollector.translateToLocal(Fluids.fromID(stack.getItemDamage()).getUnlocalizedName())).trim();
|
||||
String s = (StatCollector.translateToLocal(Fluids.fromID(stack.getItemDamage()).getConditionalName())).trim();
|
||||
|
||||
if(s != null) {
|
||||
return s;
|
||||
|
||||
@ -13,7 +13,6 @@ import com.hbm.util.I18nUtil;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@ -65,7 +64,7 @@ public class ItemFluidIdentifier extends Item implements IItemFluidIdentifier {
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("info.templatefolder", I18nUtil.resolveKey(ModItems.template_folder.getUnlocalizedName() + ".name")));
|
||||
list.add("");
|
||||
list.add(I18nUtil.resolveKey(getUnlocalizedName() + ".info"));
|
||||
list.add(" " + I18n.format(Fluids.fromID(stack.getItemDamage()).getUnlocalizedName()));
|
||||
list.add(" " + Fluids.fromID(stack.getItemDamage()).getLocalizedName());
|
||||
list.add("");
|
||||
list.add(I18nUtil.resolveKey(getUnlocalizedName() + ".usage0"));
|
||||
list.add(I18nUtil.resolveKey(getUnlocalizedName() + ".usage1"));
|
||||
|
||||
@ -48,7 +48,7 @@ public class ItemFluidTank extends Item {
|
||||
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
String s = ("" + StatCollector.translateToLocal(this.getUnlocalizedName() + ".name")).trim();
|
||||
String s1 = ("" + StatCollector.translateToLocal(Fluids.fromID(stack.getItemDamage()).getUnlocalizedName())).trim();
|
||||
String s1 = ("" + StatCollector.translateToLocal(Fluids.fromID(stack.getItemDamage()).getConditionalName())).trim();
|
||||
|
||||
if(s1 != null) {
|
||||
s = s + " " + s1;
|
||||
|
||||
@ -42,7 +42,7 @@ public class ItemGasTank extends Item {
|
||||
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
String s = ("" + StatCollector.translateToLocal(this.getUnlocalizedName() + ".name")).trim();
|
||||
String s1 = ("" + StatCollector.translateToLocal(Fluids.fromID(stack.getItemDamage()).getUnlocalizedName())).trim();
|
||||
String s1 = ("" + StatCollector.translateToLocal(Fluids.fromID(stack.getItemDamage()).getConditionalName())).trim();
|
||||
|
||||
if(s1 != null) {
|
||||
s = s + " " + s1;
|
||||
|
||||
@ -75,7 +75,7 @@ public class ItemAnalyzer extends Item {
|
||||
if(te instanceof IFluidDuct) {
|
||||
|
||||
player.addChatMessage(new ChatComponentText(
|
||||
"Duct Type: " + I18n.format(((IFluidDuct)te).getType().getUnlocalizedName())));
|
||||
"Duct Type: " + ((IFluidDuct)te).getType().getLocalizedName()));
|
||||
}
|
||||
|
||||
if(te instanceof TileEntityPylon) {
|
||||
|
||||
@ -10,7 +10,6 @@ import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import api.hbm.block.IToolable;
|
||||
import api.hbm.block.IToolable.ToolType;
|
||||
@ -70,7 +69,7 @@ public class ItemBlowtorch extends Item implements IFillableItem {
|
||||
initNBT(stack);
|
||||
}
|
||||
|
||||
return stack.stackTagCompound.getInteger(type.getUnlocalizedName());
|
||||
return stack.stackTagCompound.getInteger(type.getName());
|
||||
}
|
||||
|
||||
public int getMaxFill(FluidType type) {
|
||||
@ -86,7 +85,7 @@ public class ItemBlowtorch extends Item implements IFillableItem {
|
||||
initNBT(stack);
|
||||
}
|
||||
|
||||
stack.stackTagCompound.setInteger(type.getUnlocalizedName(), fill);
|
||||
stack.stackTagCompound.setInteger(type.getName(), fill);
|
||||
}
|
||||
|
||||
public void initNBT(ItemStack stack) {
|
||||
@ -200,7 +199,7 @@ public class ItemBlowtorch extends Item implements IFillableItem {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private String getFillGauge(ItemStack stack, FluidType type) {
|
||||
return I18nUtil.resolveKey(type.getUnlocalizedName()) + ": " + String.format(Locale.US, "%,d", this.getFill(stack, type)) + " / " + String.format(Locale.US, "%,d", this.getMaxFill(type));
|
||||
return type.getLocalizedName() + ": " + String.format(Locale.US, "%,d", this.getFill(stack, type)) + " / " + String.format(Locale.US, "%,d", this.getMaxFill(type));
|
||||
}
|
||||
|
||||
@Override public boolean providesFluid(FluidType type, ItemStack stack) { return false; }
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import api.hbm.fluid.IFillableItem;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -38,7 +37,7 @@ public class ItemToolAbilityFueled extends ItemToolAbility implements IFillableI
|
||||
list.add(EnumChatFormatting.GOLD + "Fuel: " + this.getFill(stack) + "/" + this.maxFuel + "mB");
|
||||
|
||||
for(FluidType type : acceptedFuels) {
|
||||
list.add(EnumChatFormatting.YELLOW + "- " + I18nUtil.resolveKey(type.getUnlocalizedName()));
|
||||
list.add(EnumChatFormatting.YELLOW + "- " + type.getLocalizedName());
|
||||
}
|
||||
|
||||
super.addInformation(stack, player, list, ext);
|
||||
|
||||
@ -20,7 +20,6 @@ import api.hbm.fluid.IFillableItem;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -103,7 +102,7 @@ public class ItemGunChemthrower extends ItemGunBase implements IFillableItem {
|
||||
|
||||
list.add("Ammo: " + getMag(stack) + " / " + mainConfig.ammoCap + "mB");
|
||||
|
||||
list.add("Ammo Type: " + I18n.format(this.getFluidType(stack).getUnlocalizedName()));
|
||||
list.add("Ammo Type: " + this.getFluidType(stack).getLocalizedName());
|
||||
|
||||
int dura = mainConfig.durability - getItemWear(stack);
|
||||
|
||||
|
||||
@ -56,6 +56,7 @@ public class RenderFluidTank extends TileEntitySpecialRenderer implements IItemR
|
||||
ResourceManager.fluidtank_exploded.renderPart("Tank");
|
||||
}
|
||||
|
||||
GL11.glColor3d(1D, 1D, 1D);
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
if(type != null && type != Fluids.NONE) {
|
||||
@ -80,6 +81,16 @@ public class RenderFluidTank extends TileEntitySpecialRenderer implements IItemR
|
||||
}
|
||||
|
||||
public String getTextureFromType(FluidType type) {
|
||||
|
||||
if(type.customFluid) {
|
||||
int color = type.getTint();
|
||||
double r = ((color & 0xff0000) >> 16) / 255D;
|
||||
double g = ((color & 0x00ff00) >> 8) / 255D;
|
||||
double b = ((color & 0x0000ff) >> 0) / 255D;
|
||||
GL11.glColor3d(r, g, b);
|
||||
return "textures/models/tank/tank_NONE.png";
|
||||
}
|
||||
|
||||
String s = type.getName();
|
||||
|
||||
if(type.isAntimatter() || (type.hasTrait(FT_Corrosive.class) && type.getTrait(FT_Corrosive.class).isHighlyCorrosive()))
|
||||
|
||||
@ -382,7 +382,7 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
|
||||
case BOILER:
|
||||
stats.add(EnumChatFormatting.BLUE + I18nUtil.resolveKey("rbmk.boiler.water", this.data.getInteger("water"), this.data.getInteger("maxWater")));
|
||||
stats.add(EnumChatFormatting.WHITE + I18nUtil.resolveKey("rbmk.boiler.steam", this.data.getInteger("steam"), this.data.getInteger("maxSteam")));
|
||||
stats.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("rbmk.boiler.type", I18nUtil.resolveKey(Fluids.fromID(this.data.getShort("type")).getUnlocalizedName())));
|
||||
stats.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("rbmk.boiler.type", Fluids.fromID(this.data.getShort("type")).getLocalizedName()));
|
||||
break;
|
||||
case CONTROL:
|
||||
|
||||
@ -398,10 +398,10 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
|
||||
break;
|
||||
|
||||
case HEATEX:
|
||||
stats.add(EnumChatFormatting.BLUE + I18nUtil.resolveKey(I18nUtil.resolveKey(Fluids.fromID(this.data.getShort("type")).getUnlocalizedName()) + " " +
|
||||
this.data.getInteger("water") + "/" + this.data.getInteger("maxWater") + "mB"));
|
||||
stats.add(EnumChatFormatting.RED + I18nUtil.resolveKey(I18nUtil.resolveKey(Fluids.fromID(this.data.getShort("hottype")).getUnlocalizedName()) + " " +
|
||||
this.data.getInteger("steam") + "/" + this.data.getInteger("maxSteam") + "mB"));
|
||||
stats.add(EnumChatFormatting.BLUE + Fluids.fromID(this.data.getShort("type")).getLocalizedName() + " " +
|
||||
this.data.getInteger("water") + "/" + this.data.getInteger("maxWater") + "mB");
|
||||
stats.add(EnumChatFormatting.RED + Fluids.fromID(this.data.getShort("hottype")).getLocalizedName() + " " +
|
||||
this.data.getInteger("steam") + "/" + this.data.getInteger("maxSteam") + "mB");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 786 B |
BIN
src/main/resources/assets/hbm/textures/gui/fluids/custom_oil.png
Normal file
BIN
src/main/resources/assets/hbm/textures/gui/fluids/custom_oil.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 545 B |
Binary file not shown.
|
After Width: | Height: | Size: 702 B |
Binary file not shown.
|
After Width: | Height: | Size: 471 B |
Loading…
x
Reference in New Issue
Block a user