mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
i fucking hate github
this is to fix everything that github just broke including removing the shit from that one PR that broke everything
This commit is contained in:
parent
ab9db6806c
commit
d217cfb7f3
12
changelog
12
changelog
@ -1,6 +1,12 @@
|
||||
## Added
|
||||
* Doors!
|
||||
* Your favorites from 1.12, the 7 remaining doors have finally been ported
|
||||
* Thanks to KoblizekXD for biting the bullet
|
||||
|
||||
## Changed
|
||||
* Light oil and cracked light oil can now be refomred into large quantities of aromatic hydrocarbons a well as some reformate gas
|
||||
* Reduced the blast resistance of the large doors from absurdly high to still very but not quite as high
|
||||
* Custom missiles are now launchable using the radar
|
||||
* NTM's structures should no longer spawn in dimensions besides the overworld. Ores will still generate, assuming the config option is set.
|
||||
|
||||
## Fixed
|
||||
* Fixed thorium bedrock ore using the wrong ore dict key, making it unable to be processed via centrifuge or acidizer
|
||||
* Fixed custom machine NEI slots going out of bounds after the third slot
|
||||
* Fixed ancient bug where custom missiles launched using the launch table would not use the accuracy calculation and always be pin-point accurate
|
||||
@ -15,8 +15,31 @@ public interface IRadarDetectableNT {
|
||||
public static final int TIER_AB = 10;
|
||||
public static final int PLAYER = 11;
|
||||
public static final int ARTY = 12;
|
||||
/** Reserved type that shows a unique purple blip. Used for when nothing else applies. */
|
||||
public static final int SPECIAL = 13;
|
||||
|
||||
/** Name use for radar display, uses I18n for lookup */
|
||||
public String getUnlocalizedName();
|
||||
/** The type of dot to show on the radar as well as the redstone level in tier mode */
|
||||
public int getBlipLevel();
|
||||
/** Whether the object can be seen by this type of radar */
|
||||
public boolean canBeSeenBy(Object radar);
|
||||
/** Whether the object is currently visible, as well as whether the radar's setting allow for picking this up */
|
||||
public boolean paramsApplicable(RadarScanParams params);
|
||||
/** Whether this radar entry should be counted for the redstone output */
|
||||
public boolean suppliesRedstone(RadarScanParams params);
|
||||
|
||||
public static class RadarScanParams {
|
||||
public boolean scanMissiles = true;
|
||||
public boolean scanShells = true;
|
||||
public boolean scanPlayers = true;
|
||||
public boolean smartMode = true;
|
||||
|
||||
public RadarScanParams(boolean m, boolean s, boolean p, boolean smart) {
|
||||
this.scanMissiles = m;
|
||||
this.scanShells = s;
|
||||
this.scanPlayers = p;
|
||||
this.smartMode = smart;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,34 +7,41 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
public class RadarEntry {
|
||||
|
||||
/** Name use for radar display, uses I18n for lookup */
|
||||
public String unlocalizedName;
|
||||
/** The type of dot to show on the radar as well as the redstone level in tier mode */
|
||||
public int blipLevel;
|
||||
public int posX;
|
||||
public int posY;
|
||||
public int posZ;
|
||||
public int dim;
|
||||
public int entityID;
|
||||
/** Whether this radar entry should be counted for the redstone output */
|
||||
public boolean redstone;
|
||||
|
||||
public RadarEntry() { } //blank ctor for packets
|
||||
|
||||
public RadarEntry(String name, int level, int x, int y, int z, int dim) {
|
||||
public RadarEntry(String name, int level, int x, int y, int z, int dim, int entityID, boolean redstone) {
|
||||
this.unlocalizedName = name;
|
||||
this.blipLevel = level;
|
||||
this.posX = x;
|
||||
this.posY = y;
|
||||
this.posZ = z;
|
||||
this.dim = dim;
|
||||
this.entityID = entityID;
|
||||
this.redstone = redstone;
|
||||
}
|
||||
|
||||
public RadarEntry(IRadarDetectableNT detectable, Entity entity) {
|
||||
this(detectable.getUnlocalizedName(), detectable.getBlipLevel(), (int) Math.floor(entity.posX), (int) Math.floor(entity.posY), (int) Math.floor(entity.posZ), entity.dimension);
|
||||
public RadarEntry(IRadarDetectableNT detectable, Entity entity, boolean redstone) {
|
||||
this(detectable.getUnlocalizedName(), detectable.getBlipLevel(), (int) Math.floor(entity.posX), (int) Math.floor(entity.posY), (int) Math.floor(entity.posZ), entity.dimension, entity.getEntityId(), redstone);
|
||||
}
|
||||
|
||||
public RadarEntry(IRadarDetectable detectable, Entity entity) {
|
||||
this(detectable.getTargetType().name, detectable.getTargetType().ordinal(), (int) Math.floor(entity.posX), (int) Math.floor(entity.posY), (int) Math.floor(entity.posZ), entity.dimension);
|
||||
this(detectable.getTargetType().name, detectable.getTargetType().ordinal(), (int) Math.floor(entity.posX), (int) Math.floor(entity.posY), (int) Math.floor(entity.posZ), entity.dimension, entity.getEntityId(), entity.motionY < 0);
|
||||
}
|
||||
|
||||
public RadarEntry(EntityPlayer player) {
|
||||
this(player.getDisplayName(), IRadarDetectableNT.PLAYER, (int) Math.floor(player.posX), (int) Math.floor(player.posY), (int) Math.floor(player.posZ), player.dimension);
|
||||
this(player.getDisplayName(), IRadarDetectableNT.PLAYER, (int) Math.floor(player.posX), (int) Math.floor(player.posY), (int) Math.floor(player.posZ), player.dimension, player.getEntityId(), true);
|
||||
}
|
||||
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
@ -44,6 +51,7 @@ public class RadarEntry {
|
||||
this.posY = buf.readInt();
|
||||
this.posZ = buf.readInt();
|
||||
this.dim = buf.readShort();
|
||||
this.entityID = buf.readInt();
|
||||
}
|
||||
|
||||
public void toBytes(ByteBuf buf) {
|
||||
@ -53,5 +61,6 @@ public class RadarEntry {
|
||||
buf.writeInt(this.posY);
|
||||
buf.writeInt(this.posZ);
|
||||
buf.writeShort(this.dim);
|
||||
buf.writeInt(this.entityID);
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,8 +21,9 @@ public interface ITooltipProvider {
|
||||
if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
for(String s : I18nUtil.resolveKeyArray(((Block)this).getUnlocalizedName() + ".desc")) list.add(EnumChatFormatting.YELLOW + s);
|
||||
} else {
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +I18nUtil.resolveKey("tooltip.block" ,
|
||||
EnumChatFormatting.YELLOW +"" + EnumChatFormatting.ITALIC + "LSHIFT"));
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +"Hold <" +
|
||||
EnumChatFormatting.YELLOW + "" + EnumChatFormatting.ITALIC + "LSHIFT" +
|
||||
EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC + "> to display more info");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -831,7 +831,6 @@ public class ModBlocks {
|
||||
public static Block crane_splitter;
|
||||
|
||||
public static Block drone_waypoint;
|
||||
public static Block drone_waypoint_request;
|
||||
public static Block drone_crate;
|
||||
public static Block drone_waypoint_request;
|
||||
public static Block drone_dock;
|
||||
@ -2014,7 +2013,6 @@ public class ModBlocks {
|
||||
piston_inserter = new PistonInserter().setBlockName("piston_inserter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
|
||||
drone_waypoint = new DroneWaypoint().setBlockName("drone_waypoint").setHardness(0.1F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":drone_waypoint");
|
||||
drone_waypoint_request = new DroneWaypointRequest().setBlockName("drone_waypoint_request").setHardness(0.1F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":drone_waypoint_request");
|
||||
drone_crate = new DroneCrate().setBlockName("drone_crate").setHardness(0.1F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
drone_waypoint_request = new DroneWaypointRequest().setBlockName("drone_waypoint_request").setHardness(0.1F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":drone_waypoint_request");
|
||||
drone_dock = new DroneDock().setBlockName("drone_dock").setHardness(0.1F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":drone_dock");
|
||||
@ -3298,7 +3296,6 @@ public class ModBlocks {
|
||||
register(conveyor_lift);
|
||||
register(crane_splitter);
|
||||
register(drone_waypoint);
|
||||
register(drone_waypoint_request);
|
||||
register(drone_crate);
|
||||
register(drone_waypoint_request);
|
||||
register(drone_dock);
|
||||
|
||||
@ -15,7 +15,6 @@ 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;
|
||||
import net.minecraft.block.Block;
|
||||
@ -209,47 +208,47 @@ public class BlockFluidBarrel extends BlockContainer implements ITooltipProvider
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
if(this == ModBlocks.barrel_plastic) {
|
||||
list.add(EnumChatFormatting.AQUA + I18nUtil.resolveKey("trait.tile.barrel.capacity","12,000"));
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("trait.tile.barrel.hot")[1]);
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("trait.tile.barrel.corrosive")[4]);
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("trait.tile.barrel.antimatter")[1]);
|
||||
list.add(EnumChatFormatting.AQUA + "Capacity: 12,000mB");
|
||||
list.add(EnumChatFormatting.YELLOW + "Cannot store hot fluids");
|
||||
list.add(EnumChatFormatting.YELLOW + "Cannot store corrosive fluids");
|
||||
list.add(EnumChatFormatting.YELLOW + "Cannot store antimatter");
|
||||
}
|
||||
|
||||
if(this == ModBlocks.barrel_corroded) {
|
||||
list.add(EnumChatFormatting.AQUA + I18nUtil.resolveKey("trait.tile.barrel.capacity","6,000"));
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.tile.barrel.hot")[0]);
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.tile.barrel.corrosive")[0]);
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("trait.tile.barrel.antimatter")[1]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKey("trait.tile.barrel.leak"));
|
||||
list.add(EnumChatFormatting.AQUA + "Capacity: 6,000mB");
|
||||
list.add(EnumChatFormatting.GREEN + "Can store hot fluids");
|
||||
list.add(EnumChatFormatting.GREEN + "Can store highly corrosive fluids");
|
||||
list.add(EnumChatFormatting.YELLOW + "Cannot store antimatter");
|
||||
list.add(EnumChatFormatting.RED + "Leaky");
|
||||
}
|
||||
|
||||
if(this == ModBlocks.barrel_iron) {
|
||||
list.add(EnumChatFormatting.AQUA + I18nUtil.resolveKey("trait.tile.barrel.capacity","8,000"));
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.tile.barrel.hot")[0]);
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("trait.tile.barrel.corrosive")[3]);
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("trait.tile.barrel.antimatter")[1]);
|
||||
list.add(EnumChatFormatting.AQUA + "Capacity: 8,000mB");
|
||||
list.add(EnumChatFormatting.GREEN + "Can store hot fluids");
|
||||
list.add(EnumChatFormatting.YELLOW + "Cannot store corrosive fluids properly");
|
||||
list.add(EnumChatFormatting.YELLOW + "Cannot store antimatter");
|
||||
}
|
||||
|
||||
if(this == ModBlocks.barrel_steel) {
|
||||
list.add(EnumChatFormatting.AQUA + I18nUtil.resolveKey("trait.tile.barrel.capacity","16,000"));
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.tile.barrel.hot")[0]);
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.tile.barrel.corrosive")[1]);
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("trait.tile.barrel.corrosive")[2]);
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("trait.tile.barrel.antimatter")[1]);
|
||||
list.add(EnumChatFormatting.AQUA + "Capacity: 16,000mB");
|
||||
list.add(EnumChatFormatting.GREEN + "Can store hot fluids");
|
||||
list.add(EnumChatFormatting.GREEN + "Can store corrosive fluids");
|
||||
list.add(EnumChatFormatting.YELLOW + "Cannot store highly corrosive fluids properly");
|
||||
list.add(EnumChatFormatting.YELLOW + "Cannot store antimatter");
|
||||
}
|
||||
|
||||
if(this == ModBlocks.barrel_antimatter) {
|
||||
list.add(EnumChatFormatting.AQUA + I18nUtil.resolveKey("trait.tile.barrel.capacity","16,000"));
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.tile.barrel.hot")[0]);
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.tile.barrel.corrosive")[0]);
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.tile.barrel.antimatter")[0]);
|
||||
list.add(EnumChatFormatting.AQUA + "Capacity: 16,000mB");
|
||||
list.add(EnumChatFormatting.GREEN + "Can store hot fluids");
|
||||
list.add(EnumChatFormatting.GREEN + "Can store highly corrosive fluids");
|
||||
list.add(EnumChatFormatting.GREEN + "Can store antimatter");
|
||||
}
|
||||
|
||||
if(this == ModBlocks.barrel_tcalloy) {
|
||||
list.add(EnumChatFormatting.AQUA + I18nUtil.resolveKey("trait.tile.barrel.capacity","24,000"));
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.tile.barrel.hot")[0]);
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.tile.barrel.corrosive")[0]);
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("trait.tile.barrel.antimatter")[1]);
|
||||
list.add(EnumChatFormatting.AQUA + "Capacity: 24,000mB");
|
||||
list.add(EnumChatFormatting.GREEN + "Can store hot fluids");
|
||||
list.add(EnumChatFormatting.GREEN + "Can store highly corrosive fluids");
|
||||
list.add(EnumChatFormatting.YELLOW + "Cannot store antimatter");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,8 +59,9 @@ public class BlockHadronCooler extends BlockMulti implements ITooltipProvider {
|
||||
if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
for(String s : I18nUtil.resolveKeyArray(this.getUnlocalizedName(stack) + ".desc")) list.add(EnumChatFormatting.YELLOW + s);
|
||||
} else {
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +I18nUtil.resolveKey("tooltip.block" ,
|
||||
EnumChatFormatting.YELLOW +"" + EnumChatFormatting.ITALIC + "LSHIFT"));
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +"Hold <" +
|
||||
EnumChatFormatting.YELLOW + "" + EnumChatFormatting.ITALIC + "LSHIFT" +
|
||||
EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC + "> to display more info");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,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.tileentity.machine.storage.TileEntityMachineOrbus;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
@ -113,8 +113,9 @@ public class MachineCapacitor extends BlockContainer implements ILookOverlay, IP
|
||||
if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
for(String s : I18nUtil.resolveKeyArray("tile.capacitor.desc")) list.add(EnumChatFormatting.YELLOW + s);
|
||||
} else {
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +I18nUtil.resolveKey("tooltip.block" ,
|
||||
EnumChatFormatting.YELLOW +"" + EnumChatFormatting.ITALIC + "LSHIFT"));
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +"Hold <" +
|
||||
EnumChatFormatting.YELLOW + "" + EnumChatFormatting.ITALIC + "LSHIFT" +
|
||||
EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC + "> to display more info");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,6 @@ import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineGasFlare;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -62,7 +61,13 @@ public class MachineGasFlare extends BlockDummyable implements ITooltipProvider
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
for(String s : I18nUtil.resolveKeyArray("tile.machine_flare.desc"))
|
||||
list.add(EnumChatFormatting.GOLD + s);
|
||||
|
||||
list.add(EnumChatFormatting.GOLD + "Can burn fluids and vent gasses");
|
||||
list.add(EnumChatFormatting.GOLD + "Burns up to " + EnumChatFormatting.RED + "10mB/t");
|
||||
list.add(EnumChatFormatting.GOLD + "Vents up to " + EnumChatFormatting.RED + "50mB/t");
|
||||
list.add("");
|
||||
list.add(EnumChatFormatting.YELLOW + "Fuel efficiency:");
|
||||
list.add(EnumChatFormatting.YELLOW + "-Flammable Gasses: " + EnumChatFormatting.RED + "50%");
|
||||
list.add(EnumChatFormatting.YELLOW + "-Flammable Liquids: " + EnumChatFormatting.RED + "10%");
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,7 +12,6 @@ import com.hbm.items.machine.IItemFluidIdentifier;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.IPersistentNBT;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityMachineFluidTank;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityMachineOrbus;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
|
||||
@ -5,7 +5,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.blocks.IBlockMulti;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.test.TestPipe;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -16,7 +15,6 @@ import com.hbm.util.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
||||
@ -7,7 +7,6 @@ import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.tileentity.network.TileEntityPylonBase;
|
||||
import com.hbm.tileentity.network.TileEntityPylonLarge;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -34,8 +33,9 @@ public class PylonLarge extends BlockDummyable implements ITooltipProvider {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
for(String s : I18nUtil.resolveKeyArray("tile.red_pylon_large.desc"))
|
||||
list.add(EnumChatFormatting.GOLD + s);
|
||||
list.add(EnumChatFormatting.GOLD + "Connection Type: " + EnumChatFormatting.YELLOW + "Quadruple");
|
||||
list.add(EnumChatFormatting.GOLD + "Connection Range: " + EnumChatFormatting.YELLOW + "100m");
|
||||
list.add(EnumChatFormatting.GOLD + "This pylon requires a substation!");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.tileentity.network.TileEntityPylon;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -25,7 +24,7 @@ public class PylonRedWire extends PylonBase {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
for(String s : I18nUtil.resolveKeyArray("tile.red_pylon.desc"))
|
||||
list.add(EnumChatFormatting.GOLD + s);
|
||||
list.add(EnumChatFormatting.GOLD + "Connection Type: " + EnumChatFormatting.YELLOW + "Single");
|
||||
list.add(EnumChatFormatting.GOLD + "Connection Range: " + EnumChatFormatting.YELLOW + "25m");
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,7 +8,6 @@ import com.hbm.tileentity.TileEntityProxyConductor;
|
||||
import com.hbm.tileentity.network.TileEntityPylonBase;
|
||||
import com.hbm.tileentity.network.TileEntitySubstation;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -38,8 +37,8 @@ public class Substation extends BlockDummyable implements ITooltipProvider {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
for(String s : I18nUtil.resolveKeyArray("tile.substation.desc"))
|
||||
list.add(EnumChatFormatting.GOLD + s);
|
||||
list.add(EnumChatFormatting.GOLD + "Connection Type: " + EnumChatFormatting.YELLOW + "Quadruple");
|
||||
list.add(EnumChatFormatting.GOLD + "Connection Range: " + EnumChatFormatting.YELLOW + "20m");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -14,7 +14,6 @@ import com.hbm.inventory.recipes.CustomMachineRecipes;
|
||||
import com.hbm.inventory.recipes.CustomMachineRecipes.CustomMachineRecipe;
|
||||
import com.hbm.items.machine.ItemFluidIcon;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.util.ItemStackUtil;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
|
||||
@ -105,7 +104,7 @@ public class CustomMachineHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return (I18nUtil.resolveKey("tile.cm_" + conf.unlocalizedName + ".name").startsWith("tile.cm_")) ? conf.localizedName : I18nUtil.resolveKey("tile.cm_" + conf.unlocalizedName + ".name");
|
||||
return conf.localizedName;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -218,8 +218,9 @@ public class FluidType {
|
||||
info.addAll(hidden);
|
||||
} else {
|
||||
|
||||
info.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +I18nUtil.resolveKey("tooltip.block" ,
|
||||
EnumChatFormatting.YELLOW +"" + EnumChatFormatting.ITALIC + "LSHIFT"));
|
||||
info.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +"Hold <" +
|
||||
EnumChatFormatting.YELLOW + "" + EnumChatFormatting.ITALIC + "LSHIFT" +
|
||||
EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC + "> to display more info");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,7 +7,6 @@ import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class FT_Combustible extends FluidTrait {
|
||||
@ -26,11 +25,11 @@ public class FT_Combustible extends FluidTrait {
|
||||
public void addInfo(List<String> info) {
|
||||
super.addInfo(info);
|
||||
|
||||
info.add(EnumChatFormatting.GOLD + I18nUtil.resolveKeyArray("hbmfluid.Trait.Combustible","","")[0]);
|
||||
info.add(EnumChatFormatting.GOLD + "[Combustible]");
|
||||
|
||||
if(combustionEnergy > 0) {
|
||||
info.add(EnumChatFormatting.GOLD + I18nUtil.resolveKeyArray("hbmfluid.Trait.Combustible",BobMathUtil.getShortNumber(combustionEnergy),"")[1]);
|
||||
info.add(EnumChatFormatting.GOLD + I18nUtil.resolveKeyArray("hbmfluid.Trait.Combustible","",this.fuelGrade.getGrade())[2]);
|
||||
info.add(EnumChatFormatting.GOLD + "Provides " + EnumChatFormatting.RED + "" + BobMathUtil.getShortNumber(combustionEnergy) + "HE " + EnumChatFormatting.GOLD + "per bucket");
|
||||
info.add(EnumChatFormatting.GOLD + "Fuel grade: " + EnumChatFormatting.RED + this.fuelGrade.getGrade());
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,11 +42,11 @@ public class FT_Combustible extends FluidTrait {
|
||||
}
|
||||
|
||||
public static enum FuelGrade {
|
||||
LOW(I18nUtil.resolveKeyArray("hbmfluid.Trait.Combustible.FuelGrade")[0]), //heating and industrial oil < star engine, iGen
|
||||
MEDIUM(I18nUtil.resolveKeyArray("hbmfluid.Trait.Combustible.FuelGrade")[1]), //petroil < diesel generator
|
||||
HIGH(I18nUtil.resolveKeyArray("hbmfluid.Trait.Combustible.FuelGrade")[2]), //diesel, gasoline < HP engine
|
||||
AERO(I18nUtil.resolveKeyArray("hbmfluid.Trait.Combustible.FuelGrade")[3]), //kerosene and other light aviation fuels < turbofan
|
||||
GAS(I18nUtil.resolveKeyArray("hbmfluid.Trait.Combustible.FuelGrade")[4]); //fuel gasses like NG, PG and syngas < gas turbine
|
||||
LOW("Low"), //heating and industrial oil < star engine, iGen
|
||||
MEDIUM("Medium"), //petroil < diesel generator
|
||||
HIGH("High"), //diesel, gasoline < HP engine
|
||||
AERO("Aviation"), //kerosene and other light aviation fuels < turbofan
|
||||
GAS("Gaseous"); //fuel gasses like NG, PG and syngas < gas turbine
|
||||
|
||||
private String grade;
|
||||
|
||||
|
||||
@ -10,7 +10,6 @@ import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class FT_Coolable extends FluidTrait {
|
||||
@ -43,14 +42,14 @@ public class FT_Coolable extends FluidTrait {
|
||||
|
||||
@Override
|
||||
public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.AQUA + I18nUtil.resolveKeyArray("hbmfluid.Trait.Coolable",heatEnergy,"")[0]);
|
||||
info.add(EnumChatFormatting.AQUA + "Thermal capacity: " + heatEnergy + " TU");
|
||||
for(CoolingType type : CoolingType.values()) {
|
||||
|
||||
double eff = getEfficiency(type);
|
||||
|
||||
if(eff > 0) {
|
||||
info.add(EnumChatFormatting.AQUA + "[" + type.name + "]");
|
||||
info.add(EnumChatFormatting.AQUA + I18nUtil.resolveKeyArray("hbmfluid.Trait.Coolable","",((int) (eff * 100D)))[1]);
|
||||
info.add(EnumChatFormatting.AQUA + "Efficiency: " + ((int) (eff * 100D)) + "%");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,7 +6,6 @@ import java.util.List;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class FT_Corrosive extends FluidTrait {
|
||||
@ -32,9 +31,9 @@ public class FT_Corrosive extends FluidTrait {
|
||||
public void addInfo(List<String> info) {
|
||||
|
||||
if(isHighlyCorrosive())
|
||||
info.add(EnumChatFormatting.GOLD + I18nUtil.resolveKeyArray("hbmfluid.Trait.Corrosive")[0]);
|
||||
info.add(EnumChatFormatting.GOLD + "[Strongly Corrosive]");
|
||||
else
|
||||
info.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("hbmfluid.Trait.Corrosive")[1]);
|
||||
info.add(EnumChatFormatting.YELLOW + "[Corrosive]");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -7,7 +7,6 @@ import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class FT_Flammable extends FluidTrait {
|
||||
@ -29,10 +28,10 @@ public class FT_Flammable extends FluidTrait {
|
||||
public void addInfo(List<String> info) {
|
||||
super.addInfo(info);
|
||||
|
||||
info.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("hbmfluid.Trait.Flammable","")[0]);
|
||||
info.add(EnumChatFormatting.YELLOW + "[Flammable]");
|
||||
|
||||
if(energy > 0)
|
||||
info.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("hbmfluid.Trait.Flammable",BobMathUtil.getShortNumber(energy))[1]);
|
||||
info.add(EnumChatFormatting.YELLOW + "Provides " + EnumChatFormatting.RED + "" + BobMathUtil.getShortNumber(energy) + "TU " + EnumChatFormatting.YELLOW + "per bucket");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -6,7 +6,6 @@ import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import java.io.IOException;
|
||||
@ -43,14 +42,14 @@ public class FT_Heatable extends FluidTrait {
|
||||
|
||||
@Override
|
||||
public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.AQUA + I18nUtil.resolveKeyArray("hbmfluid.Trait.Coolable",this.getFirstStep().heatReq,"")[0]);
|
||||
info.add(EnumChatFormatting.AQUA + "Thermal capacity: " + this.getFirstStep().heatReq + " TU");
|
||||
for(HeatingType type : HeatingType.values()) {
|
||||
|
||||
double eff = getEfficiency(type);
|
||||
|
||||
if(eff > 0) {
|
||||
info.add(EnumChatFormatting.AQUA + "[" + type.name + "]");
|
||||
info.add(EnumChatFormatting.AQUA + I18nUtil.resolveKeyArray("hbmfluid.Trait.Coolable","",((int) (eff * 100D)))[1]);
|
||||
info.add(EnumChatFormatting.AQUA + "Efficiency: " + ((int) (eff * 100D)) + "%");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,7 +6,6 @@ import java.util.List;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class FT_PWRModerator extends FluidTrait {
|
||||
@ -23,13 +22,13 @@ public class FT_PWRModerator extends FluidTrait {
|
||||
|
||||
@Override
|
||||
public void addInfo(List<String> info) {
|
||||
info.add(EnumChatFormatting.BLUE + I18nUtil.resolveKeyArray("hbmfluid.Trait.PWRModerator","","")[0]);
|
||||
info.add(EnumChatFormatting.BLUE + "[PWR Flux Multiplier]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInfoHidden(List<String> info) {
|
||||
int mult = (int) (multiplier * 100 - 100);
|
||||
info.add(EnumChatFormatting.BLUE + I18nUtil.resolveKeyArray("hbmfluid.Trait.PWRModerator",(mult >= 0 ? "+" : ""),mult)[1]);
|
||||
info.add(EnumChatFormatting.BLUE + "Core flux " + (mult >= 0 ? "+" : "") + mult + "%");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -6,7 +6,6 @@ import java.util.List;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
@Deprecated //use FT_Toxin instead
|
||||
@ -32,7 +31,7 @@ public class FT_Poison extends FluidTrait {
|
||||
|
||||
@Override
|
||||
public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey("hbmfluid.Trait.Poison"));
|
||||
info.add(EnumChatFormatting.GREEN + "[Toxic Fumes]");
|
||||
}
|
||||
|
||||
@Override public void serializeJSON(JsonWriter writer) throws IOException {
|
||||
|
||||
@ -31,7 +31,7 @@ public class FT_Toxin extends FluidTrait {
|
||||
|
||||
@Override
|
||||
public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.LIGHT_PURPLE + I18nUtil.resolveKey("hbmfluid.Trait.Toxin"));
|
||||
info.add(EnumChatFormatting.LIGHT_PURPLE + "[Toxin]");
|
||||
|
||||
for(ToxinEntry entry : entries) {
|
||||
entry.addInfo(info);
|
||||
|
||||
@ -8,7 +8,6 @@ import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -33,7 +32,7 @@ public class FT_VentRadiation extends FluidTrait {
|
||||
|
||||
@Override
|
||||
public void addInfo(List<String> info) {
|
||||
info.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("hbmfluid.Trait.VentRadiation"));
|
||||
info.add(EnumChatFormatting.YELLOW + "[Radioactive]");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -2,64 +2,63 @@ package com.hbm.inventory.fluid.trait;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class FluidTraitSimple {
|
||||
|
||||
public static class FT_Gaseous extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.BLUE + I18nUtil.resolveKey("hbmfluid.TraitSimple.Gaseous"));
|
||||
info.add(EnumChatFormatting.BLUE + "[Gaseous]");
|
||||
}
|
||||
}
|
||||
|
||||
/** gaseous at room temperature, for cryogenic hydrogen for example */
|
||||
public static class FT_Gaseous_ART extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.BLUE + I18nUtil.resolveKey("hbmfluid.TraitSimple.Gaseous_ART"));
|
||||
info.add(EnumChatFormatting.BLUE + "[Gaseous at Room Temperature]");
|
||||
}
|
||||
}
|
||||
|
||||
public static class FT_Liquid extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.BLUE + I18nUtil.resolveKey("hbmfluid.TraitSimple.Liquid"));
|
||||
info.add(EnumChatFormatting.BLUE + "[Liquid]");
|
||||
}
|
||||
}
|
||||
|
||||
/** to viscous to be sprayed/turned into a mist */
|
||||
public static class FT_Viscous extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.BLUE + I18nUtil.resolveKey("hbmfluid.TraitSimple.Viscous"));
|
||||
info.add(EnumChatFormatting.BLUE + "[Viscous]");
|
||||
}
|
||||
}
|
||||
|
||||
public static class FT_Plasma extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.LIGHT_PURPLE + I18nUtil.resolveKey("hbmfluid.TraitSimple.Plasma"));
|
||||
info.add(EnumChatFormatting.LIGHT_PURPLE + "[Plasma]");
|
||||
}
|
||||
}
|
||||
|
||||
public static class FT_Amat extends FluidTrait {
|
||||
@Override public void addInfo(List<String> info) {
|
||||
info.add(EnumChatFormatting.DARK_RED + I18nUtil.resolveKey("hbmfluid.TraitSimple.Amat"));
|
||||
info.add(EnumChatFormatting.DARK_RED + "[Antimatter]");
|
||||
}
|
||||
}
|
||||
|
||||
public static class FT_LeadContainer extends FluidTrait {
|
||||
@Override public void addInfo(List<String> info) {
|
||||
info.add(EnumChatFormatting.DARK_RED + I18nUtil.resolveKey("hbmfluid.TraitSimple.LeadContainer"));
|
||||
info.add(EnumChatFormatting.DARK_RED + "[Requires hazardous material tank to hold]");
|
||||
}
|
||||
}
|
||||
|
||||
public static class FT_Delicious extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.DARK_GREEN + I18nUtil.resolveKey("hbmfluid.TraitSimple.Delicious"));
|
||||
info.add(EnumChatFormatting.DARK_GREEN + "[Delicious]");
|
||||
}
|
||||
}
|
||||
|
||||
public static class FT_Leaded extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.BLUE + I18nUtil.resolveKey("hbmfluid.TraitSimple.Leaded"));
|
||||
info.add(EnumChatFormatting.BLUE + "[Leaded Fuel]");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,22 +5,33 @@ import java.util.Arrays;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.NBTControlPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineRadarNT;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import api.hbm.entity.RadarEntry;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
||||
public class GUIMachineRadarNT extends GuiScreen {
|
||||
|
||||
protected static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_radar_nt.png");
|
||||
public static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_radar_nt.png");
|
||||
|
||||
protected TileEntityMachineRadarNT radar;
|
||||
protected int xSize = 216;
|
||||
protected int ySize = 234;
|
||||
protected int guiLeft;
|
||||
protected int guiTop;
|
||||
|
||||
public int lastMouseX;
|
||||
public int lastMouseY;
|
||||
|
||||
public GUIMachineRadarNT(TileEntityMachineRadarNT tile) {
|
||||
this.radar = tile;
|
||||
@ -33,6 +44,29 @@ public class GUIMachineRadarNT extends GuiScreen {
|
||||
this.guiTop = (this.height - this.ySize) / 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int x, int y, int i) {
|
||||
super.mouseClicked(x, y, i);
|
||||
|
||||
String cmd = null;
|
||||
|
||||
if(checkClick(x, y, -10, 88, 8, 8)) cmd = "missiles";
|
||||
if(checkClick(x, y, -10, 98, 8, 8)) cmd = "shells";
|
||||
if(checkClick(x, y, -10, 108, 8, 8)) cmd = "players";
|
||||
if(checkClick(x, y, -10, 118, 8, 8)) cmd = "smart";
|
||||
if(checkClick(x, y, -10, 128, 8, 8)) cmd = "red";
|
||||
if(checkClick(x, y, -10, 138, 8, 8)) cmd = "map";
|
||||
if(checkClick(x, y, -10, 158, 8, 8)) cmd = "gui1";
|
||||
if(checkClick(x, y, -10, 178, 8, 8)) cmd = "clear";
|
||||
|
||||
if(cmd != null) {
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setBoolean(cmd, true);
|
||||
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, radar.xCoord, radar.yCoord, radar.zCoord));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
this.drawDefaultBackground();
|
||||
@ -40,24 +74,192 @@ public class GUIMachineRadarNT extends GuiScreen {
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
this.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
this.lastMouseX = mouseX;
|
||||
this.lastMouseY = mouseY;
|
||||
}
|
||||
|
||||
private void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
if(checkClick(x, y, -10, 88, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.detectMissiles")), x, y);
|
||||
if(checkClick(x, y, -10, 98, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.detectShells")), x, y);
|
||||
if(checkClick(x, y, -10, 108, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.detectPlayers")), x, y);
|
||||
if(checkClick(x, y, -10, 118, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.smartMode")), x, y);
|
||||
if(checkClick(x, y, -10, 128, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.redMode")), x, y);
|
||||
if(checkClick(x, y, -10, 138, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.showMap")), x, y);
|
||||
private void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
|
||||
|
||||
if(checkClick(mouseX, mouseY, 8, 221, 200, 7)) this.func_146283_a(Arrays.asList(BobMathUtil.getShortNumber(radar.power) + "/" + BobMathUtil.getShortNumber(radar.maxPower) + "HE"), mouseX, mouseY);
|
||||
|
||||
if(checkClick(mouseX, mouseY, -10, 88, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.detectMissiles")), mouseX, mouseY);
|
||||
if(checkClick(mouseX, mouseY, -10, 98, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.detectShells")), mouseX, mouseY);
|
||||
if(checkClick(mouseX, mouseY, -10, 108, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.detectPlayers")), mouseX, mouseY);
|
||||
if(checkClick(mouseX, mouseY, -10, 118, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.smartMode")), mouseX, mouseY);
|
||||
if(checkClick(mouseX, mouseY, -10, 128, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.redMode")), mouseX, mouseY);
|
||||
if(checkClick(mouseX, mouseY, -10, 138, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.showMap")), mouseX, mouseY);
|
||||
if(checkClick(mouseX, mouseY, -10, 158, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.toggleGui")), mouseX, mouseY);
|
||||
if(checkClick(mouseX, mouseY, -10, 178, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.clearMap")), mouseX, mouseY);
|
||||
|
||||
if(!radar.entries.isEmpty()) {
|
||||
for(RadarEntry m : radar.entries) {
|
||||
int x = guiLeft + (int)((m.posX - radar.xCoord) / ((double) TileEntityMachineRadarNT.radarRange * 2 + 1) * (200D - 8D)) + 108;
|
||||
int z = guiTop + (int)((m.posZ - radar.zCoord) / ((double) TileEntityMachineRadarNT.radarRange * 2 + 1) * (200D - 8D)) + 117;
|
||||
|
||||
if(mouseX + 5 > x && mouseX - 4 <= x && mouseY + 5 > z && mouseY - 4 <= z) {
|
||||
|
||||
String[] text = new String[] { I18nUtil.resolveKey(m.unlocalizedName), m.posX + " / " + m.posZ, "Alt.: " + m.posY };
|
||||
this.func_146283_a(Arrays.asList(text), x, z);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(checkClick(mouseX, mouseY, 8, 17, 200, 200)) {
|
||||
int tX = (int) ((lastMouseX - guiLeft - 108) * ((double) TileEntityMachineRadarNT.radarRange * 2 + 1) / 192D + radar.xCoord);
|
||||
int tZ = (int) ((lastMouseY - guiTop - 117) * ((double) TileEntityMachineRadarNT.radarRange * 2 + 1) / 192D + radar.zCoord);
|
||||
this.func_146283_a(Arrays.asList(tX + " / " + tZ), lastMouseX, lastMouseY);
|
||||
}
|
||||
}
|
||||
|
||||
private void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
drawTexturedModalRect(guiLeft - 14, guiTop + 84, 224, 0, 14, 66);
|
||||
drawTexturedModalRect(guiLeft - 14, guiTop + 154, 224, 66, 14, 36);
|
||||
|
||||
if(radar.power > 0) {
|
||||
int i = (int) (radar.power * 200 / radar.maxPower);
|
||||
drawTexturedModalRect(guiLeft + 8, guiTop + 221, 0, 234, i, 16);
|
||||
}
|
||||
|
||||
if(radar.scanMissiles ^ (radar.jammed && radar.getWorldObj().rand.nextBoolean())) drawTexturedModalRect(guiLeft - 10, guiTop + 88, 238, 4, 8, 8);
|
||||
if(radar.scanShells ^ (radar.jammed && radar.getWorldObj().rand.nextBoolean())) drawTexturedModalRect(guiLeft - 10, guiTop + 98, 238, 14, 8, 8);
|
||||
if(radar.scanPlayers ^ (radar.jammed && radar.getWorldObj().rand.nextBoolean())) drawTexturedModalRect(guiLeft - 10, guiTop + 108, 238, 24, 8, 8);
|
||||
if(radar.smartMode ^ (radar.jammed && radar.getWorldObj().rand.nextBoolean())) drawTexturedModalRect(guiLeft - 10, guiTop + 118, 238, 34, 8, 8);
|
||||
if(radar.redMode ^ (radar.jammed && radar.getWorldObj().rand.nextBoolean())) drawTexturedModalRect(guiLeft - 10, guiTop + 128, 238, 44, 8, 8);
|
||||
if(radar.showMap ^ (radar.jammed && radar.getWorldObj().rand.nextBoolean())) drawTexturedModalRect(guiLeft - 10, guiTop + 138, 238, 54, 8, 8);
|
||||
|
||||
if(radar.power < radar.consumption) return;
|
||||
|
||||
if(radar.jammed) {
|
||||
for(int i = 0; i < 5; i++) {
|
||||
for(int j = 0; j < 5; j++) {
|
||||
drawTexturedModalRect(guiLeft + 8 + i * 40, guiTop + 17 + j * 40, 216, 118 + radar.getWorldObj().rand.nextInt(81), 40, 40);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(radar.showMap) {
|
||||
Tessellator tess = Tessellator.instance;
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
tess.startDrawingQuads();
|
||||
for(int i = 0; i < 40_000; i++) {
|
||||
int iX = i % 200;
|
||||
int iZ = i / 200;
|
||||
byte b = radar.map[i];
|
||||
if(b > 0) {
|
||||
int color = ((b - 50) * 255 / 78) << 8;
|
||||
tess.setColorOpaque_I(color);
|
||||
tess.addVertex(guiLeft + 8 + iX, guiTop + 18 + iZ, this.zLevel);
|
||||
tess.addVertex(guiLeft + 9 + iX, guiTop + 18 + iZ, this.zLevel);
|
||||
tess.addVertex(guiLeft + 9 + iX, guiTop + 17 + iZ, this.zLevel);
|
||||
tess.addVertex(guiLeft + 8 + iX, guiTop + 17 + iZ, this.zLevel);
|
||||
}
|
||||
}
|
||||
tess.draw();
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
Vec3 tr = Vec3.createVectorHelper(100, 0, 0);
|
||||
Vec3 tl = Vec3.createVectorHelper(100, 0, 0);
|
||||
Vec3 bl = Vec3.createVectorHelper(0, -5, 0);
|
||||
float rot = (float) -Math.toRadians(radar.prevRotation + (radar.rotation - radar.prevRotation) * f + 180F);
|
||||
tr.rotateAroundZ(rot);
|
||||
tl.rotateAroundZ(rot + 0.25F);
|
||||
bl.rotateAroundZ(rot);
|
||||
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Tessellator tess = Tessellator.instance;
|
||||
tess.startDrawingQuads();
|
||||
tess.setColorRGBA_I(0x00ff00, 0); tess.addVertex(guiLeft + 108, guiTop + 117, this.zLevel);
|
||||
tess.setColorRGBA_I(0x00ff00, 255); tess.addVertex(guiLeft + 108 + tr.xCoord, guiTop + 117 + tr.yCoord, this.zLevel);
|
||||
tess.setColorRGBA_I(0x00ff00, 0); tess.addVertex(guiLeft + 108 + tl.xCoord, guiTop + 117 + tl.yCoord, this.zLevel);
|
||||
tess.setColorRGBA_I(0x00ff00, 0); tess.addVertex(guiLeft + 108 + bl.xCoord, guiTop + 117 + bl.yCoord, this.zLevel);
|
||||
tess.draw();
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
if(!radar.entries.isEmpty()) {
|
||||
for(RadarEntry m : radar.entries) {
|
||||
double x = (m.posX - radar.xCoord) / ((double) TileEntityMachineRadarNT.radarRange * 2 + 1) * (200D - 8D) - 4D;
|
||||
double z = (m.posZ - radar.zCoord) / ((double) TileEntityMachineRadarNT.radarRange * 2 + 1) * (200D - 8D) - 4D;
|
||||
int t = m.blipLevel;
|
||||
drawTexturedModalRectDouble(guiLeft + 108 + x, guiTop + 117 + z, 216, 8 * t, 8, 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void drawTexturedModalRectDouble(double x, double y, int sourceX, int sourceY, int sizeX, int sizeY) {
|
||||
float f = 0.00390625F;
|
||||
float f1 = 0.00390625F;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(x, y + sizeY, this.zLevel, (sourceX + 0) * f, (sourceY + sizeY) * f1);
|
||||
tessellator.addVertexWithUV(x + sizeX, y + sizeY, this.zLevel, (sourceX + sizeX) * f, (sourceY + sizeY) * f1);
|
||||
tessellator.addVertexWithUV(x + sizeX, y, this.zLevel, (sourceX + sizeX) * f, (sourceY + 0) * f1);
|
||||
tessellator.addVertexWithUV(x, y, this.zLevel, (sourceX + 0) * f, (sourceY + 0) * f1);
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
protected boolean checkClick(int x, int y, int left, int top, int sizeX, int sizeY) {
|
||||
return guiLeft + left <= x && guiLeft + left + sizeX > x && guiTop + top < y && guiTop + top + sizeY >= y;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped(char c, int key) {
|
||||
if(key == 1 || key == this.mc.gameSettings.keyBindInventory.getKeyCode()) {
|
||||
this.mc.thePlayer.closeScreen();
|
||||
}
|
||||
|
||||
if(checkClick(lastMouseX, lastMouseY, 8, 17, 200, 200) && c >= '1' && c <= '8') {
|
||||
|
||||
int id = c - '1';
|
||||
|
||||
if(!radar.entries.isEmpty()) {
|
||||
for(RadarEntry m : radar.entries) {
|
||||
int x = guiLeft + (int) ((m.posX - radar.xCoord) / ((double) TileEntityMachineRadarNT.radarRange * 2 + 1) * (200D - 8D)) + 108;
|
||||
int z = guiTop + (int) ((m.posZ - radar.zCoord) / ((double) TileEntityMachineRadarNT.radarRange * 2 + 1) * (200D - 8D)) + 117;
|
||||
|
||||
if(lastMouseX + 5 > x && lastMouseX - 4 <= x && lastMouseY + 5 > z && lastMouseY - 4 <= z) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setInteger("launchEntity", m.entityID);
|
||||
data.setInteger("link", id);
|
||||
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, radar.xCoord, radar.yCoord, radar.zCoord));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int tX = (int) ((lastMouseX - guiLeft - 108) * ((double) TileEntityMachineRadarNT.radarRange * 2 + 1) / 192D + radar.xCoord);
|
||||
int tZ = (int) ((lastMouseY - guiTop - 117) * ((double) TileEntityMachineRadarNT.radarRange * 2 + 1) / 192D + radar.zCoord);
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setInteger("launchPosX", tX);
|
||||
data.setInteger("launchPosZ", tZ);
|
||||
data.setInteger("link", id);
|
||||
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, radar.xCoord, radar.yCoord, radar.zCoord));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesGuiPauseGame() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateScreen() {
|
||||
super.updateScreen();
|
||||
|
||||
if(!this.mc.thePlayer.isEntityAlive() || this.mc.thePlayer.isDead) {
|
||||
this.mc.thePlayer.closeScreen();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ public class ArmorDNT extends ArmorFSBPowered {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(I18nUtil.resolveKey("armor.charge",BobMathUtil.getShortNumber(getCharge(stack)),BobMathUtil.getShortNumber(maxPower)));
|
||||
list.add("Charge: " + BobMathUtil.getShortNumber(getCharge(stack)) + " / " + BobMathUtil.getShortNumber(maxPower));
|
||||
|
||||
list.add(EnumChatFormatting.GOLD + I18nUtil.resolveKey("armor.fullSetBonus"));
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@ import java.util.List;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -32,7 +31,7 @@ public class ArmorFSBPowered extends ArmorFSB implements IBatteryItem {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
list.add(I18nUtil.resolveKey("armor.charge",BobMathUtil.getShortNumber(getCharge(stack)),BobMathUtil.getShortNumber(maxPower)));
|
||||
list.add("Charge: " + BobMathUtil.getShortNumber(getCharge(stack)) + " / " + BobMathUtil.getShortNumber(maxPower));
|
||||
|
||||
super.addInformation(stack, player, list, ext);
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ public class ItemArmorMod extends Item {
|
||||
if(boots)
|
||||
list.add(" " + I18nUtil.resolveKey("armorMod.boots"));
|
||||
}
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + I18nUtil.resolveKey("armorMod.slot"));
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + "Slot:");
|
||||
|
||||
switch(this.type) {
|
||||
case ArmorModHandler.helmet_only: list.add(" " + I18nUtil.resolveKey("armorMod.type.helmet")); break;
|
||||
|
||||
@ -6,7 +6,6 @@ import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -22,7 +21,7 @@ public class ItemModAuto extends ItemArmorMod {
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.BLUE + I18nUtil.resolveKey("armorMod.mod.auto"));
|
||||
list.add(EnumChatFormatting.BLUE + "Imported from Japsterdam.");
|
||||
|
||||
list.add("");
|
||||
super.addInformation(stack, player, list, bool);
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@ -19,14 +18,14 @@ public class ItemModBandaid extends ItemArmorMod {
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("armorMod.mod.bandaid")[0]);
|
||||
list.add(EnumChatFormatting.RED + "3% chance for full heal when damaged");
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.RED + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.bandaid")[1]);
|
||||
list.add(EnumChatFormatting.RED + " " + stack.getDisplayName() + " (3% chance for full heal)");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -5,7 +5,6 @@ import java.util.List;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -30,7 +29,7 @@ public class ItemModBathwater extends ItemArmorMod {
|
||||
if(this == ModItems.bathwater_mk2)
|
||||
color = "" + (System.currentTimeMillis() % 1000 < 500 ? EnumChatFormatting.GREEN : EnumChatFormatting.YELLOW);
|
||||
|
||||
list.add(color + I18nUtil.resolveKeyArray("armorMod.mod.bathwater")[0]);
|
||||
list.add(color + "Inflicts poison on the attacker");
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
@ -43,7 +42,7 @@ public class ItemModBathwater extends ItemArmorMod {
|
||||
if(this == ModItems.bathwater_mk2)
|
||||
color = "" + (System.currentTimeMillis() % 1000 < 500 ? EnumChatFormatting.GREEN : EnumChatFormatting.YELLOW);
|
||||
|
||||
list.add(color + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.bathwater")[1]);
|
||||
list.add(color + " " + stack.getDisplayName() + " (Poisons attackers)");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -6,7 +6,6 @@ import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@ -21,15 +20,16 @@ public class ItemModCharm extends ItemArmorMod {
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.AQUA + I18nUtil.resolveKey("armorMod.mod.charm"));
|
||||
list.add(EnumChatFormatting.AQUA + "You feel blessed.");
|
||||
|
||||
if(this == ModItems.protection_charm) {
|
||||
for(String s : I18nUtil.resolveKeyArray( "armorMod.mod.charm.protection"))
|
||||
list.add(s);
|
||||
list.add(EnumChatFormatting.AQUA + "Diverts meteors away from the player.");
|
||||
list.add(EnumChatFormatting.AQUA + "Meteors no longer destroy blocks.");
|
||||
list.add(EnumChatFormatting.AQUA + "Halves broadcaster damage");
|
||||
}
|
||||
if(this == ModItems.meteor_charm) {
|
||||
for(String s : I18nUtil.resolveKeyArray( "armorMod.mod.charm.meteor"))
|
||||
list.add(s);
|
||||
list.add(EnumChatFormatting.AQUA + "Disables meteorite spawning.");
|
||||
list.add(EnumChatFormatting.AQUA + "Negates broadcaster damage");
|
||||
}
|
||||
|
||||
super.addInformation(stack, player, list, bool);
|
||||
|
||||
@ -5,7 +5,6 @@ import java.util.List;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.items.armor.ItemArmorMod;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@ -21,13 +20,13 @@ public class ItemModCladding extends ItemArmorMod {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
list.add(EnumChatFormatting.YELLOW + "+" + rad + I18nUtil.resolveKeyArray("armorMod.mod.cladding")[0]);
|
||||
list.add(EnumChatFormatting.YELLOW + "+" + rad + " rad-resistance");
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.YELLOW + " " + stack.getDisplayName() + " (+" + rad + I18nUtil.resolveKeyArray("armorMod.mod.cladding")[1]);
|
||||
list.add(EnumChatFormatting.YELLOW + " " + stack.getDisplayName() + " (+" + rad + " radiation resistence)");
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,7 +5,6 @@ import java.util.List;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.ai.EntityAICreeperSwell;
|
||||
import net.minecraft.entity.ai.EntityAITasks.EntityAITaskEntry;
|
||||
@ -26,14 +25,14 @@ public class ItemModDefuser extends ItemArmorMod {
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("armorMod.mod.defuser")[0]);
|
||||
list.add(EnumChatFormatting.YELLOW + "Defuses nearby creepers");
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.YELLOW + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.defuser")[1]);
|
||||
list.add(EnumChatFormatting.YELLOW + " " + stack.getDisplayName() + " (Defuses creepers)");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -40,7 +40,7 @@ public class ItemModGasmask extends ItemArmorMod implements IGasMask {
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("armorMod.mod.gasmask")[0]);
|
||||
list.add(EnumChatFormatting.GREEN + "Gas protection");
|
||||
|
||||
list.add("");
|
||||
super.addInformation(stack, player, list, bool);
|
||||
@ -50,7 +50,7 @@ public class ItemModGasmask extends ItemArmorMod implements IGasMask {
|
||||
List<HazardClass> haz = getBlacklist(stack, player);
|
||||
|
||||
if(!haz.isEmpty()) {
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("armorMod.mod.gasmask")[1]);
|
||||
list.add(EnumChatFormatting.RED + "Will never protect against:");
|
||||
|
||||
for(HazardClass clazz : haz) {
|
||||
list.add(EnumChatFormatting.DARK_RED + " -" + I18nUtil.resolveKey(clazz.lang));
|
||||
@ -61,7 +61,7 @@ public class ItemModGasmask extends ItemArmorMod implements IGasMask {
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
|
||||
list.add(EnumChatFormatting.GREEN + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.gasmask")[2]);
|
||||
list.add(EnumChatFormatting.GREEN + " " + stack.getDisplayName() + " (gas protection)");
|
||||
ArmorUtil.addGasMaskTooltip(stack, MainRegistry.proxy.me(), list, false);
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@ import com.google.common.collect.Multimap;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -28,11 +27,11 @@ public class ItemModHealth extends ItemArmorMod {
|
||||
|
||||
String color = "" + (System.currentTimeMillis() % 1000 < 500 ? EnumChatFormatting.RED : EnumChatFormatting.LIGHT_PURPLE);
|
||||
|
||||
list.add(color + "+" + (Math.round(health * 10 / 2) * 0.1) + I18nUtil.resolveKeyArray("armorMod.mod.health")[0]);
|
||||
list.add(color + "+" + (Math.round(health * 10 / 2) * 0.1) + " health");
|
||||
list.add("");
|
||||
|
||||
if(this == ModItems.black_diamond) {
|
||||
list.add(EnumChatFormatting.DARK_GRAY + I18nUtil.resolveKeyArray("armorMod.mod.health")[1]);
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "Nostalgia");
|
||||
list.add("");
|
||||
}
|
||||
|
||||
@ -44,7 +43,7 @@ public class ItemModHealth extends ItemArmorMod {
|
||||
|
||||
String color = "" + (System.currentTimeMillis() % 1000 < 500 ? EnumChatFormatting.RED : EnumChatFormatting.LIGHT_PURPLE);
|
||||
|
||||
list.add(color + " " + stack.getDisplayName() + " (+" + (Math.round(health * 10 / 2) * 0.1) + I18nUtil.resolveKeyArray("armorMod.mod.health")[0]);
|
||||
list.add(color + " " + stack.getDisplayName() + " (+" + (Math.round(health * 10 / 2) * 0.1) + " health)");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -20,15 +19,15 @@ public class ItemModInk extends ItemArmorMod {
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.LIGHT_PURPLE + I18nUtil.resolveKeyArray("armorMod.mod.Ink")[0]);
|
||||
list.add(EnumChatFormatting.LIGHT_PURPLE + I18nUtil.resolveKeyArray("armorMod.mod.Ink")[1]);
|
||||
list.add(EnumChatFormatting.LIGHT_PURPLE + "10% chance to nullify damage");
|
||||
list.add(EnumChatFormatting.LIGHT_PURPLE + "Flowers!");
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.LIGHT_PURPLE + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.Ink")[2]);
|
||||
list.add(EnumChatFormatting.LIGHT_PURPLE + " " + stack.getDisplayName() + " (10% chance to nullify damage)");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -8,7 +8,6 @@ import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
@ -38,18 +37,18 @@ public class ItemModInsert extends ItemArmorMod {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
if(damageMod != 1F)
|
||||
list.add(EnumChatFormatting.RED + (damageMod < 1 ? "-" : "+") + Math.abs(Math.round((1F - damageMod) * 100)) + I18nUtil.resolveKeyArray("armorMod.mod.Insert")[0]);
|
||||
list.add(EnumChatFormatting.RED + (damageMod < 1 ? "-" : "+") + Math.abs(Math.round((1F - damageMod) * 100)) + "% damage");
|
||||
if(projectileMod != 1F)
|
||||
list.add(EnumChatFormatting.YELLOW + "-" + Math.round((1F - projectileMod) * 100) + I18nUtil.resolveKeyArray("armorMod.mod.Insert")[1]);
|
||||
list.add(EnumChatFormatting.YELLOW + "-" + Math.round((1F - projectileMod) * 100) + "% projectile damage");
|
||||
if(explosionMod != 1F)
|
||||
list.add(EnumChatFormatting.YELLOW + "-" + Math.round((1F - explosionMod) * 100) + I18nUtil.resolveKeyArray("armorMod.mod.Insert")[2]);
|
||||
list.add(EnumChatFormatting.YELLOW + "-" + Math.round((1F - explosionMod) * 100) + "% explosion damage");
|
||||
if(speed != 1F)
|
||||
list.add(EnumChatFormatting.BLUE + "-" + Math.round((1F - speed) * 100) + I18nUtil.resolveKeyArray("armorMod.mod.Insert")[3]);
|
||||
list.add(EnumChatFormatting.BLUE + "-" + Math.round((1F - speed) * 100) + "% speed");
|
||||
|
||||
if(this == ModItems.insert_polonium)
|
||||
list.add(EnumChatFormatting.DARK_RED + "+100 RAD/s");
|
||||
|
||||
list.add((stack.getMaxDamage() - stack.getItemDamage()) + "/" + stack.getMaxDamage() + I18nUtil.resolveKeyArray("armorMod.mod.Insert")[4]);
|
||||
list.add((stack.getMaxDamage() - stack.getItemDamage()) + "/" + stack.getMaxDamage() + "HP");
|
||||
|
||||
list.add("");
|
||||
super.addInformation(stack, player, list, bool);
|
||||
@ -61,20 +60,20 @@ public class ItemModInsert extends ItemArmorMod {
|
||||
List<String> desc = new ArrayList();
|
||||
|
||||
if(damageMod != 1F)
|
||||
desc.add((damageMod < 1 ? "-" : "+") + Math.abs(Math.round((1F - damageMod) * 100)) + I18nUtil.resolveKeyArray("armorMod.mod.Insert")[0]);
|
||||
desc.add((damageMod < 1 ? "-" : "+") + Math.abs(Math.round((1F - damageMod) * 100)) + "% dmg");
|
||||
if(projectileMod != 1F)
|
||||
desc.add("-" + Math.round((1F - projectileMod) * 100) + I18nUtil.resolveKeyArray("armorMod.mod.Insert")[1]);
|
||||
desc.add("-" + Math.round((1F - projectileMod) * 100) + "% proj");
|
||||
if(explosionMod != 1F)
|
||||
desc.add("-" + Math.round((1F - explosionMod) * 100) + I18nUtil.resolveKeyArray("armorMod.mod.Insert")[2]);
|
||||
desc.add("-" + Math.round((1F - explosionMod) * 100) + "% exp");
|
||||
if(explosionMod != 1F)
|
||||
desc.add("-" + Math.round((1F - speed) * 100) + I18nUtil.resolveKeyArray("armorMod.mod.Insert")[3]);
|
||||
desc.add("-" + Math.round((1F - speed) * 100) + "% speed");
|
||||
|
||||
if(this == ModItems.insert_polonium)
|
||||
desc.add("+100 RAD/s");
|
||||
|
||||
String join = String.join(" / ", desc);
|
||||
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + " " + stack.getDisplayName() + " (" + join + " / " + (stack.getMaxDamage() - stack.getItemDamage()) + I18nUtil.resolveKeyArray("armorMod.mod.Insert")[4] + ")");
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + " " + stack.getDisplayName() + " (" + join + " / " + (stack.getMaxDamage() - stack.getItemDamage()) + "HP)");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -5,7 +5,6 @@ import java.util.List;
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -21,14 +20,14 @@ public class ItemModIron extends ItemArmorMod {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
list.add(EnumChatFormatting.WHITE + I18nUtil.resolveKeyArray("armorMod.mod.Iron")[0]);
|
||||
list.add(EnumChatFormatting.WHITE + "+0.5 knockback resistance");
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.WHITE + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.Iron")[1]);
|
||||
list.add(EnumChatFormatting.WHITE + " " + stack.getDisplayName() + " (+0.5 knockback resistence)");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -8,7 +8,6 @@ import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
@ -30,8 +29,11 @@ public class ItemModKnife extends ItemArmorMod {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
for(String s : I18nUtil.resolveKeyArray("armorMod.mod.Knife"))
|
||||
list.add(EnumChatFormatting.RED + s);
|
||||
|
||||
list.add(EnumChatFormatting.RED + "Pain.");
|
||||
list.add("");
|
||||
list.add(EnumChatFormatting.RED + "Hurts, doesn't it?");
|
||||
|
||||
list.add("");
|
||||
super.addInformation(stack, player, list, bool);
|
||||
}
|
||||
|
||||
@ -11,7 +11,6 @@ import com.hbm.saveddata.SatelliteSavedData;
|
||||
import com.hbm.saveddata.satellites.Satellite;
|
||||
import com.hbm.saveddata.satellites.SatelliteScanner;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -31,7 +30,7 @@ public class ItemModLens extends ItemArmorMod implements ISatChip {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
list.add(EnumChatFormatting.AQUA + I18nUtil.resolveKeyArray("armorMod.mod.Lens")[0] + this.getFreq(itemstack));
|
||||
list.add(EnumChatFormatting.AQUA + "Satellite Frequency: " + this.getFreq(itemstack));
|
||||
list.add("");
|
||||
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
@ -39,7 +38,7 @@ public class ItemModLens extends ItemArmorMod implements ISatChip {
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.AQUA + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.Lens",getFreq(stack))[1] );
|
||||
list.add(EnumChatFormatting.AQUA + " " + stack.getDisplayName() + " (Freq: " + getFreq(stack) + ")");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -24,15 +23,15 @@ public class ItemModLodestone extends ItemArmorMod {
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.DARK_GRAY + I18nUtil.resolveKeyArray("armorMod.mod.Lodestone")[0]);
|
||||
list.add(EnumChatFormatting.DARK_GRAY + I18nUtil.resolveKeyArray("armorMod.mod.Lodestone",range)[1]);
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "Attracts nearby items");
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "Item attraction range: " + range);
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.DARK_GRAY + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.Lodestone",range)[2] );
|
||||
list.add(EnumChatFormatting.DARK_GRAY + " " + stack.getDisplayName() + " (Magnetic range: " + range + ")");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -8,7 +8,6 @@ import java.util.List;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -25,14 +24,14 @@ public class ItemModMilk extends ItemArmorMod {
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.WHITE + I18nUtil.resolveKeyArray("armorMod.mod.Milk")[0]);
|
||||
list.add(EnumChatFormatting.WHITE + "Removes bad potion effects");
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.WHITE + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.Milk")[1]);
|
||||
list.add(EnumChatFormatting.WHITE + " " + stack.getDisplayName() + " (Removes bad potion effects)");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -22,14 +21,14 @@ public class ItemModMorningGlory extends ItemArmorMod {
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.LIGHT_PURPLE + I18nUtil.resolveKeyArray("armorMod.mod.MorningGlory")[0]);
|
||||
list.add(EnumChatFormatting.LIGHT_PURPLE + "5% chance to apply resistance when hit, wither immunity");
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.LIGHT_PURPLE + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.MorningGlory")[1]);
|
||||
list.add(EnumChatFormatting.LIGHT_PURPLE + " " + stack.getDisplayName() + " (5% for resistance, wither immunity)");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@ -17,13 +16,13 @@ public class ItemModObsidian extends ItemArmorMod {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + I18nUtil.resolveKeyArray("armorMod.mod.Obsidian")[0]);
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + "Makes dropped armor indestructible");
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.Obsidian")[1]);
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + " " + stack.getDisplayName() + " (Item indestructible)");
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,7 +5,6 @@ import java.util.List;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -26,10 +25,10 @@ public class ItemModPads extends ItemArmorMod {
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
if(damageMod != 1F)
|
||||
list.add(EnumChatFormatting.RED + "-" + Math.round((1F - damageMod) * 100) + I18nUtil.resolveKeyArray("armorMod.mod.Pads")[0]);
|
||||
list.add(EnumChatFormatting.RED + "-" + Math.round((1F - damageMod) * 100) + "% fall damage");
|
||||
|
||||
if(this == ModItems.pads_static)
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + I18nUtil.resolveKeyArray("armorMod.mod.Pads")[1]);
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + "Passively charges electric armor when walking");
|
||||
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
@ -39,9 +38,9 @@ public class ItemModPads extends ItemArmorMod {
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
|
||||
if(this == ModItems.pads_static)
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + " " + stack.getDisplayName() + " (-" + Math.round((1F - damageMod) * 100) + I18nUtil.resolveKeyArray("armorMod.mod.Pads")[2]);
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + " " + stack.getDisplayName() + " (-" + Math.round((1F - damageMod) * 100) + "% fall dmg / passive charge)");
|
||||
else
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + " " + stack.getDisplayName() + " (-" + Math.round((1F - damageMod) * 100) + I18nUtil.resolveKeyArray("armorMod.mod.Pads")[0]);
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + " " + stack.getDisplayName() + " (-" + Math.round((1F - damageMod) * 100) + "% fall dmg)");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@ -19,14 +18,14 @@ public class ItemModPolish extends ItemArmorMod {
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.BLUE + I18nUtil.resolveKeyArray("armorMod.mod.Polish")[0]);
|
||||
list.add(EnumChatFormatting.BLUE + "5% chance to nullify damage");
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.BLUE + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.Polish")[1]);
|
||||
list.add(EnumChatFormatting.BLUE + " " + stack.getDisplayName() + " (5% chance to nullify damage)");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -5,7 +5,6 @@ import java.util.List;
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@ -20,14 +19,14 @@ public class ItemModQuartz extends ItemArmorMod {
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.DARK_GRAY + I18nUtil.resolveKeyArray("armorMod.mod.Quartz")[0]);
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "Taking damage removes 10 RAD");
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.DARK_GRAY + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.Quartz")[1]);
|
||||
list.add(EnumChatFormatting.DARK_GRAY + " " + stack.getDisplayName() + " (-10 RAD when hit)");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -5,7 +5,6 @@ import java.util.List;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@ -21,19 +20,23 @@ public class ItemModRevive extends ItemArmorMod {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
if(this == ModItems.scrumpy) {
|
||||
list.add(EnumChatFormatting.GOLD + I18nUtil.resolveKeyArray("armorMod.mod.Revive.scrumpy")[0]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("armorMod.mod.Revive.scrumpy")[1]);
|
||||
list.add(EnumChatFormatting.GOLD + "But how did you survive?");
|
||||
list.add(EnumChatFormatting.RED + "I was drunk.");
|
||||
}
|
||||
if(this == ModItems.wild_p) {
|
||||
list.add(I18nUtil.resolveKey("armorMod.mod.Revive.wild_p"));
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "Explosive " + EnumChatFormatting.RED + "Reactive " + EnumChatFormatting.DARK_GRAY + "Plot " + EnumChatFormatting.RED + "Armor");
|
||||
}
|
||||
if(this == ModItems.fabsols_vodka) {
|
||||
for(String s : I18nUtil.resolveKeyArray("armorMod.mod.Revive.fabsols_vodka"))
|
||||
list.add(EnumChatFormatting.ITALIC + s);
|
||||
list.add(EnumChatFormatting.ITALIC + "In the news:");
|
||||
list.add(EnumChatFormatting.RED + "" + EnumChatFormatting.BOLD + "Man literally too angry to die.");
|
||||
list.add("");
|
||||
list.add(EnumChatFormatting.ITALIC + "\"I ain't got time to die\" says local");
|
||||
list.add(EnumChatFormatting.ITALIC + "man after ripping the physical manifestation");
|
||||
list.add(EnumChatFormatting.ITALIC + "of disaster itself in half.");
|
||||
}
|
||||
|
||||
list.add("");
|
||||
list.add(EnumChatFormatting.GOLD + "" + (stack.getMaxDamage() - stack.getItemDamage()) + I18nUtil.resolveKey("armorMod.mod.Revive"));
|
||||
list.add(EnumChatFormatting.GOLD + "" + (stack.getMaxDamage() - stack.getItemDamage()) + " revives left");
|
||||
list.add("");
|
||||
super.addInformation(stack, player, list, bool);
|
||||
}
|
||||
@ -41,6 +44,6 @@ public class ItemModRevive extends ItemArmorMod {
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
|
||||
list.add(EnumChatFormatting.GOLD + " " + stack.getDisplayName() + " (" + (stack.getMaxDamage() - stack.getItemDamage()) + I18nUtil.resolveKey("armorMod.mod.Revive") + ")");
|
||||
list.add(EnumChatFormatting.GOLD + " " + stack.getDisplayName() + " (" + (stack.getMaxDamage() - stack.getItemDamage()) + " revives left)");
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,7 +5,6 @@ import java.util.List;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@ -23,15 +22,15 @@ public class ItemModSensor extends ItemArmorMod {
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("armorMod.mod.Sensor")[0]);
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("armorMod.mod.Sensor")[1]);
|
||||
list.add(EnumChatFormatting.YELLOW + "Beeps near hazardous gasses");
|
||||
list.add(EnumChatFormatting.YELLOW + "Works in the inventory or when applied to armor");
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.YELLOW + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.Sensor")[2]);
|
||||
list.add(EnumChatFormatting.YELLOW + " " + stack.getDisplayName() + " (Detects gasses)");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -21,14 +20,14 @@ public class ItemModSerum extends ItemArmorMod {
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("armorMod.mod.Serum")[0]);
|
||||
list.add(EnumChatFormatting.GREEN + "Cures poison and gives strength");
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.BLUE + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.Serum")[1]);
|
||||
list.add(EnumChatFormatting.BLUE + " " + stack.getDisplayName() + " (replaces poison with strength)");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -6,7 +6,6 @@ import com.google.common.collect.Multimap;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
@ -27,12 +26,12 @@ public class ItemModServos extends ItemArmorMod {
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
if(this == ModItems.servo_set) {
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + I18nUtil.resolveKeyArray("armorMod.mod.Servos")[0]);
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + I18nUtil.resolveKeyArray("armorMod.mod.Servos")[1]);
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + "Chestplate: Haste I / Damage +50%");
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + "Leggings: Speed +25% / Jump II");
|
||||
}
|
||||
if(this == ModItems.servo_set_desh) {
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + I18nUtil.resolveKeyArray("armorMod.mod.Servos.desh")[0]);
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + I18nUtil.resolveKeyArray("armorMod.mod.Servos.desh")[1]);
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + "Chestplate: Haste III / Damage +150%");
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + "Leggings: Speed +50% / Jump III");
|
||||
}
|
||||
|
||||
list.add("");
|
||||
@ -47,20 +46,20 @@ public class ItemModServos extends ItemArmorMod {
|
||||
if(item.armorType == 1) {
|
||||
|
||||
if(this == ModItems.servo_set) {
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.Servos")[2]);
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + " " + stack.getDisplayName() + " (Haste I / Damage +50%)");
|
||||
}
|
||||
if(this == ModItems.servo_set_desh) {
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.Servos.desh")[2]);
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + " " + stack.getDisplayName() + " (Haste III / Damage +150%)");
|
||||
}
|
||||
}
|
||||
|
||||
if(item.armorType == 2) {
|
||||
|
||||
if(this == ModItems.servo_set) {
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.Servos")[3]);
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + " " + stack.getDisplayName() + " (Speed +25% / Jump II)");
|
||||
}
|
||||
if(this == ModItems.servo_set_desh) {
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.Servos.desh")[3]);
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + " " + stack.getDisplayName() + " (Speed +50% / Jump III)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@ -18,12 +17,12 @@ public class ItemModShackles extends ItemArmorMod {
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("armorMod.mod.Shackles")[0]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("armorMod.mod.Shackles")[1]);
|
||||
list.add(EnumChatFormatting.RED + "" + EnumChatFormatting.BOLD + I18nUtil.resolveKeyArray("armorMod.mod.Shackles")[2]);
|
||||
list.add(EnumChatFormatting.RED + "You will speak when I ask you to.");
|
||||
list.add(EnumChatFormatting.RED + "You will eat when I tell you to.");
|
||||
list.add(EnumChatFormatting.RED + "" + EnumChatFormatting.BOLD + "You will die when I allow you to.");
|
||||
|
||||
list.add("");
|
||||
list.add(EnumChatFormatting.GOLD + I18nUtil.resolveKeyArray("armorMod.mod.Shackles")[3]);
|
||||
list.add(EnumChatFormatting.GOLD + "∞ revives left");
|
||||
list.add("");
|
||||
super.addInformation(stack, player, list, bool);
|
||||
}
|
||||
@ -31,6 +30,6 @@ public class ItemModShackles extends ItemArmorMod {
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
|
||||
list.add(EnumChatFormatting.GOLD + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.Shackles")[4]);
|
||||
list.add(EnumChatFormatting.GOLD + " " + stack.getDisplayName() + " (∞ revives left)");
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,7 +7,6 @@ import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.render.model.ModelBackTesla;
|
||||
import com.hbm.tileentity.machine.TileEntityTesla;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
@ -31,14 +30,14 @@ public class ItemModTesla extends ItemArmorMod {
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("armorMod.mod.Tesla")[0]);
|
||||
list.add(EnumChatFormatting.YELLOW + "Zaps nearby entities (requires full electric set)");
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.YELLOW + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.Tesla")[1]);
|
||||
list.add(EnumChatFormatting.YELLOW + stack.getDisplayName() + " (zaps nearby entities)");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@ -18,14 +17,14 @@ public class ItemModTwoKick extends ItemArmorMod {
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKeyArray("armorMod.mod.TwoKick")[0]);
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("armorMod.mod.TwoKick")[1]);
|
||||
list.add(EnumChatFormatting.ITALIC + "\"I've had worse\"");
|
||||
list.add(EnumChatFormatting.YELLOW + "Punches fire 12 gauge shells");
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.YELLOW + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.TwoKick")[2]);
|
||||
list.add(EnumChatFormatting.YELLOW + " " + stack.getDisplayName() + " (Shotgun punches)");
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,7 +7,6 @@ import com.google.common.collect.Multimap;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.interfaces.IArmorModDash;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -32,14 +31,14 @@ public class ItemModV1 extends ItemArmorMod implements IArmorModDash {
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("armorMod.mod.V1")[0]);
|
||||
list.add(EnumChatFormatting.RED + "BLOOD IS FUEL");
|
||||
list.add("");
|
||||
super.addInformation(stack, player, list, bool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.RED + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.V1")[1]);
|
||||
list.add(EnumChatFormatting.RED + " " + stack.getDisplayName() + " (BLOOD IS FUEL)");
|
||||
}
|
||||
|
||||
public int getDashes() {
|
||||
|
||||
@ -6,7 +6,6 @@ import com.google.common.collect.Multimap;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
@ -28,7 +27,7 @@ public class ItemModWD40 extends ItemArmorMod {
|
||||
|
||||
String color = "" + (System.currentTimeMillis() % 1000 < 500 ? EnumChatFormatting.BLUE : EnumChatFormatting.YELLOW);
|
||||
|
||||
list.add(color + I18nUtil.resolveKeyArray("armorMod.mod.WD40")[0]);
|
||||
list.add(color + "Highly reduces damage taken by armor, +2 HP");
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
@ -38,7 +37,7 @@ public class ItemModWD40 extends ItemArmorMod {
|
||||
|
||||
String color = "" + (System.currentTimeMillis() % 1000 < 500 ? EnumChatFormatting.BLUE : EnumChatFormatting.YELLOW);
|
||||
|
||||
list.add(color + " " + stack.getDisplayName() + I18nUtil.resolveKeyArray("armorMod.mod.WD40")[1]);
|
||||
list.add(color + " " + stack.getDisplayName() + " (-80% armor wear / +2 HP)");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -8,7 +8,6 @@ import com.hbm.render.model.ModelJetPack;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
|
||||
import api.hbm.fluid.IFillableItem;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@ -41,7 +40,7 @@ public abstract class JetpackBase extends ItemArmorMod implements IFillableItem
|
||||
list.add(EnumChatFormatting.LIGHT_PURPLE + fuel.getLocalizedName() + ": " + this.getFuel(itemstack) + "mB / " + this.maxFuel + "mB");
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
list.add(EnumChatFormatting.GOLD + I18nUtil.resolveKey("item.jetpack.desc"));
|
||||
list.add(EnumChatFormatting.GOLD + "Can be worn on its own!");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -7,7 +7,6 @@ import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -15,7 +14,6 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -69,8 +67,9 @@ public class JetpackBooster extends JetpackBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.jetpack_boost.desc"))
|
||||
list.add(s);
|
||||
|
||||
list.add("High-powered vectorized jetpack.");
|
||||
list.add("Highly increased fuel consumption.");
|
||||
|
||||
super.addInformation(stack, player, list, ext);
|
||||
}
|
||||
|
||||
@ -7,7 +7,6 @@ import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -78,8 +77,9 @@ public class JetpackBreak extends JetpackBase {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
for(String s : I18nUtil.resolveKeyArray("item.jetpack_break.desc"))
|
||||
list.add(s);
|
||||
list.add("Regular jetpack that will automatically hover mid-air.");
|
||||
list.add("Sneaking will stop hover mode.");
|
||||
list.add("Hover mode will consume less fuel and increase air-mobility.");
|
||||
|
||||
super.addInformation(stack, player, list, ext);
|
||||
}
|
||||
|
||||
@ -7,7 +7,6 @@ import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -57,7 +56,7 @@ public class JetpackRegular extends JetpackBase {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
list.add(I18nUtil.resolveKey("item.jetpack_fly.desc"));
|
||||
list.add("Regular jetpack for simple upwards momentum.");
|
||||
|
||||
super.addInformation(stack, player, list, ext);
|
||||
}
|
||||
|
||||
@ -7,7 +7,6 @@ import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -69,8 +68,8 @@ public class JetpackVectorized extends JetpackBase {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
for(String s : I18nUtil.resolveKeyArray("item.jetpack_vector.desc"))
|
||||
list.add(s);
|
||||
list.add("High-mobility jetpack.");
|
||||
list.add("Higher fuel consumption.");
|
||||
|
||||
super.addInformation(stack, player, list, ext);
|
||||
}
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.items.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@ -26,6 +25,6 @@ public class ItemBlockBlastInfo extends ItemBlockBase {
|
||||
if(block == null)
|
||||
return;
|
||||
|
||||
list.add(EnumChatFormatting.GOLD + I18nUtil.resolveKey("desc.block.blastinfo", block.getExplosionResistance(null)));
|
||||
list.add(EnumChatFormatting.GOLD + "Blast Resistance: " + block.getExplosionResistance(null));
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,7 +5,6 @@ import java.util.List;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.RedBarrel;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
@ -22,21 +21,35 @@ public class ItemBlockLore extends ItemBlockBase {
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
|
||||
if(this.field_150939_a instanceof RedBarrel) {
|
||||
list.add(I18nUtil.resolveKey("tile.red_barrel.desc"));
|
||||
list.add("Static fluid barrel");
|
||||
}
|
||||
|
||||
if(this.field_150939_a == ModBlocks.meteor_battery) {
|
||||
list.add(I18nUtil.resolveKey("tile.meteor_battery.desc"));
|
||||
list.add("Provides infinite charge to tesla coils");
|
||||
}
|
||||
|
||||
if(this.field_150939_a == ModBlocks.ore_oil) {
|
||||
for(String s : I18nUtil.resolveKeyArray("tile.ore_oil.desc"))
|
||||
list.add(s);
|
||||
list.add("You weren't supposed to mine that.");
|
||||
list.add("Come on, get a derrick you doofus.");
|
||||
}
|
||||
|
||||
if(this.field_150939_a == ModBlocks.gravel_diamond) {
|
||||
for(String s : I18nUtil.resolveKeyArray("tile.gravel_diamond.desc"))
|
||||
list.add(s);
|
||||
list.add("There is some kind of joke here,");
|
||||
list.add("but I can't quite tell what it is.");
|
||||
list.add("");
|
||||
list.add("Update, 2020-07-04:");
|
||||
list.add("We deny any implications of a joke on");
|
||||
list.add("the basis that it was so severely unfunny");
|
||||
list.add("that people started stabbing their eyes out.");
|
||||
list.add("");
|
||||
list.add("Update, 2020-17-04:");
|
||||
list.add("As it turns out, \"Diamond Gravel\" was");
|
||||
list.add("never really a thing, rendering what might");
|
||||
list.add("have been a joke as totally nonsensical.");
|
||||
list.add("We apologize for getting your hopes up with");
|
||||
list.add("this non-joke that hasn't been made.");
|
||||
list.add("");
|
||||
list.add("i added an item for a joke that isn't even here, what am i, stupid? can't even tell the difference between gravel and a gavel, how did i not forget how to breathe yet?");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@ import java.util.List;
|
||||
import com.hbm.config.CustomMachineConfigJSON;
|
||||
import com.hbm.config.CustomMachineConfigJSON.MachineConfiguration;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
@ -38,7 +37,7 @@ public class ItemCustomMachine extends ItemBlock {
|
||||
MachineConfiguration conf = CustomMachineConfigJSON.niceList.get(id);
|
||||
|
||||
if(conf != null) {
|
||||
return (I18nUtil.resolveKey("tile.cm_" + conf.unlocalizedName + ".name").startsWith("tile.cm_")) ? conf.localizedName : I18nUtil.resolveKey("tile.cm_" + conf.unlocalizedName + ".name");
|
||||
return conf.localizedName;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
@ -15,8 +14,8 @@ public class ItemFleija extends Item {
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
|
||||
{
|
||||
for(String s : I18nUtil.resolveKeyArray( "tile.nuke_fleija.desc"))
|
||||
list.add(s);
|
||||
list.add("Used in:");
|
||||
list.add("F.L.E.I.J.A.");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.items.bomb;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -11,7 +10,12 @@ public class ItemMissileShuttle extends Item {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
for(String s : I18nUtil.resolveKeyArray( "item.missile_shuttle.desc"))
|
||||
list.add(s);
|
||||
list.add("Tonite, on bo''om gear:");
|
||||
list.add("James huffs leaded gasoline and");
|
||||
list.add("goes insane, Richard spends the");
|
||||
list.add("entire budget on a broken .PNG,");
|
||||
list.add("And I forget to set the infinite");
|
||||
list.add("Water tanks on our RBMK to flow");
|
||||
list.add("out, blowing up our entire base");
|
||||
}
|
||||
}
|
||||
@ -2,19 +2,17 @@ package com.hbm.items.bomb;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class ItemN2 extends Item {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
|
||||
{
|
||||
for(String s : I18nUtil.resolveKeyArray( "tile.nuke_n2.desc"))
|
||||
list.add(s);
|
||||
list.add("Used in:");
|
||||
list.add("N² Mine");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.items.bomb;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
@ -17,8 +16,10 @@ public class ItemPrototypeBlock extends ItemBlock {
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
|
||||
{
|
||||
for(String s : I18nUtil.resolveKeyArray( "tile.nuke_prototype.desc"))
|
||||
list.add(s);
|
||||
list.add("It didn't have to be like this.");
|
||||
list.add("");
|
||||
list.add("You monster.");
|
||||
|
||||
/*list.add("In memory of Euphemia.");
|
||||
list.add("");
|
||||
list.add("Rest in spaghetti, never forgetti.");*/
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.items.bomb;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -12,8 +11,8 @@ public class ItemSolinium extends Item {
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
|
||||
{
|
||||
for(String s : I18nUtil.resolveKeyArray( "tile.nuke_solinium.desc"))
|
||||
list.add(s);
|
||||
list.add("Used in:");
|
||||
list.add("Solinium Bomb");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,7 +6,6 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
@ -31,57 +30,72 @@ public class ItemLemon extends ItemFood {
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
|
||||
{
|
||||
if(this == ModItems.lemon) {
|
||||
list.add(I18nUtil.resolveKey("item.lemon.desc"));
|
||||
list.add("Eh, good enough.");
|
||||
}
|
||||
|
||||
if(this == ModItems.definitelyfood) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.definitelyfood.desc"))
|
||||
list.add(s);
|
||||
list.add("A'right, I got sick and tired of");
|
||||
list.add("having to go out, kill things just");
|
||||
list.add("to get food and not die, so here is ");
|
||||
list.add("my absolutely genius solution:");
|
||||
list.add("");
|
||||
list.add("Have some edible dirt.");
|
||||
}
|
||||
|
||||
if(this == ModItems.med_ipecac) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.med_ipecac.desc"))
|
||||
list.add(s);
|
||||
list.add("Bitter juice that will cause your stomach");
|
||||
list.add("to forcefully eject its contents.");
|
||||
}
|
||||
|
||||
if(this == ModItems.med_ptsd) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.med_ptsd.desc"))
|
||||
list.add(s);
|
||||
list.add("This isn't even PTSD mediaction, it's just");
|
||||
list.add("Ipecac in a different bottle!");
|
||||
}
|
||||
|
||||
if(this == ModItems.med_schizophrenia) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.med_schiziphrenia.desc"))
|
||||
list.add(s);
|
||||
list.add("Makes the voices go away. Just for a while.");
|
||||
list.add("");
|
||||
list.add("...");
|
||||
list.add("Better not take it.");
|
||||
}
|
||||
|
||||
if(this == ModItems.med_schizophrenia) {
|
||||
list.add("Makes the voices go away. Just for a while.");
|
||||
list.add("");
|
||||
list.add("...");
|
||||
list.add("Better not take it.");
|
||||
}
|
||||
|
||||
if(this == ModItems.loops) {
|
||||
list.add(I18nUtil.resolveKey("item.loops.desc"));
|
||||
list.add("Brøther, may I have some lööps?");
|
||||
}
|
||||
|
||||
if(this == ModItems.loop_stew) {
|
||||
list.add(I18nUtil.resolveKey("item.loop_stew.desc"));
|
||||
list.add("A very, very healthy breakfast.");
|
||||
}
|
||||
|
||||
if(this == ModItems.twinkie) {
|
||||
list.add(I18nUtil.resolveKey("item.twinkie.desc"));
|
||||
list.add("Expired 600 years ago!");
|
||||
}
|
||||
|
||||
if(this == ModItems.pudding) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.pudding.desc"))
|
||||
list.add(s);
|
||||
list.add("What if he did?");
|
||||
list.add("What if he didn't?");
|
||||
list.add("What if the world was made of pudding?");
|
||||
}
|
||||
|
||||
if(this == ModItems.ingot_semtex) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.ingot_semtex.desc"))
|
||||
list.add(s);
|
||||
list.add("Semtex H Plastic Explosive");
|
||||
list.add("Performant explosive for many applications.");
|
||||
list.add("Edible");
|
||||
}
|
||||
|
||||
if(this == ModItems.peas) {
|
||||
list.add(I18nUtil.resolveKey("item.peas.desc"));
|
||||
list.add("He accepts your offering.");
|
||||
}
|
||||
|
||||
if(this == ModItems.quesadilla) {
|
||||
list.add(I18nUtil.resolveKey("item.cheese_quesadilla.desc"));
|
||||
list.add("That's what a 50 year old yeast infection does to you.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.items.food;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
@ -40,15 +39,15 @@ public class ItemTemFlakes extends ItemFood {
|
||||
{
|
||||
if(itemstack.getItemDamage() == 0)
|
||||
{
|
||||
list.add(I18nUtil.resolveKeyArray("item.tem_flakes.desc")[0]);
|
||||
list.add("Heals 2HP DISCOUNT FOOD OF TEM!!!");
|
||||
}
|
||||
if(itemstack.getItemDamage() == 1)
|
||||
{
|
||||
list.add(I18nUtil.resolveKeyArray("item.tem_flakes.desc")[1]);
|
||||
list.add("Heals 2HP food of tem");
|
||||
}
|
||||
if(itemstack.getItemDamage() == 2)
|
||||
{
|
||||
list.add(I18nUtil.resolveKeyArray("item.tem_flakes.desc")[2]);
|
||||
list.add("Heals food of tem (expensiv)");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
@ -35,14 +34,14 @@ public class ItemBattery extends Item implements IBatteryItem {
|
||||
charge = getCharge(itemstack);
|
||||
|
||||
if(itemstack.getItem() != ModItems.fusion_core && itemstack.getItem() != ModItems.energy_core) {
|
||||
list.add(I18nUtil.resolveKey("desc.item.battery.charge",BobMathUtil.getShortNumber(charge),BobMathUtil.getShortNumber(maxCharge)));
|
||||
list.add("Energy stored: " + BobMathUtil.getShortNumber(charge) + "/" + BobMathUtil.getShortNumber(maxCharge) + "HE");
|
||||
} else {
|
||||
String charge1 = BobMathUtil.getShortNumber((charge * 100) / this.maxCharge);
|
||||
list.add(I18nUtil.resolveKey("desc.item.battery.chargePerc", charge1));
|
||||
list.add("Charge: " + charge1 + "%");
|
||||
list.add("(" + BobMathUtil.getShortNumber(charge) + "/" + BobMathUtil.getShortNumber(maxCharge) + "HE)");
|
||||
}
|
||||
list.add(I18nUtil.resolveKey("desc.item.battery.chargeRate",BobMathUtil.getShortNumber(chargeRate)));
|
||||
list.add(I18nUtil.resolveKey("desc.item.battery.dischargeRate",BobMathUtil.getShortNumber(dischargeRate)));
|
||||
list.add("Charge rate: " + BobMathUtil.getShortNumber(chargeRate) + "HE/t");
|
||||
list.add("Discharge rate: " + BobMathUtil.getShortNumber(dischargeRate) + "HE/t");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -34,131 +33,132 @@ public class ItemMachineUpgrade extends Item {
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
if(this.type == UpgradeType.SPEED) {
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[0]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.speed",(15 * this.tier),(300 * this.tier),"","","","","","")[0]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[1]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.speed","","",(1 + this.tier),(625 * this.tier),"","","","")[1]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[2]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.speed",(25 * this.tier),(50 * this.tier),"","","","","","")[0]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[3]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.speed",(25 * this.tier),(300 * this.tier),"","","","","","")[0]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[4]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.speed",(25 * this.tier),(300 * this.tier),"","","","","","")[0]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[5]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.speed","","","","",(25 * this.tier),(25 * this.tier),"","")[2]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[6]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.speed",(20 * this.tier),(1000 * this.tier),"","","","","","")[0]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[7]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.speed","","","","","","",(1 + this.tier),"")[3]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[8]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.speed","","","","","","",(1 + this.tier),"")[3]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[9]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.speed","","","","","","","",(0.25 * (double)this.tier))[4]);
|
||||
list.add(EnumChatFormatting.RED + "Mining Drill:");
|
||||
list.add("Delay -" + (15 * this.tier) + "% / Consumption +" + (300 * this.tier) + "HE/t");
|
||||
list.add(EnumChatFormatting.RED + "Laser Miner:");
|
||||
list.add("Delay ÷" + (1 + this.tier) + " / Consumption +" + (625 * this.tier) + "HE/t");
|
||||
list.add(EnumChatFormatting.RED + "Electric Furnace:");
|
||||
list.add("Delay -" + (25 * this.tier) + "% / Consumption +" + (50 * this.tier) + "HE/t");
|
||||
list.add(EnumChatFormatting.RED + "Assembly Machine:");
|
||||
list.add("Delay -" + (25 * this.tier) + "% / Consumption +" + (300 * this.tier) + "HE/t");
|
||||
list.add(EnumChatFormatting.RED + "Chemical Plant:");
|
||||
list.add("Delay -" + (25 * this.tier) + "% / Consumption +" + (300 * this.tier) + "HE/t");
|
||||
list.add(EnumChatFormatting.RED + "Oil Wells:");
|
||||
list.add("Delay -" + (25 * this.tier) + "% / Consumption +" + (25 * this.tier) + "%");
|
||||
list.add(EnumChatFormatting.RED + "Crystallizer:");
|
||||
list.add("Delay -" + (20 * this.tier) + "% / Consumption +" + (1000 * this.tier) + "HE/t");
|
||||
list.add(EnumChatFormatting.RED + "Cyclotron:");
|
||||
list.add("Speed x" + (1 + this.tier));
|
||||
list.add(EnumChatFormatting.RED + "Flare Stack:");
|
||||
list.add("Speed x" + (1 + this.tier));
|
||||
list.add(EnumChatFormatting.RED + "Maxwell:");
|
||||
list.add("Damage +" + (0.25 * (double)this.tier) + "dmg/t");
|
||||
}
|
||||
|
||||
if(this.type == UpgradeType.EFFECT) {
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[0]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.effect",this.tier,(80 * this.tier),"","","","","")[0]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[6]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.effect","","",(5 * this.tier),(1000 * this.tier),"","","")[1]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[7]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.effect","","","","",(100 - 100 / (this.tier + 1)),"","")[2]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[8]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.effect","","","","","",(100 * this.tier / 3),"")[3]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[9]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.effect","","","","","","",(3 * this.tier))[4]);
|
||||
list.add(EnumChatFormatting.RED + "Mining Drill:");
|
||||
list.add("Radius +" + this.tier + "m / Consumption +" + (80 * this.tier) + "HE/t");
|
||||
list.add(EnumChatFormatting.RED + "Crystallizer:");
|
||||
list.add("+" + (5 * this.tier) + "% chance of not consuming an item / Acid consumption +" + (1000 * this.tier) + "mB");
|
||||
list.add(EnumChatFormatting.RED + "Cyclotron:");
|
||||
list.add("-" + (100 - 100 / (this.tier + 1)) + "% chance of incrementing overheat counter");
|
||||
list.add(EnumChatFormatting.RED + "Flare Stack:");
|
||||
list.add("+" + (100 * this.tier / 3) + "% power production");
|
||||
list.add(EnumChatFormatting.RED + "Maxwell:");
|
||||
list.add("Range +" + (3 * this.tier) + "m");
|
||||
}
|
||||
|
||||
if(this.type == UpgradeType.POWER) {
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[0]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.power",(30 * this.tier),(5 * this.tier),"","","","","")[0]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[2]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.power",(15 * this.tier),(10 * this.tier),"","","","","")[0]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[3]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.power",(30 * this.tier),(5 * this.tier),"","","","","")[0]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[4]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.power",(30 * this.tier),(5 * this.tier),"","","","","")[0]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[5]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.power","","",(25 * this.tier),(10 * this.tier),"","","")[1]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[7]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.power","","","","",(100 * this.tier),"","")[2]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[9]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.power","","","","","",(150 * this.tier),"")[3]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.power","","","","","","",(1500 * this.tier))[4]);
|
||||
list.add(EnumChatFormatting.RED + "Mining Drill:");
|
||||
list.add("Consumption -" + (30 * this.tier) + "HE/t / Delay +" + (5 * this.tier) + "%");
|
||||
list.add(EnumChatFormatting.RED + "Electric Furnace:");
|
||||
list.add("Consumption -" + (15 * this.tier) + "HE/t / Delay +" + (10 * this.tier) + "%");
|
||||
list.add(EnumChatFormatting.RED + "Assembly Machine:");
|
||||
list.add("Consumption -" + (30 * this.tier) + "HE/t / Delay +" + (5 * this.tier) + "%");
|
||||
list.add(EnumChatFormatting.RED + "Chemical Plant:");
|
||||
list.add("Consumption -" + (30 * this.tier) + "HE/t / Delay +" + (5 * this.tier) + "%");
|
||||
list.add(EnumChatFormatting.RED + "Oil Wells:");
|
||||
list.add("Consumption -" + (25 * this.tier) + "% / Delay +" + (10 * this.tier) + "%");
|
||||
list.add(EnumChatFormatting.RED + "Cyclotron:");
|
||||
list.add("Consumption -" + (100 * this.tier) + "kHE/t");
|
||||
list.add(EnumChatFormatting.RED + "Maxwell:");
|
||||
list.add("Consumption -" + (150 * this.tier) + "HE/t");
|
||||
list.add("Consumption when firing -" + (1500 * this.tier) + "HE/t");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_fortune_1) {
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[0]);
|
||||
list.add(I18nUtil.resolveKey("desc.item.upgrade.fortune","1","15"));
|
||||
list.add(EnumChatFormatting.RED + "Mining Drill:");
|
||||
list.add("Fortune +1 / Delay +15");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_fortune_2) {
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[0]);
|
||||
list.add(I18nUtil.resolveKey("desc.item.upgrade.fortune","2","30"));
|
||||
list.add(EnumChatFormatting.RED + "Mining Drill:");
|
||||
list.add("Fortune +2 / Delay +30");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_fortune_3) {
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[0]);
|
||||
list.add(I18nUtil.resolveKey("desc.item.upgrade.fortune","3","45"));
|
||||
list.add(EnumChatFormatting.RED + "Mining Drill:");
|
||||
list.add("Fortune +3 / Delay +45");
|
||||
}
|
||||
|
||||
if(this.type == UpgradeType.AFTERBURN) {
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[10]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.afterburn",(this.tier + 1),(this.tier + 2),"","","")[0]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[9]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.afterburn","","",(this.tier * 3),"","")[1]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[5]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.afterburn","","","",(this.tier * 10),(this.tier * 50))[2]);
|
||||
list.add(EnumChatFormatting.RED + "Turbofan:");
|
||||
list.add("Production x" + (this.tier + 1) + " / Consumption x" + (this.tier + 2));
|
||||
list.add(EnumChatFormatting.RED + "Maxwell:");
|
||||
list.add("Afterburn +" + (this.tier * 3) + "s");
|
||||
list.add(EnumChatFormatting.RED + "Oil Wells:");
|
||||
list.add("Burn " + (this.tier * 10) + "mB of gas for " + (this.tier * 50) + "HE/t");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_radius) {
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[11]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.forcefield","16","500")[0]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.forcefield")[2]);
|
||||
list.add(EnumChatFormatting.RED + "Forcefield Range Upgrade");
|
||||
list.add("Radius +16 / Consumption +500");
|
||||
list.add("Stacks to 16");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_health) {
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[12]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.forcefield","50","250")[1]);
|
||||
list.add(I18nUtil.resolveKeyArray("desc.item.upgrade.forcefield")[2]);
|
||||
list.add(EnumChatFormatting.RED + "Forcefield Health Upgrade");
|
||||
list.add("Max. Health +50 / Consumption +250");
|
||||
list.add("Stacks to 16");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_smelter) {
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[13]);
|
||||
list.add(I18nUtil.resolveKey("desc.item.upgrade.smelter"));
|
||||
list.add(EnumChatFormatting.RED + "Mining Laser Upgrade");
|
||||
list.add("Smelts blocks. Easy enough.");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_shredder) {
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[13]);
|
||||
list.add(I18nUtil.resolveKey("desc.item.upgrade.shredder"));
|
||||
list.add(EnumChatFormatting.RED + "Mining Laser Upgrade");
|
||||
list.add("Crunches ores");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_centrifuge) {
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[13]);
|
||||
list.add(I18nUtil.resolveKey("desc.item.upgrade.centrifuge"));
|
||||
list.add(EnumChatFormatting.RED + "Mining Laser Upgrade");
|
||||
list.add("Hopefully self-explanatory");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_crystallizer) {
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[13]);
|
||||
list.add(I18nUtil.resolveKey("desc.item.upgrade.crystallizer"));
|
||||
list.add(EnumChatFormatting.RED + "Mining Laser Upgrade");
|
||||
list.add("Your new best friend");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_screm) {
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[13]);
|
||||
for(String s : I18nUtil.resolveKeyArray("desc.item.upgrade.screm"))
|
||||
list.add(s);
|
||||
list.add(EnumChatFormatting.RED + "Mining Laser Upgrade");
|
||||
list.add("It's like in Super Mario where all blocks are");
|
||||
list.add("actually Toads, but here it's Half-Life scientists");
|
||||
list.add("and they scream. A lot.");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_nullifier) {
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[13]);
|
||||
for(String s : I18nUtil.resolveKeyArray("desc.item.upgrade.nullifier"))
|
||||
list.add(s);
|
||||
list.add(EnumChatFormatting.RED + "Mining Laser Upgrade");
|
||||
list.add("50% chance to override worthless items with /dev/zero");
|
||||
list.add("50% chance to move worthless items to /dev/null");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_gc_speed) {
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("desc.item.upgrade.machine")[14]);
|
||||
for(String s : I18nUtil.resolveKeyArray("desc.item.upgrade.gc_speed"))
|
||||
list.add(s);
|
||||
list.add(EnumChatFormatting.RED + "Gas Centrifuge Upgrade");
|
||||
list.add("Allows for total isotopic separation of HEUF6");
|
||||
list.add(EnumChatFormatting.YELLOW + "also your centrifuge goes sicko mode");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.items.ItemEnumMulti;
|
||||
import com.hbm.util.EnumUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.util.function.Function;
|
||||
import com.hbm.util.function.Function.FunctionLogarithmic;
|
||||
import com.hbm.util.function.Function.FunctionSqrt;
|
||||
@ -56,7 +55,10 @@ public class ItemPWRFuel extends ItemEnumMulti {
|
||||
EnumPWRFuel num = EnumUtil.grabEnumSafely(EnumPWRFuel.class, stack.getItemDamage());
|
||||
|
||||
String color = EnumChatFormatting.GOLD + "";
|
||||
for(String s : I18nUtil.resolveKeyArray("trait.pwr_fuel" , num.heatEmission, num.function.getLabelForFuel(), num.function.getDangerFromFuel()))
|
||||
list.add(color + s);
|
||||
String reset = EnumChatFormatting.RESET + "";
|
||||
|
||||
list.add(color + "Heat per flux: " + reset + num.heatEmission + " TU");
|
||||
list.add(color + "Reacton function: " + reset + num.function.getLabelForFuel());
|
||||
list.add(color + "Fuel type: " + reset + num.function.getDangerFromFuel());
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.util.BobMathUtil;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@ -28,8 +27,10 @@ public class ItemPlateFuel extends ItemFuelRod {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
for(String s : I18nUtil.resolveKeyArray("trait.platefuel", getFunctionDesc(), BobMathUtil.getShortNumber(lifeTime)))
|
||||
list.add(EnumChatFormatting.YELLOW + s);
|
||||
|
||||
list.add(EnumChatFormatting.YELLOW + "[Research Reactor Plate Fuel]");
|
||||
list.add(EnumChatFormatting.DARK_AQUA + " " + getFunctionDesc());
|
||||
list.add(EnumChatFormatting.DARK_AQUA + " Yield of " + BobMathUtil.getShortNumber(lifeTime) + " events");
|
||||
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@ -5,7 +5,6 @@ import java.util.List;
|
||||
import com.hbm.items.special.ItemNuclearWaste;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@ -78,20 +77,20 @@ public class ItemRBMKPellet extends ItemNuclearWaste {
|
||||
super.addInformation(stack, player, list, bool);
|
||||
|
||||
list.add(EnumChatFormatting.ITALIC + this.fullName);
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC + I18nUtil.resolveKeyArray("trait.rbmk_pellet")[0]);
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC + "Pellet for recycling");
|
||||
|
||||
int meta = rectify(stack.getItemDamage());
|
||||
|
||||
switch(meta % 5) {
|
||||
case 0: list.add(EnumChatFormatting.GOLD + I18nUtil.resolveKeyArray("trait.rbmk_pellet")[1]); break;
|
||||
case 1: list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("trait.rbmk_pellet")[2]); break;
|
||||
case 2: list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.rbmk_pellet")[3]); break;
|
||||
case 3: list.add(EnumChatFormatting.DARK_GREEN + I18nUtil.resolveKeyArray("trait.rbmk_pellet")[4]); break;
|
||||
case 4: list.add(EnumChatFormatting.DARK_GRAY + I18nUtil.resolveKeyArray("trait.rbmk_pellet")[5]); break;
|
||||
case 0: list.add(EnumChatFormatting.GOLD + "Brand New"); break;
|
||||
case 1: list.add(EnumChatFormatting.YELLOW + "Barely Depleted"); break;
|
||||
case 2: list.add(EnumChatFormatting.GREEN + "Moderately Depleted"); break;
|
||||
case 3: list.add(EnumChatFormatting.DARK_GREEN + "Highly Depleted"); break;
|
||||
case 4: list.add(EnumChatFormatting.DARK_GRAY + "Fully Depleted"); break;
|
||||
}
|
||||
|
||||
if(hasXenon(meta))
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + I18nUtil.resolveKeyArray("trait.rbmk_pellet")[6]);
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + "High Xenon Poison");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -223,15 +223,15 @@ public class ItemRBMKRod extends Item {
|
||||
}
|
||||
|
||||
public static enum EnumBurnFunc {
|
||||
PASSIVE(EnumChatFormatting.DARK_GREEN + I18nUtil.resolveKeyArray("trait.rbmk.BurnFunc")[0]), //const, no reactivity
|
||||
LOG_TEN(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("trait.rbmk.BurnFunc")[1]), //log10(x + 1) * reactivity * 50
|
||||
PLATEU(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.rbmk.BurnFunc")[2]), //(1 - e^(-x/25)) * reactivity * 100
|
||||
ARCH(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("trait.rbmk.BurnFunc")[3]), //x-(x²/1000) * reactivity
|
||||
SIGMOID(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.rbmk.BurnFunc")[4]), //100 / (1 + e^(-(x - 50) / 10)) <- tiny amount of reactivity at x=0 !
|
||||
SQUARE_ROOT(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("trait.rbmk.BurnFunc")[5]), //sqrt(x) * 10 * reactivity
|
||||
LINEAR(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("trait.rbmk.BurnFunc")[6]), //x * reactivity
|
||||
QUADRATIC(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("trait.rbmk.BurnFunc")[7]), //x^2 / 100 * reactivity
|
||||
EXPERIMENTAL(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("trait.rbmk.BurnFunc")[8]); //x * (sin(x) + 1)
|
||||
PASSIVE(EnumChatFormatting.DARK_GREEN + "SAFE / PASSIVE"), //const, no reactivity
|
||||
LOG_TEN(EnumChatFormatting.YELLOW + "MEDIUM / LOGARITHMIC"), //log10(x + 1) * reactivity * 50
|
||||
PLATEU(EnumChatFormatting.GREEN + "SAFE / EULER"), //(1 - e^(-x/25)) * reactivity * 100
|
||||
ARCH(EnumChatFormatting.RED + "DANGEROUS / NEGATIVE-QUADRATIC"), //x-(x²/1000) * reactivity
|
||||
SIGMOID(EnumChatFormatting.GREEN + "SAFE / SIGMOID"), //100 / (1 + e^(-(x - 50) / 10)) <- tiny amount of reactivity at x=0 !
|
||||
SQUARE_ROOT(EnumChatFormatting.YELLOW + "MEDIUM / SQUARE ROOT"), //sqrt(x) * 10 * reactivity
|
||||
LINEAR(EnumChatFormatting.RED + "DANGEROUS / LINEAR"), //x * reactivity
|
||||
QUADRATIC(EnumChatFormatting.RED + "DANGEROUS / QUADRATIC"), //x^2 / 100 * reactivity
|
||||
EXPERIMENTAL(EnumChatFormatting.RED + "EXPERIMENTAL / SINE SLOPE"); //x * (sin(x) + 1)
|
||||
|
||||
public String title = "";
|
||||
|
||||
|
||||
@ -9,7 +9,6 @@ import com.hbm.main.MainRegistry;
|
||||
import com.hbm.render.icon.RGBMutatorInterpolatedComponentRemap;
|
||||
import com.hbm.render.icon.TextureAtlasSpriteMutatable;
|
||||
import com.hbm.util.EnumUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.util.function.Function;
|
||||
import com.hbm.util.function.Function.*;
|
||||
|
||||
@ -128,23 +127,23 @@ public class ItemWatzPellet extends ItemEnumMulti {
|
||||
if(this != ModItems.watz_pellet) return;
|
||||
|
||||
EnumWatzType num = EnumUtil.grabEnumSafely(EnumWatzType.class, stack.getItemDamage());
|
||||
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey("trait.watz_pellet", String.format(Locale.US, "%.1f", getDurabilityForDisplay(stack) * 100D)));
|
||||
|
||||
list.add(EnumChatFormatting.GREEN + "Depletion: " + String.format(Locale.US, "%.1f", getDurabilityForDisplay(stack) * 100D) + "%");
|
||||
|
||||
String color = EnumChatFormatting.GOLD + "";
|
||||
String reset = EnumChatFormatting.RESET + "";
|
||||
|
||||
if(num.passive > 0){
|
||||
list.add(color + I18nUtil.resolveKeyArray("trait.watz_pellet.passive")[0] + reset + num.passive);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("trait.watz_pellet.passive")[1]);
|
||||
list.add(color + "Base fission rate: " + reset + num.passive);
|
||||
list.add(EnumChatFormatting.RED + "Self-igniting!");
|
||||
}
|
||||
if(num.heatEmission > 0) list.add(color + I18nUtil.resolveKey("trait.watz_pellet.heatEmission") + reset + num.heatEmission + " TU");
|
||||
if(num.heatEmission > 0) list.add(color + "Heat per flux: " + reset + num.heatEmission + " TU");
|
||||
if(num.burnFunc != null) {
|
||||
list.add(color + I18nUtil.resolveKeyArray("trait.watz_pellet.burnFunc")[0] + reset + num.burnFunc.getLabelForFuel());
|
||||
list.add(color + I18nUtil.resolveKeyArray("trait.watz_pellet.burnFunc")[1] + reset + num.burnFunc.getDangerFromFuel());
|
||||
list.add(color + "Reacton function: " + reset + num.burnFunc.getLabelForFuel());
|
||||
list.add(color + "Fuel type: " + reset + num.burnFunc.getDangerFromFuel());
|
||||
}
|
||||
if(num.heatDiv != null) list.add(color + I18nUtil.resolveKey("trait.watz_pellet.heatDiv") + reset + num.heatDiv.getLabelForFuel() + " TU⁻¹");
|
||||
if(num.absorbFunc != null) list.add(color + I18nUtil.resolveKey("trait.watz_pellet.absorbFunc") + reset + num.absorbFunc.getLabelForFuel());
|
||||
if(num.heatDiv != null) list.add(color + "Thermal multiplier: " + reset + num.heatDiv.getLabelForFuel() + " TU⁻¹");
|
||||
if(num.absorbFunc != null) list.add(color + "Flux capture: " + reset + num.absorbFunc.getLabelForFuel());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -5,7 +5,6 @@ import java.util.List;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -29,26 +28,51 @@ public class ItemAMSCore extends Item {
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
if (this == ModItems.ams_core_sing) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.ams_core_sing.desc"))
|
||||
list.add(s);
|
||||
list.add("A modified undefined state of spacetime");
|
||||
list.add("used to aid in inter-gluon fusion and");
|
||||
list.add("spacetime annihilation. Yes, this destroys");
|
||||
list.add("the universe itself, slowly but steadily,");
|
||||
list.add("but at least you can power your toaster with");
|
||||
list.add("this, so it's all good.");
|
||||
}
|
||||
|
||||
if (this == ModItems.ams_core_wormhole) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.ams_core_wormhole.desc"))
|
||||
list.add(s);
|
||||
list.add("A cloud of billions of nano-wormholes which");
|
||||
list.add("deliberately fail at tunneling matter from");
|
||||
list.add("another dimension, rather it converts all");
|
||||
list.add("that matter into pure energy. That means");
|
||||
list.add("you're actively contributing to the destruction");
|
||||
list.add("of another dimension, sucking it dry like a");
|
||||
list.add("juicebox.");
|
||||
list.add("That dimension probably sucked, anyways. I");
|
||||
list.add("bet it was full of wasps or some crap, man,");
|
||||
list.add("I hate these things.");
|
||||
}
|
||||
|
||||
if (this == ModItems.ams_core_eyeofharmony) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.ams_core_eyeofharmony.desc"))
|
||||
list.add(s);
|
||||
list.add("A star collapsing in on itself, mere nanoseconds");
|
||||
list.add("away from being turned into a black hole,");
|
||||
list.add("frozen in time. If I didn't know better I");
|
||||
list.add("would say this is some deep space magic");
|
||||
list.add("bullcrap some guy made up to sound intellectual.");
|
||||
list.add("Probably Steve from accounting. You still owe me");
|
||||
list.add("ten bucks.");
|
||||
}
|
||||
|
||||
if (this == ModItems.ams_core_thingy) {
|
||||
if(MainRegistry.polaroidID == 11) {
|
||||
list.add(I18nUtil.resolveKey("item.ams_core_thingy_hide.desc"));
|
||||
list.add("Yeah I'm not even gonna question that one.");
|
||||
} else {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.ams_core_thingy.desc"))
|
||||
list.add(s);
|
||||
list.add("...");
|
||||
list.add("...");
|
||||
list.add("...am I even holding this right?");
|
||||
list.add("It's a small metal thing. I dunno where it's from");
|
||||
list.add("or what it does, maybe they found it on a");
|
||||
list.add("junkyard and sold it as some kind of antique");
|
||||
list.add("artifact. If it weren't for the fact that I can");
|
||||
list.add("actually stuff this into some great big laser");
|
||||
list.add("reactor thing, I'd probably bring it back to where");
|
||||
list.add("it belongs. In the trash.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,6 @@ import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
@ -40,10 +39,10 @@ public class ItemGlitch extends Item implements IBatteryItem {
|
||||
if(!world.isRemote)
|
||||
switch(itemRand.nextInt(31)) {
|
||||
case 0:
|
||||
player.addChatMessage(new ChatComponentText(I18nUtil.resolveKeyArray("item.glitch.message")[0]));
|
||||
player.addChatMessage(new ChatComponentText("Sorry nothing."));
|
||||
break;
|
||||
case 1:
|
||||
player.addChatMessage(new ChatComponentText(I18nUtil.resolveKeyArray("item.glitch.message")[1]));
|
||||
player.addChatMessage(new ChatComponentText("Prometheus was punished by the gods by giving the gift of knowledge to man. He was cast into the bowels of the earth and pecked by birds."));
|
||||
break;
|
||||
case 2:
|
||||
player.attackEntityFrom(ModDamageSource.radiation, 1000);
|
||||
@ -67,7 +66,7 @@ public class ItemGlitch extends Item implements IBatteryItem {
|
||||
break;
|
||||
case 8:
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ammo_container, 10));
|
||||
player.addChatMessage(new ChatComponentText(I18nUtil.resolveKeyArray("item.glitch.message")[2]));
|
||||
player.addChatMessage(new ChatComponentText("Oh, and by the way: The polaroid shifts reality. Things can be different if the polaroid is broken."));
|
||||
break;
|
||||
case 9:
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.nuke_advanced_kit, 1));
|
||||
@ -95,7 +94,7 @@ public class ItemGlitch extends Item implements IBatteryItem {
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_pip));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle_sparkle));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.geiger_counter));
|
||||
player.addChatMessage(new ChatComponentText(I18nUtil.resolveKeyArray("item.glitch.message")[3]));
|
||||
player.addChatMessage(new ChatComponentText("Have some free stuff. You'll need it for that one cryptic achievement."));
|
||||
break;
|
||||
case 14:
|
||||
player.inventory.dropAllItems();
|
||||
@ -106,43 +105,43 @@ public class ItemGlitch extends Item implements IBatteryItem {
|
||||
player.inventory.addItemStackToInventory(new ItemStack(Blocks.dirt, 64));
|
||||
break;
|
||||
case 16:
|
||||
player.addChatMessage(new ChatComponentText(I18nUtil.resolveKeyArray("item.glitch.message")[4]));
|
||||
player.addChatMessage(new ChatComponentText("v yvxr lbhe nggvghqr!"));
|
||||
break;
|
||||
case 17:
|
||||
player.addChatMessage(new ChatComponentText(I18nUtil.resolveKeyArray("item.glitch.message")[5]));
|
||||
player.addChatMessage(new ChatComponentText("89% of magic tricks are not magic. Technically, they are sorcery."));
|
||||
break;
|
||||
case 18:
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_lever_action));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ammo_20gauge, 12));
|
||||
player.addChatMessage(new ChatComponentText(I18nUtil.resolveKeyArray("item.glitch.message")[6]));
|
||||
player.addChatMessage(new ChatComponentText("Here ya go."));
|
||||
break;
|
||||
case 19:
|
||||
player.addChatMessage(new ChatComponentText(I18nUtil.resolveKeyArray("item.glitch.message")[7]));
|
||||
player.addChatMessage(new ChatComponentText("Ë"));
|
||||
break;
|
||||
case 20:
|
||||
player.addChatMessage(new ChatComponentText(I18nUtil.resolveKeyArray("item.glitch.message")[8]));
|
||||
player.addChatMessage(new ChatComponentText("Good day, I am text"));
|
||||
break;
|
||||
case 21:
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.missile_nuclear));
|
||||
player.addChatMessage(new ChatComponentText(I18nUtil.resolveKeyArray("item.glitch.message")[9]));
|
||||
player.addChatMessage(new ChatComponentText("73616d706c652074657874!"));
|
||||
break;
|
||||
case 22:
|
||||
player.addChatMessage(new ChatComponentText(I18nUtil.resolveKeyArray("item.glitch.message")[10]));
|
||||
player.addChatMessage(new ChatComponentText("Budget cuts, no effect for you."));
|
||||
break;
|
||||
case 23:
|
||||
player.addChatMessage(new ChatComponentText(I18nUtil.resolveKeyArray("item.glitch.message")[11]));
|
||||
player.addChatMessage(new ChatComponentText("oof"));
|
||||
break;
|
||||
case 24:
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 60 * 20, 9));
|
||||
player.addChatMessage(new ChatComponentText(I18nUtil.resolveKeyArray("item.glitch.message")[12]));
|
||||
player.addChatMessage(new ChatComponentText("Tank!"));
|
||||
break;
|
||||
case 25:
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 60 * 20, 9));
|
||||
player.addChatMessage(new ChatComponentText(I18nUtil.resolveKeyArray("item.glitch.message")[13]));
|
||||
player.addChatMessage(new ChatComponentText("More devastating than a falling boxcar!"));
|
||||
break;
|
||||
case 26:
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 60 * 20, 9));
|
||||
player.addChatMessage(new ChatComponentText(I18nUtil.resolveKeyArray("item.glitch.message")[14]));
|
||||
player.addChatMessage(new ChatComponentText("Ha!"));
|
||||
break;
|
||||
case 27:
|
||||
EntityVortex vortex = new EntityVortex(world, 2.5F);
|
||||
@ -157,15 +156,15 @@ public class ItemGlitch extends Item implements IBatteryItem {
|
||||
mirv.posY = player.posY + 100;
|
||||
mirv.posZ = player.posZ;
|
||||
world.spawnEntityInWorld(mirv);
|
||||
player.addChatMessage(new ChatComponentText(I18nUtil.resolveKeyArray("item.glitch.message")[15]));
|
||||
player.addChatMessage(new ChatComponentText("Watch your head!"));
|
||||
break;
|
||||
case 29:
|
||||
ExplosionLarge.spawnBurst(world, player.posX, player.posY, player.posZ, 27, 3);
|
||||
player.addChatMessage(new ChatComponentText(I18nUtil.resolveKeyArray("item.glitch.message")[16]));
|
||||
player.addChatMessage(new ChatComponentText("Bam!"));
|
||||
break;
|
||||
case 30:
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.plate_saturnite));
|
||||
player.addChatMessage(new ChatComponentText(I18nUtil.resolveKeyArray("item.glitch.message")[17]));
|
||||
player.addChatMessage(new ChatComponentText("It's dangerous to go alone, take this!"));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -177,62 +176,62 @@ public class ItemGlitch extends Item implements IBatteryItem {
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
|
||||
{
|
||||
list.add(I18nUtil.resolveKeyArray("item.glitch.desc")[0]);
|
||||
list.add("It's a gamble!");
|
||||
list.add("");
|
||||
switch(MainRegistry.polaroidID) {
|
||||
case 1:
|
||||
list.add(I18nUtil.resolveKeyArray("item.glitch.desc")[1]);
|
||||
list.add("Click-click-click!");
|
||||
break;
|
||||
case 2:
|
||||
list.add(I18nUtil.resolveKeyArray("item.glitch.desc")[2]);
|
||||
list.add("Creek!");
|
||||
break;
|
||||
case 3:
|
||||
list.add(I18nUtil.resolveKeyArray("item.glitch.desc")[3]);
|
||||
list.add("Bzzzt!");
|
||||
break;
|
||||
case 4:
|
||||
list.add(I18nUtil.resolveKeyArray("item.glitch.desc")[4]);
|
||||
list.add("TS staring off into space.");
|
||||
break;
|
||||
case 5:
|
||||
list.add(I18nUtil.resolveKeyArray("item.glitch.desc")[5]);
|
||||
list.add("BANG!!");
|
||||
break;
|
||||
case 6:
|
||||
list.add(I18nUtil.resolveKeyArray("item.glitch.desc")[6]);
|
||||
list.add("Woop!");
|
||||
break;
|
||||
case 7:
|
||||
list.add(I18nUtil.resolveKeyArray("item.glitch.desc")[7]);
|
||||
list.add("Poow!");
|
||||
break;
|
||||
case 8:
|
||||
list.add(I18nUtil.resolveKeyArray("item.glitch.desc")[8]);
|
||||
list.add("Pft!");
|
||||
break;
|
||||
case 9:
|
||||
list.add(I18nUtil.resolveKeyArray("item.glitch.desc")[9]);
|
||||
list.add("GF fgnevat bss vagb fcnpr.");
|
||||
break;
|
||||
case 10:
|
||||
list.add(I18nUtil.resolveKeyArray("item.glitch.desc")[10]);
|
||||
list.add("Backup memory #8 on 1.44 million bytes.");
|
||||
break;
|
||||
case 11:
|
||||
list.add(I18nUtil.resolveKeyArray("item.glitch.desc")[11]);
|
||||
list.add("PTANG!");
|
||||
break;
|
||||
case 12:
|
||||
list.add(I18nUtil.resolveKeyArray("item.glitch.desc")[12]);
|
||||
list.add("Bzzt-zrrt!");
|
||||
break;
|
||||
case 13:
|
||||
list.add(I18nUtil.resolveKeyArray("item.glitch.desc")[13]);
|
||||
list.add("Clang, click-brrthththrtrtrtrtrtr!");
|
||||
break;
|
||||
case 14:
|
||||
list.add(I18nUtil.resolveKeyArray("item.glitch.desc")[14]);
|
||||
list.add("KABLAM!");
|
||||
break;
|
||||
case 15:
|
||||
list.add(I18nUtil.resolveKeyArray("item.glitch.desc")[15]);
|
||||
list.add("PLENG!");
|
||||
break;
|
||||
case 16:
|
||||
list.add(I18nUtil.resolveKeyArray("item.glitch.desc")[16]);
|
||||
list.add("Wheeeeeeee-");
|
||||
break;
|
||||
case 17:
|
||||
list.add(I18nUtil.resolveKeyArray("item.glitch.desc")[17]);
|
||||
list.add("Thump.");
|
||||
break;
|
||||
case 18:
|
||||
list.add(I18nUtil.resolveKeyArray("item.glitch.desc")[18]);
|
||||
list.add("BANG! Choo-chooo! B A N G ! ! !");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -40,7 +39,7 @@ public class ItemRag extends Item {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.rag.desc"))
|
||||
list.add(s);
|
||||
list.add("Drop into water to make damp cloth.");
|
||||
list.add("Right-click to urinate on the cloth.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@ -51,12 +50,12 @@ public class ItemSoyuz extends Item {
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(I18nUtil.resolveKeyArray("item.missile_soyuz.desc")[0]);
|
||||
list.add("Skin:");
|
||||
|
||||
switch(stack.getItemDamage()) {
|
||||
case 0: list.add(EnumChatFormatting.GOLD + I18nUtil.resolveKeyArray("item.missile_soyuz.desc")[1]); break;
|
||||
case 1: list.add(EnumChatFormatting.BLUE + I18nUtil.resolveKeyArray("item.missile_soyuz.desc")[2]); break;
|
||||
case 2: list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("item.missile_soyuz.desc")[3]); break;
|
||||
case 0: list.add(EnumChatFormatting.GOLD + "Original"); break;
|
||||
case 1: list.add(EnumChatFormatting.BLUE + "Luna Space Center"); break;
|
||||
case 2: list.add(EnumChatFormatting.GREEN + "Post War"); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,6 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemBattery;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@ -28,14 +27,14 @@ public class ItemAnchorRemote extends ItemBattery {
|
||||
charge = getCharge(itemstack);
|
||||
|
||||
if(itemstack.getItem() != ModItems.fusion_core && itemstack.getItem() != ModItems.energy_core) {
|
||||
list.add(I18nUtil.resolveKey("desc.item.battery.charge",BobMathUtil.getShortNumber(charge),BobMathUtil.getShortNumber(maxCharge)));
|
||||
list.add("Energy stored: " + BobMathUtil.getShortNumber(charge) + "/" + BobMathUtil.getShortNumber(maxCharge) + "HE");
|
||||
} else {
|
||||
String charge1 = BobMathUtil.getShortNumber((charge * 100) / this.maxCharge);
|
||||
list.add(I18nUtil.resolveKey("desc.item.battery.chargePerc", charge1));
|
||||
list.add("Charge: " + charge1 + "%");
|
||||
list.add("(" + BobMathUtil.getShortNumber(charge) + "/" + BobMathUtil.getShortNumber(maxCharge) + "HE)");
|
||||
}
|
||||
|
||||
list.add(I18nUtil.resolveKey("desc.item.battery.chargeRate",BobMathUtil.getShortNumber(chargeRate)));
|
||||
list.add("Charge rate: " + BobMathUtil.getShortNumber(chargeRate) + "HE/t");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -7,7 +7,6 @@ import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@ -157,8 +156,10 @@ public class ItemCMStructure extends Item implements ILookOverlay {
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
super.addInformation(stack, player, list, ext);
|
||||
for(String s : I18nUtil.resolveKeyArray("item.structure_custommachine.desc"))
|
||||
list.add(EnumChatFormatting.YELLOW + s);
|
||||
list.add(EnumChatFormatting.YELLOW + "Click Custom Machine Structure Positioning Anchor to");
|
||||
list.add(EnumChatFormatting.YELLOW + "Confirm the location of the custom machine core block.");
|
||||
list.add(EnumChatFormatting.YELLOW + "Output all blocks between Position1 and Position2 with");
|
||||
list.add(EnumChatFormatting.YELLOW + "metadata to \"CMstructureOutput.txt\" in hbmConfig.");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.items.tool;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
@ -22,12 +21,12 @@ public class ItemDetonator extends Item {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.detonator.desc"))
|
||||
list.add(s);
|
||||
list.add("Shift right-click to set position,");
|
||||
list.add("right-click to detonate!");
|
||||
if(itemstack.getTagCompound() == null) {
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKeyArray("item.detonator.pos.desc")[0]);
|
||||
list.add(EnumChatFormatting.RED + "No position set!");
|
||||
} else {
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("item.detonator.pos.desc" , itemstack.stackTagCompound.getInteger("x") , itemstack.stackTagCompound.getInteger("y") , itemstack.stackTagCompound.getInteger("z"))[1]);
|
||||
list.add(EnumChatFormatting.YELLOW + "Linked to " + itemstack.stackTagCompound.getInteger("x") + ", " + itemstack.stackTagCompound.getInteger("y") + ", " + itemstack.stackTagCompound.getInteger("z"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,7 +45,7 @@ public class ItemDetonator extends Item {
|
||||
player.addChatMessage(ChatBuilder.start("[").color(EnumChatFormatting.DARK_AQUA)
|
||||
.nextTranslation(this.getUnlocalizedName() + ".name").color(EnumChatFormatting.DARK_AQUA)
|
||||
.next("] ").color(EnumChatFormatting.DARK_AQUA)
|
||||
.next(I18nUtil.resolveKeyArray("desc.item.detonator")[0]).color(EnumChatFormatting.GREEN).flush());
|
||||
.next("Position set!").color(EnumChatFormatting.GREEN).flush());
|
||||
}
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:item.techBoop", 2.0F, 1.0F);
|
||||
@ -65,7 +64,7 @@ public class ItemDetonator extends Item {
|
||||
player.addChatMessage(ChatBuilder.start("[").color(EnumChatFormatting.DARK_AQUA)
|
||||
.nextTranslation(this.getUnlocalizedName() + ".name").color(EnumChatFormatting.DARK_AQUA)
|
||||
.next("] ").color(EnumChatFormatting.DARK_AQUA)
|
||||
.next(I18nUtil.resolveKeyArray("desc.item.detonator")[1]).color(EnumChatFormatting.RED).flush());
|
||||
.next("No position set!").color(EnumChatFormatting.RED).flush());
|
||||
}
|
||||
} else {
|
||||
int x = stack.stackTagCompound.getInteger("x");
|
||||
|
||||
@ -7,7 +7,6 @@ import java.util.Random;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@ -19,7 +18,7 @@ public class ItemMS extends Item {
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
|
||||
{
|
||||
list.add(I18nUtil.resolveKey("item.mysteryshovel.desc"));
|
||||
list.add("Lost but not forgotten");
|
||||
}
|
||||
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int i, float a, float b, float c)
|
||||
|
||||
@ -5,7 +5,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -27,63 +26,63 @@ public class ItemSwordMeteorite extends ItemSwordAbility {
|
||||
super.addInformation(stack, player, list, ext);
|
||||
|
||||
if(this == ModItems.meteorite_sword) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.meteorite_sword.desc"))
|
||||
list.add(EnumChatFormatting.ITALIC + s);
|
||||
list.add(EnumChatFormatting.ITALIC + "Forged from a fallen star");
|
||||
list.add(EnumChatFormatting.ITALIC + "Sharper than most terrestrial blades");
|
||||
}
|
||||
|
||||
if(this == ModItems.meteorite_sword_seared) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.meteorite_sword_seared.desc"))
|
||||
list.add(EnumChatFormatting.ITALIC + s);
|
||||
list.add(EnumChatFormatting.ITALIC + "Fire strengthens the blade");
|
||||
list.add(EnumChatFormatting.ITALIC + "Making it even more powerful");
|
||||
}
|
||||
|
||||
if(this == ModItems.meteorite_sword_reforged) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.meteorite_sword_reforged.desc"))
|
||||
list.add(EnumChatFormatting.ITALIC + s);
|
||||
list.add(EnumChatFormatting.ITALIC + "The sword has been reforged");
|
||||
list.add(EnumChatFormatting.ITALIC + "To rectify past imperfections");
|
||||
}
|
||||
|
||||
if(this == ModItems.meteorite_sword_hardened) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.meteorite_sword_hardened.desc"))
|
||||
list.add(EnumChatFormatting.ITALIC + s);
|
||||
list.add(EnumChatFormatting.ITALIC + "Extremely high pressure has been used");
|
||||
list.add(EnumChatFormatting.ITALIC + "To harden the blade further");
|
||||
}
|
||||
|
||||
if(this == ModItems.meteorite_sword_alloyed) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.meteorite_sword_alloyed.desc"))
|
||||
list.add(EnumChatFormatting.ITALIC + s);
|
||||
list.add(EnumChatFormatting.ITALIC + "Cobalt fills the fissures");
|
||||
list.add(EnumChatFormatting.ITALIC + "Strengthening the sword");
|
||||
}
|
||||
|
||||
if(this == ModItems.meteorite_sword_machined) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.meteorite_sword_machined.desc"))
|
||||
list.add(EnumChatFormatting.ITALIC + s);
|
||||
list.add(EnumChatFormatting.ITALIC + "Advanced machinery was used");
|
||||
list.add(EnumChatFormatting.ITALIC + "To refine the blade even more");
|
||||
}
|
||||
|
||||
if(this == ModItems.meteorite_sword_treated) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.meteorite_sword_treated.desc"))
|
||||
list.add(EnumChatFormatting.ITALIC + s);
|
||||
list.add(EnumChatFormatting.ITALIC + "Chemicals have been applied");
|
||||
list.add(EnumChatFormatting.ITALIC + "Making the sword more powerful");
|
||||
}
|
||||
|
||||
if(this == ModItems.meteorite_sword_etched) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.meteorite_sword_etched.desc"))
|
||||
list.add(EnumChatFormatting.ITALIC + s);
|
||||
list.add(EnumChatFormatting.ITALIC + "Acids clean the material");
|
||||
list.add(EnumChatFormatting.ITALIC + "To make this the perfect sword");
|
||||
}
|
||||
|
||||
if(this == ModItems.meteorite_sword_bred) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.meteorite_sword_bred.desc"))
|
||||
list.add(EnumChatFormatting.ITALIC + s);
|
||||
list.add(EnumChatFormatting.ITALIC + "Immense heat and radiation");
|
||||
list.add(EnumChatFormatting.ITALIC + "Compress the material");
|
||||
}
|
||||
|
||||
if(this == ModItems.meteorite_sword_irradiated) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.meteorite_sword_irradiated.desc"))
|
||||
list.add(EnumChatFormatting.ITALIC + s);
|
||||
list.add(EnumChatFormatting.ITALIC + "The power of the Atom");
|
||||
list.add(EnumChatFormatting.ITALIC + "Gives the sword might");
|
||||
}
|
||||
|
||||
if(this == ModItems.meteorite_sword_fused) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.meteorite_sword_fused.desc"))
|
||||
list.add(EnumChatFormatting.ITALIC + s);
|
||||
list.add(EnumChatFormatting.ITALIC + "This blade has met");
|
||||
list.add(EnumChatFormatting.ITALIC + "With the forces of the stars");
|
||||
}
|
||||
|
||||
if(this == ModItems.meteorite_sword_baleful) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.meteorite_sword_baleful.desc"))
|
||||
list.add(EnumChatFormatting.ITALIC + s);
|
||||
list.add(EnumChatFormatting.ITALIC + "This sword has met temperatures");
|
||||
list.add(EnumChatFormatting.ITALIC + "Far beyond what normal material can endure");
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.items.tool;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@ -16,20 +15,22 @@ public class ItemWand extends Item {
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
|
||||
{
|
||||
for(String s : I18nUtil.resolveKeyArray( "item.wand_k.desc"))
|
||||
list.add(s);
|
||||
list.add("Creative-only item");
|
||||
list.add("\"Destruction brings creation\"");
|
||||
list.add("(Set positions with right click,");
|
||||
list.add("set block with shift-right click!)");
|
||||
|
||||
if(itemstack.stackTagCompound != null &&
|
||||
!(itemstack.stackTagCompound.getInteger("x") == 0 &&
|
||||
itemstack.stackTagCompound.getInteger("y") == 0 &&
|
||||
itemstack.stackTagCompound.getInteger("z") == 0))
|
||||
{
|
||||
list.add(I18nUtil.resolveKey("item.wand_k.pos" , itemstack.stackTagCompound.getInteger("x") , itemstack.stackTagCompound.getInteger("y") , itemstack.stackTagCompound.getInteger("z")));
|
||||
list.add("Pos: " + itemstack.stackTagCompound.getInteger("x") + ", " + itemstack.stackTagCompound.getInteger("y") + ", " + itemstack.stackTagCompound.getInteger("z"));
|
||||
} else {
|
||||
list.add(I18nUtil.resolveKey("item.wand_k.null"));
|
||||
list.add("Positions not set!");
|
||||
}
|
||||
if(itemstack.stackTagCompound != null)
|
||||
list.add(I18nUtil.resolveKey("item.wand_k.block" , Block.getBlockById(itemstack.stackTagCompound.getInteger("block")).getUnlocalizedName()));
|
||||
list.add("Block saved: " + Block.getBlockById(itemstack.stackTagCompound.getInteger("block")).getUnlocalizedName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -3,7 +3,6 @@ package com.hbm.items.tool;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.world.machine.FWatz;
|
||||
import com.hbm.world.machine.NuclearReactor;
|
||||
import com.hbm.world.machine.Watz;
|
||||
@ -20,8 +19,10 @@ public class ItemWandS extends Item {
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
|
||||
{
|
||||
for(String s : I18nUtil.resolveKeyArray( "item.wand_s.desc"))
|
||||
list.add(s);
|
||||
list.add("Creative-only item");
|
||||
list.add("\"Instant structures for everyone!\"");
|
||||
list.add("(Cycle with shift-right click,");
|
||||
list.add("spawn structures with right click!)");
|
||||
if(itemstack.stackTagCompound != null)
|
||||
{
|
||||
switch(itemstack.stackTagCompound.getInteger("building"))
|
||||
|
||||
@ -12,7 +12,6 @@ import com.hbm.main.MainRegistry;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
@ -250,52 +249,58 @@ public class WeaponSpecial extends ItemSword {
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
|
||||
{
|
||||
if(this == ModItems.schrabidium_hammer) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.schrabidium_hammer.desc"))
|
||||
list.add(s);
|
||||
list.add("Even though it says \"+1000000000");
|
||||
list.add("damage\", it's actually \"onehit anything\"");
|
||||
}
|
||||
if(this == ModItems.ullapool_caber) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.ullapool_caber.desc"))
|
||||
list.add(s);
|
||||
list.add("High-yield Scottish face removal.");
|
||||
list.add("A sober person would throw it...");
|
||||
}
|
||||
if(this == ModItems.bottle_opener) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.bottle_opener.desc"))
|
||||
list.add(s);
|
||||
list.add("My very own bottle opener.");
|
||||
list.add("Use with caution!");
|
||||
}
|
||||
if(this == ModItems.shimmer_sledge) {
|
||||
if(MainRegistry.polaroidID == 11) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.shimmer_sledge.desc.hide"))
|
||||
list.add(s);
|
||||
list.add("shimmer no");
|
||||
list.add("drop that hammer");
|
||||
list.add("you're going to hurt somebody");
|
||||
list.add("shimmer no");
|
||||
list.add("shimmer pls");
|
||||
} else {
|
||||
list.add(I18nUtil.resolveKey("item.shimmer_sledge.desc"));
|
||||
list.add("Breaks everything, even portals.");
|
||||
}
|
||||
}
|
||||
if(this == ModItems.shimmer_axe) {
|
||||
if(MainRegistry.polaroidID == 11) {
|
||||
list.add(I18nUtil.resolveKey("item.shimmer_axe.desc.hide"));
|
||||
list.add("shim's toolbox does an e-x-p-a-n-d");
|
||||
} else {
|
||||
list.add(I18nUtil.resolveKey("item.shimmer_axe.desc"));
|
||||
list.add("Timber!");
|
||||
}
|
||||
}
|
||||
if(this == ModItems.wrench) {
|
||||
list.add(I18nUtil.resolveKey("item.wrench.desc"));
|
||||
list.add("Mechanic Richard");
|
||||
}
|
||||
if(this == ModItems.wrench_flipped) {
|
||||
list.add(I18nUtil.resolveKey("item.wrench_flipped.desc"));
|
||||
list.add("Wrench 2: The Wrenchening");
|
||||
}
|
||||
if(this == ModItems.memespoon) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.memespoon.desc"))
|
||||
list.add(s);
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "Level 10 Shovel");
|
||||
list.add(EnumChatFormatting.AQUA + "Deals crits while the wielder is rocket jumping");
|
||||
list.add(EnumChatFormatting.RED + "20% slower firing speed");
|
||||
list.add(EnumChatFormatting.RED + "No random critical hits");
|
||||
}
|
||||
|
||||
if(this == ModItems.wood_gavel) {
|
||||
list.add(I18nUtil.resolveKey("item.wood_gavel.desc"));
|
||||
list.add("Thunk!");
|
||||
}
|
||||
if(this == ModItems.lead_gavel) {
|
||||
list.add(I18nUtil.resolveKey("item.lead_gavel.desc"));
|
||||
list.add("You are hereby sentenced to lead poisoning.");
|
||||
}
|
||||
if(this == ModItems.diamond_gavel) {
|
||||
for(String s : I18nUtil.resolveKeyArray("item.diamond_gavel.desc"))
|
||||
list.add(s);
|
||||
list.add("The joke! It makes sense now!!");
|
||||
list.add("");
|
||||
list.add(EnumChatFormatting.BLUE + "Deals as much damage as it needs to.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -921,7 +921,6 @@ public class MainRegistry {
|
||||
World world = event.getServer().getEntityWorld();
|
||||
RBMKDials.createDials(world);
|
||||
SiegeOrchestrator.createGameRules(world);
|
||||
CompatHandler.createCompat(world);
|
||||
event.registerServerCommand(new CommandReloadRecipes());
|
||||
event.registerServerCommand(new CommandDebugChunkLoad());
|
||||
event.registerServerCommand(new CommandSatellites());
|
||||
|
||||
@ -717,8 +717,9 @@ public class ModEventHandlerClient {
|
||||
}
|
||||
} else {
|
||||
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC + I18nUtil.resolveKey("tooltip.show" ,
|
||||
EnumChatFormatting.YELLOW +"" + EnumChatFormatting.ITALIC + "LSHIFT"));
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +"Hold <" +
|
||||
EnumChatFormatting.YELLOW + "" + EnumChatFormatting.ITALIC + "LSHIFT" +
|
||||
EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC + "> to display protection info");
|
||||
}
|
||||
}
|
||||
|
||||
@ -732,12 +733,13 @@ public class ModEventHandlerClient {
|
||||
|
||||
if(!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) && !(Minecraft.getMinecraft().currentScreen instanceof GUIArmorTable)) {
|
||||
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC + I18nUtil.resolveKey("tooltip.armormodsshow" ,
|
||||
EnumChatFormatting.YELLOW +"" + EnumChatFormatting.ITALIC + "LSHIFT" ));
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +"Hold <" +
|
||||
EnumChatFormatting.YELLOW + "" + EnumChatFormatting.ITALIC + "LSHIFT" +
|
||||
EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC + "> to display installed armor mods");
|
||||
|
||||
} else {
|
||||
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("tooltip.armormods"));
|
||||
list.add(EnumChatFormatting.YELLOW + "Mods:");
|
||||
|
||||
ItemStack[] mods = ArmorModHandler.pryMods(stack);
|
||||
|
||||
@ -758,12 +760,12 @@ public class ModEventHandlerClient {
|
||||
List<String> names = ItemStackUtil.getOreDictNames(stack);
|
||||
|
||||
if(names.size() > 0) {
|
||||
list.add(EnumChatFormatting.BLUE + I18nUtil.resolveKey("tooltip.oredict"));
|
||||
list.add(EnumChatFormatting.BLUE + "Ore Dict:");
|
||||
for(String s : names) {
|
||||
list.add(EnumChatFormatting.AQUA + " -" + s);
|
||||
}
|
||||
} else {
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKey("tooltip.oredict.null"));
|
||||
list.add(EnumChatFormatting.RED + "No Ore Dict data!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -784,10 +786,10 @@ public class ModEventHandlerClient {
|
||||
list.add("");
|
||||
|
||||
if(entry.entry == EnumEntryType.ADD)
|
||||
list.add(EnumChatFormatting.GOLD + I18nUtil.resolveKey("tooltip.customnuke",entry.value,entry.type));
|
||||
list.add(EnumChatFormatting.GOLD + "Adds " + entry.value + " to the custom nuke stage " + entry.type);
|
||||
|
||||
if(entry.entry == EnumEntryType.MULT)
|
||||
list.add(EnumChatFormatting.GOLD + I18nUtil.resolveKey("tooltip.customnukemultiplier",entry.value ,entry.type));
|
||||
list.add(EnumChatFormatting.GOLD + "Adds multiplier " + entry.value + " to the custom nuke stage " + entry.type);
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
@ -28,11 +28,17 @@ public class BufPacket implements IMessage {
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
this.x = buf.readInt();
|
||||
this.y = buf.readInt();
|
||||
this.z = buf.readInt();
|
||||
this.buf = buf;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
buf.writeInt(x);
|
||||
buf.writeInt(y);
|
||||
buf.writeInt(z);
|
||||
this.rec.serialize(buf);
|
||||
}
|
||||
|
||||
|
||||
@ -19,10 +19,6 @@ public class PacketDispatcher {
|
||||
wrapper.registerMessage(TEStructurePacket.Handler.class, TEStructurePacket.class, i++, Side.CLIENT);
|
||||
//Mining drill rotation for rendering
|
||||
wrapper.registerMessage(TEDrillPacket.Handler.class, TEDrillPacket.class, i++, Side.CLIENT);
|
||||
//Mining drill torque for sounds
|
||||
wrapper.registerMessage(TEDrillSoundPacket.Handler.class, TEDrillSoundPacket.class, i++, Side.CLIENT);
|
||||
//Missile type for rendering
|
||||
wrapper.registerMessage(TEMissilePacket.Handler.class, TEMissilePacket.class, i++, Side.CLIENT);
|
||||
//Fluid packet for GUI
|
||||
wrapper.registerMessage(TEFluidPacket.Handler.class, TEFluidPacket.class, i++, Side.CLIENT);
|
||||
//Sound packet that keeps client and server separated
|
||||
@ -35,8 +31,6 @@ public class PacketDispatcher {
|
||||
wrapper.registerMessage(TESirenPacket.Handler.class, TESirenPacket.class, i++, Side.CLIENT);
|
||||
//Signals server to change ItemStacks
|
||||
wrapper.registerMessage(ItemDesignatorPacket.Handler.class, ItemDesignatorPacket.class, i++, Side.SERVER);
|
||||
//Siren packet for looped sounds
|
||||
wrapper.registerMessage(TERadarPacket.Handler.class, TERadarPacket.class, i++, Side.CLIENT);
|
||||
//Signals server to perform orbital strike, among other things
|
||||
wrapper.registerMessage(SatLaserPacket.Handler.class, SatLaserPacket.class, i++, Side.SERVER);
|
||||
//Universal package for sending small info packs back to server
|
||||
|
||||
@ -1,342 +0,0 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.WeaponConfig;
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.inventory.container.ContainerMachineRadar;
|
||||
import com.hbm.inventory.gui.GUIMachineRadar;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityTickingBase;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import api.hbm.entity.IRadarDetectable;
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import li.cil.oc.api.machine.Arguments;
|
||||
import li.cil.oc.api.machine.Callback;
|
||||
import li.cil.oc.api.machine.Context;
|
||||
import li.cil.oc.api.network.SimpleComponent;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityMachineRadar extends TileEntityTickingBase implements IEnergyUser, IGUIProvider, SimpleComponent {
|
||||
|
||||
public List<Entity> detectedEntities = new ArrayList();
|
||||
public List<int[]> nearbyMissiles = new ArrayList();
|
||||
int pingTimer = 0;
|
||||
int lastPower;
|
||||
final static int maxTimer = 80;
|
||||
|
||||
public boolean scanMissiles = true;
|
||||
public boolean scanPlayers = true;
|
||||
public boolean smartMode = true;
|
||||
public boolean redMode = true;
|
||||
|
||||
public boolean jammed = false;
|
||||
|
||||
public float prevRotation;
|
||||
public float rotation;
|
||||
|
||||
public long power = 0;
|
||||
public static final int maxPower = 100000;
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(this.yCoord < WeaponConfig.radarAltitude) return;
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.updateStandardConnections(worldObj, xCoord, yCoord, zCoord);
|
||||
|
||||
nearbyMissiles.clear();
|
||||
|
||||
if(power > 0) {
|
||||
allocateMissiles();
|
||||
power -= 500;
|
||||
|
||||
if(power < 0) power = 0;
|
||||
}
|
||||
|
||||
if(this.lastPower != getRedPower()) worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockType());
|
||||
|
||||
sendMissileData();
|
||||
lastPower = getRedPower();
|
||||
|
||||
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) != ModBlocks.muffler) {
|
||||
|
||||
pingTimer++;
|
||||
|
||||
if(power > 0 && pingTimer >= maxTimer) {
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.sonarPing", 5.0F, 1.0F);
|
||||
pingTimer = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
prevRotation = rotation;
|
||||
if(power > 0) rotation += 5F;
|
||||
|
||||
if(rotation >= 360) {
|
||||
rotation -= 360F;
|
||||
prevRotation -= 360F;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void handleButtonPacket(int value, int meta) {
|
||||
|
||||
switch(meta) {
|
||||
case 0: this.scanMissiles = !this.scanMissiles; break;
|
||||
case 1: this.scanPlayers = !this.scanPlayers; break;
|
||||
case 2: this.smartMode = !this.smartMode; break;
|
||||
case 3: this.redMode = !this.redMode; break;
|
||||
}
|
||||
}
|
||||
|
||||
private void allocateMissiles() {
|
||||
|
||||
nearbyMissiles.clear();
|
||||
detectedEntities.clear();
|
||||
jammed = false;
|
||||
|
||||
List<Entity> list = worldObj.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(xCoord + 0.5 - WeaponConfig.radarRange, 0, zCoord + 0.5 - WeaponConfig.radarRange, xCoord + 0.5 + WeaponConfig.radarRange, 5000, zCoord + 0.5 + WeaponConfig.radarRange));
|
||||
|
||||
for(Entity e : list) {
|
||||
|
||||
if(e.posY < yCoord + WeaponConfig.radarBuffer)
|
||||
continue;
|
||||
|
||||
if(e instanceof EntityLivingBase && HbmLivingProps.getDigamma((EntityLivingBase) e) > 0.001) {
|
||||
this.jammed = true;
|
||||
nearbyMissiles.clear();
|
||||
detectedEntities.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
if(e instanceof EntityPlayer && this.scanPlayers) {
|
||||
nearbyMissiles.add(new int[] { (int)e.posX, (int)e.posZ, RadarTargetType.PLAYER.ordinal(), (int)e.posY });
|
||||
detectedEntities.add(e);
|
||||
}
|
||||
|
||||
if(e instanceof IRadarDetectable && this.scanMissiles) {
|
||||
nearbyMissiles.add(new int[] { (int)e.posX, (int)e.posZ, ((IRadarDetectable)e).getTargetType().ordinal(), (int)e.posY });
|
||||
|
||||
if(!this.smartMode || e.motionY <= 0)
|
||||
detectedEntities.add(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int getRedPower() {
|
||||
|
||||
if(!detectedEntities.isEmpty()) {
|
||||
|
||||
/// PROXIMITY ///
|
||||
if(redMode) {
|
||||
|
||||
double maxRange = WeaponConfig.radarRange * Math.sqrt(2D);
|
||||
|
||||
int power = 0;
|
||||
|
||||
for(int i = 0; i < detectedEntities.size(); i++) {
|
||||
|
||||
Entity e = detectedEntities.get(i);
|
||||
double dist = Math.sqrt(Math.pow(e.posX - xCoord, 2) + Math.pow(e.posZ - zCoord, 2));
|
||||
int p = 15 - (int)Math.floor(dist / maxRange * 15);
|
||||
|
||||
if(p > power)
|
||||
power = p;
|
||||
}
|
||||
|
||||
return power;
|
||||
|
||||
/// TIER ///
|
||||
} else {
|
||||
|
||||
int power = 0;
|
||||
|
||||
for(int i = 0; i < nearbyMissiles.size(); i++) {
|
||||
|
||||
if(nearbyMissiles.get(i)[2] + 1 > power) {
|
||||
power = nearbyMissiles.get(i)[2] + 1;
|
||||
}
|
||||
}
|
||||
|
||||
return power;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
private void sendMissileData() {
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setLong("power", power);
|
||||
data.setBoolean("scanMissiles", scanMissiles);
|
||||
data.setBoolean("scanPlayers", scanPlayers);
|
||||
data.setBoolean("smartMode", smartMode);
|
||||
data.setBoolean("redMode", redMode);
|
||||
data.setBoolean("jammed", jammed);
|
||||
data.setInteger("count", this.nearbyMissiles.size());
|
||||
|
||||
for(int i = 0; i < this.nearbyMissiles.size(); i++) {
|
||||
data.setInteger("x" + i, this.nearbyMissiles.get(i)[0]);
|
||||
data.setInteger("z" + i, this.nearbyMissiles.get(i)[1]);
|
||||
data.setInteger("type" + i, this.nearbyMissiles.get(i)[2]);
|
||||
data.setInteger("y" + i, this.nearbyMissiles.get(i)[3]);
|
||||
}
|
||||
|
||||
this.networkPack(data, 15);
|
||||
}
|
||||
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
|
||||
this.nearbyMissiles.clear();
|
||||
this.power = data.getLong("power");
|
||||
this.scanMissiles = data.getBoolean("scanMissiles");
|
||||
this.scanPlayers = data.getBoolean("scanPlayers");
|
||||
this.smartMode = data.getBoolean("smartMode");
|
||||
this.redMode = data.getBoolean("redMode");
|
||||
this.jammed = data.getBoolean("jammed");
|
||||
|
||||
int count = data.getInteger("count");
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
|
||||
int x = data.getInteger("x" + i);
|
||||
int z = data.getInteger("z" + i);
|
||||
int type = data.getInteger("type" + i);
|
||||
int y = data.getInteger("y" + i);
|
||||
|
||||
this.nearbyMissiles.add(new int[] {x, z, type, y});
|
||||
}
|
||||
}
|
||||
|
||||
public long getPowerScaled(long i) {
|
||||
return (power * i) / maxPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long i) {
|
||||
power = i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
return power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return maxPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
this.power = nbt.getLong("power");
|
||||
this.scanMissiles = nbt.getBoolean("scanMissiles");
|
||||
this.scanPlayers = nbt.getBoolean("scanPlayers");
|
||||
this.smartMode = nbt.getBoolean("smartMode");
|
||||
this.redMode = nbt.getBoolean("redMode");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setLong("power", power);
|
||||
nbt.setBoolean("scanMissiles", scanMissiles);
|
||||
nbt.setBoolean("scanPlayers", scanPlayers);
|
||||
nbt.setBoolean("smartMode", smartMode);
|
||||
nbt.setBoolean("redMode", redMode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return TileEntity.INFINITE_EXTENT_AABB;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared()
|
||||
{
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
// do some opencomputer stuff
|
||||
|
||||
@Override
|
||||
public String getComponentName() {
|
||||
return "ntm_radar";
|
||||
}
|
||||
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getEnergyInfo(Context context, Arguments args) {
|
||||
return new Object[] {getPower(), getMaxPower()};
|
||||
}
|
||||
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] isJammed(Context context, Arguments args) {
|
||||
return new Object[] {jammed};
|
||||
}
|
||||
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getEntities(Context context, Arguments args) { //fuck fuck fuck
|
||||
if(!jammed) {
|
||||
List<Object> list = new ArrayList();
|
||||
list.add(detectedEntities.size()); // small header of how many entities in the list
|
||||
for (Entity e : detectedEntities) {
|
||||
list.add(e.posX); // positions
|
||||
list.add(e.posY);
|
||||
list.add(e.posZ);
|
||||
list.add(e.motionX);
|
||||
list.add(e.motionY);
|
||||
list.add(e.motionZ);
|
||||
list.add(e.rotationYaw); // just do rotation so you can calculate DOT
|
||||
list.add(Math.sqrt(Math.pow(e.posX - xCoord, 2) + Math.pow(e.posZ - zCoord, 2))); // distance
|
||||
boolean player = e instanceof EntityPlayer;
|
||||
list.add(player); // isPlayer boolean
|
||||
if(!player) // missile tier
|
||||
list.add(((IRadarDetectable) e).getTargetType().ordinal());
|
||||
else // player name (hopefully)
|
||||
list.add(((EntityPlayer) e).getDisplayName());
|
||||
}
|
||||
return new Object[] {list}; // long-ass list (like 9 entries per entity)
|
||||
} else {
|
||||
return new Object[] {"Radar jammed!"};
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerMachineRadar(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIMachineRadar(player.inventory, this);
|
||||
}
|
||||
}
|
||||
@ -7,27 +7,45 @@ import java.util.function.Function;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.WeaponConfig;
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
import com.hbm.inventory.container.ContainerMachineRadarNT;
|
||||
import com.hbm.inventory.gui.GUIMachineRadarNT;
|
||||
import com.hbm.inventory.gui.GUIMachineRadarNTSlots;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.tool.ItemCoordinateBase;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.IConfigurableMachine;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.IRadarCommandReceiver;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
import com.hbm.util.Tuple.Triplet;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
import com.hbm.world.WorldUtil;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import api.hbm.entity.IRadarDetectable;
|
||||
import api.hbm.entity.IRadarDetectableNT;
|
||||
import api.hbm.entity.IRadarDetectableNT.RadarScanParams;
|
||||
import api.hbm.entity.RadarEntry;
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
|
||||
@ -35,7 +53,7 @@ import net.minecraft.world.WorldServer;
|
||||
* Now with SmЯt™ lag-free entity detection! (patent pending)
|
||||
* @author hbm
|
||||
*/
|
||||
public class TileEntityMachineRadarNT extends TileEntityMachineBase implements IGUIProvider, IConfigurableMachine {
|
||||
public class TileEntityMachineRadarNT extends TileEntityMachineBase implements IEnergyUser, IGUIProvider, IConfigurableMachine, IControlReceiver {
|
||||
|
||||
public boolean scanMissiles = true;
|
||||
public boolean scanShells = true;
|
||||
@ -50,12 +68,21 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I
|
||||
public float rotation;
|
||||
|
||||
public long power = 0;
|
||||
|
||||
protected int pingTimer = 0;
|
||||
protected int lastPower;
|
||||
protected final static int maxTimer = 80;
|
||||
|
||||
public static int maxPower = 100_000;
|
||||
public static int consumption = 500;
|
||||
public static int radarRange = 1_000;
|
||||
public static int radarBuffer = 30;
|
||||
public static int radarAltitude = 55;
|
||||
public static int chunkLoadCap = 10;
|
||||
public static boolean generateChunks = false;
|
||||
|
||||
public byte[] map = new byte[40_000];
|
||||
public boolean clearFlag = false;
|
||||
|
||||
public List<RadarEntry> entries = new ArrayList();
|
||||
|
||||
@ -71,6 +98,8 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I
|
||||
radarRange = IConfigurableMachine.grab(obj, "I:radarRange", radarRange);
|
||||
radarBuffer = IConfigurableMachine.grab(obj, "I:radarBuffer", radarBuffer);
|
||||
radarAltitude = IConfigurableMachine.grab(obj, "I:radarAltitude", radarAltitude);
|
||||
chunkLoadCap = IConfigurableMachine.grab(obj, "I:chunkLoadCap", chunkLoadCap);
|
||||
generateChunks = IConfigurableMachine.grab(obj, "B:generateChunks", generateChunks);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -80,65 +109,108 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I
|
||||
writer.name("I:radarRange").value(radarRange);
|
||||
writer.name("I:radarBuffer").value(radarBuffer);
|
||||
writer.name("I:radarAltitude").value(radarAltitude);
|
||||
writer.name("B:generateChunks").value(generateChunks);
|
||||
}
|
||||
|
||||
public TileEntityMachineRadarNT() {
|
||||
super(1);
|
||||
super(10);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "";
|
||||
return "container.radar";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(this.map == null || this.map.length != 40_000) this.map = new byte[40_000];
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.power = Library.chargeTEFromItems(slots, 9, power, maxPower);
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) this.updateStandardConnections(worldObj, xCoord, yCoord, zCoord);
|
||||
|
||||
this.power = Library.chargeTEFromItems(slots, 0, power, maxPower);
|
||||
this.jammed = false;
|
||||
allocateTargets();
|
||||
|
||||
this.networkPackNT(25);
|
||||
}
|
||||
}
|
||||
|
||||
protected void allocateTargets() {
|
||||
this.entries.clear();
|
||||
|
||||
if(this.yCoord < radarAltitude) return;
|
||||
if(this.power <= consumption) return;
|
||||
this.power -= consumption;
|
||||
|
||||
int scan = this.scanRange();
|
||||
|
||||
for(Entity e : matchingEntities) {
|
||||
if(this.lastPower != getRedPower()) {
|
||||
this.markDirty();
|
||||
}
|
||||
lastPower = getRedPower();
|
||||
|
||||
if(e.dimension == worldObj.provider.dimensionId && Math.abs(e.posX - (xCoord + 0.5)) <= scan && Math.abs(e.posZ - (zCoord + 0.5)) <= scan && e.posY - yCoord < radarBuffer) {
|
||||
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) != ModBlocks.muffler) {
|
||||
|
||||
if(e instanceof EntityLivingBase && HbmLivingProps.getDigamma((EntityLivingBase) e) > 0.001) {
|
||||
this.jammed = true;
|
||||
entries.clear();
|
||||
return;
|
||||
pingTimer++;
|
||||
|
||||
if(power > 0 && pingTimer >= maxTimer) {
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.sonarPing", 5.0F, 1.0F);
|
||||
pingTimer = 0;
|
||||
}
|
||||
|
||||
for(Function<Pair<Entity, Object>, RadarEntry> converter : converters) {
|
||||
}
|
||||
|
||||
if(this.showMap) {
|
||||
int chunkLoads = 0;
|
||||
for(int i = 0; i < 100; i++) {
|
||||
int index = (int) (worldObj.getTotalWorldTime() % 400) * 100 + i;
|
||||
int iX = (index % 200) * radarRange * 2 / 200;
|
||||
int iZ = index / 200 * radarRange * 2 / 200;
|
||||
|
||||
RadarEntry entry = converter.apply(new Pair(e, this));
|
||||
if(entry != null) {
|
||||
this.entries.add(entry);
|
||||
break;
|
||||
int x = xCoord - radarRange + iX;
|
||||
int z = zCoord - radarRange + iZ;
|
||||
|
||||
if(worldObj.getChunkProvider().chunkExists(x >> 4, z >> 4)) {
|
||||
this.map[index] = (byte) MathHelper.clamp_int(worldObj.getHeightValue(x, z), 50, 128);
|
||||
} else {
|
||||
if(this.map[index] == 0 && chunkLoads < chunkLoadCap) {
|
||||
if(this.generateChunks) {
|
||||
worldObj.getChunkFromChunkCoords(x >> 4, z >> 4);
|
||||
this.map[index] = (byte) MathHelper.clamp_int(worldObj.getHeightValue(x, z), 50, 128);
|
||||
chunkLoads++;
|
||||
} else {
|
||||
WorldUtil.provideChunk((WorldServer) worldObj, x >> 4, z >> 4);
|
||||
this.map[index] = (byte) MathHelper.clamp_int(worldObj.getHeightValue(x, z), 50, 128);
|
||||
if(worldObj.getChunkProvider().chunkExists(x >> 4, z >> 4)) chunkLoads++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(slots[8] != null && slots[8].getItem() == ModItems.radar_linker) {
|
||||
BlockPos pos = ItemCoordinateBase.getPosition(slots[8]);
|
||||
if(pos != null) {
|
||||
TileEntity tile = worldObj.getTileEntity(pos.getX(), pos.getY(), pos.getZ());
|
||||
if(tile instanceof TileEntityMachineRadarScreen) {
|
||||
TileEntityMachineRadarScreen screen = (TileEntityMachineRadarScreen) tile;
|
||||
screen.entries.clear();
|
||||
screen.entries.addAll(this.entries);
|
||||
screen.refX = xCoord;
|
||||
screen.refY = yCoord;
|
||||
screen.refZ = zCoord;
|
||||
screen.linked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.networkPackNT(50);
|
||||
if(this.clearFlag) {
|
||||
this.map = new byte[40_000];
|
||||
this.clearFlag = false;
|
||||
}
|
||||
} else {
|
||||
prevRotation = rotation;
|
||||
if(power > 0) rotation += 5F;
|
||||
|
||||
if(rotation >= 360) {
|
||||
rotation -= 360F;
|
||||
prevRotation -= 360F;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected int scanRange() {
|
||||
return radarRange;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(ByteBuf buf) {
|
||||
buf.writeLong(this.power);
|
||||
@ -151,6 +223,21 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I
|
||||
buf.writeBoolean(this.jammed);
|
||||
buf.writeInt(entries.size());
|
||||
for(RadarEntry entry : entries) entry.toBytes(buf);
|
||||
if(this.clearFlag) {
|
||||
buf.writeBoolean(true);
|
||||
} else {
|
||||
buf.writeBoolean(false);
|
||||
if(this.showMap) {
|
||||
buf.writeBoolean(true);
|
||||
short index = (short) (worldObj.getTotalWorldTime() % 400);
|
||||
buf.writeShort(index);
|
||||
for(int i = index * 100; i < (index + 1) * 100; i++) {
|
||||
buf.writeByte(this.map[i]);
|
||||
}
|
||||
} else {
|
||||
buf.writeBoolean(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -164,11 +251,193 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I
|
||||
this.showMap = buf.readBoolean();
|
||||
this.jammed = buf.readBoolean();
|
||||
int count = buf.readInt();
|
||||
this.entries.clear();
|
||||
for(int i = 0; i < count; i++) {
|
||||
RadarEntry entry = new RadarEntry();
|
||||
entry.fromBytes(buf);
|
||||
this.entries.add(entry);
|
||||
}
|
||||
if(buf.readBoolean()) { // clear flag
|
||||
this.map = new byte[40_000];
|
||||
} else {
|
||||
if(buf.readBoolean()) { // map enabled
|
||||
int index = buf.readShort();
|
||||
for(int i = index * 100; i < (index + 1) * 100; i++) {
|
||||
this.map[i] = buf.readByte();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
this.power = nbt.getLong("power");
|
||||
this.scanMissiles = nbt.getBoolean("scanMissiles");
|
||||
this.scanShells = nbt.getBoolean("scanShells");
|
||||
this.scanPlayers = nbt.getBoolean("scanPlayers");
|
||||
this.smartMode = nbt.getBoolean("smartMode");
|
||||
this.redMode = nbt.getBoolean("redMode");
|
||||
this.showMap = nbt.getBoolean("showMap");
|
||||
if(nbt.hasKey("map")) this.map = nbt.getByteArray("map");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setLong("power", power);
|
||||
nbt.setBoolean("scanMissiles", scanMissiles);
|
||||
nbt.setBoolean("scanShells", scanShells);
|
||||
nbt.setBoolean("scanPlayers", scanPlayers);
|
||||
nbt.setBoolean("smartMode", smartMode);
|
||||
nbt.setBoolean("redMode", redMode);
|
||||
nbt.setBoolean("showMap", showMap);
|
||||
nbt.setByteArray("map", map);
|
||||
}
|
||||
|
||||
protected void allocateTargets() {
|
||||
this.entries.clear();
|
||||
|
||||
if(this.yCoord < radarAltitude) return;
|
||||
if(this.power < consumption) return;
|
||||
this.power -= consumption;
|
||||
|
||||
int scan = this.scanRange();
|
||||
|
||||
RadarScanParams params = new RadarScanParams(this.scanMissiles, this.scanShells, this.scanPlayers, this.smartMode);
|
||||
|
||||
for(Entity e : matchingEntities) {
|
||||
|
||||
if(e.dimension == worldObj.provider.dimensionId && Math.abs(e.posX - (xCoord + 0.5)) <= scan && Math.abs(e.posZ - (zCoord + 0.5)) <= scan && e.posY - yCoord > radarBuffer) {
|
||||
|
||||
if(e instanceof EntityLivingBase && HbmLivingProps.getDigamma((EntityLivingBase) e) > 0.001) {
|
||||
this.jammed = true;
|
||||
entries.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
for(Function<Triplet<Entity, Object, RadarScanParams>, RadarEntry> converter : converters) {
|
||||
|
||||
RadarEntry entry = converter.apply(new Triplet(e, this, params));
|
||||
if(entry != null) {
|
||||
this.entries.add(entry);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int getRedPower() {
|
||||
|
||||
if(!entries.isEmpty()) {
|
||||
|
||||
/// PROXIMITY ///
|
||||
if(redMode) {
|
||||
|
||||
double maxRange = WeaponConfig.radarRange * Math.sqrt(2D);
|
||||
int power = 0;
|
||||
|
||||
for(int i = 0; i < entries.size(); i++) {
|
||||
RadarEntry e = entries.get(i);
|
||||
if(!e.redstone) continue;
|
||||
double dist = Math.sqrt(Math.pow(e.posX - xCoord, 2) + Math.pow(e.posZ - zCoord, 2));
|
||||
int p = 15 - (int)Math.floor(dist / maxRange * 15);
|
||||
|
||||
if(p > power) power = p;
|
||||
}
|
||||
|
||||
return power;
|
||||
|
||||
/// TIER ///
|
||||
} else {
|
||||
|
||||
int power = 0;
|
||||
|
||||
for(int i = 0; i < entries.size(); i++) {
|
||||
RadarEntry e = entries.get(i);
|
||||
if(!e.redstone) continue;
|
||||
if(e.blipLevel + 1 > power) {
|
||||
power = e.blipLevel + 1;
|
||||
}
|
||||
}
|
||||
|
||||
return power;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected int scanRange() {
|
||||
return radarRange;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long i) {
|
||||
power = i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
return power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return maxPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(EntityPlayer player) {
|
||||
return this.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override public void receiveControl(NBTTagCompound data) { }
|
||||
|
||||
@Override
|
||||
public void receiveControl(EntityPlayer player, NBTTagCompound data) {
|
||||
|
||||
if(data.hasKey("missiles")) this.scanMissiles = !this.scanMissiles;
|
||||
if(data.hasKey("shells")) this.scanShells = !this.scanShells;
|
||||
if(data.hasKey("players")) this.scanPlayers = !this.scanPlayers;
|
||||
if(data.hasKey("smart")) this.smartMode = !this.smartMode;
|
||||
if(data.hasKey("red")) this.redMode = !this.redMode;
|
||||
if(data.hasKey("map")) this.showMap = !this.showMap;
|
||||
if(data.hasKey("clear")) this.clearFlag = true;
|
||||
|
||||
if(data.hasKey("gui1")) FMLNetworkHandler.openGui(player, MainRegistry.instance, 1, worldObj, xCoord, yCoord, zCoord);
|
||||
|
||||
if(data.hasKey("link")) {
|
||||
int id = data.getInteger("link");
|
||||
ItemStack link = slots[id];
|
||||
|
||||
if(link != null && link.getItem() == ModItems.radar_linker) {
|
||||
BlockPos pos = ItemCoordinateBase.getPosition(link);
|
||||
|
||||
if(pos != null) {
|
||||
TileEntity tile = worldObj.getTileEntity(pos.getX(), pos.getY(), pos.getZ());
|
||||
if(tile instanceof IRadarCommandReceiver) {
|
||||
IRadarCommandReceiver rec = (IRadarCommandReceiver) tile;
|
||||
|
||||
if(data.hasKey("launchEntity")) {
|
||||
Entity entity = worldObj.getEntityByID(data.getInteger("launchEntity"));
|
||||
if(entity != null) {
|
||||
if(rec.sendCommandEntity(entity)) {
|
||||
worldObj.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
} else if(data.hasKey("launchPosX")) {
|
||||
int x = data.getInteger("launchPosX");
|
||||
int z = data.getInteger("launchPosZ");
|
||||
if(rec.sendCommandPosition(x, yCoord, z)) {
|
||||
worldObj.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
@ -192,22 +461,36 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared()
|
||||
{
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) { return null; }
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer player) {
|
||||
if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) {
|
||||
return false;
|
||||
} else {
|
||||
return player.getDistance(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 128;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
if(ID == 1) return new ContainerMachineRadarNT(player.inventory, this);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIMachineRadarNT(this);
|
||||
if(ID == 0) return new GUIMachineRadarNT(this);
|
||||
if(ID == 1) return new GUIMachineRadarNTSlots(player.inventory, this);
|
||||
return null;
|
||||
}
|
||||
|
||||
/** List of lambdas that are supplied a Pair with the entity and radar in question to generate a RadarEntry
|
||||
The converters coming first have the highest priority */
|
||||
public static List<Function<Pair<Entity, Object>, RadarEntry>> converters = new ArrayList();
|
||||
public static List<Function<Triplet<Entity, Object, RadarScanParams>, RadarEntry>> converters = new ArrayList();
|
||||
public static List<Class> classes = new ArrayList();
|
||||
public static List<Entity> matchingEntities = new ArrayList();
|
||||
|
||||
@ -218,7 +501,7 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I
|
||||
public static void updateSystem() {
|
||||
matchingEntities.clear();
|
||||
|
||||
for(WorldServer world : Minecraft.getMinecraft().getIntegratedServer().worldServers) {
|
||||
for(WorldServer world : MinecraftServer.getServer().worldServers) {
|
||||
for(Object entity : world.loadedEntityList) {
|
||||
for(Class clazz : classes) {
|
||||
if(clazz.isAssignableFrom(entity.getClass())) {
|
||||
@ -241,21 +524,25 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I
|
||||
public static void registerConverters() {
|
||||
//IRadarDetectableNT
|
||||
converters.add(x -> {
|
||||
Entity e = x.getKey();
|
||||
Entity e = x.getX();
|
||||
if(e instanceof IRadarDetectableNT) {
|
||||
IRadarDetectableNT detectable = (IRadarDetectableNT) e;
|
||||
if(detectable.canBeSeenBy(x.getValue())) return new RadarEntry(detectable, e);
|
||||
if(detectable.canBeSeenBy(x.getY()) && detectable.paramsApplicable(x.getZ())) return new RadarEntry(detectable, e, detectable.suppliesRedstone(x.getZ()));
|
||||
}
|
||||
return null;
|
||||
});
|
||||
//IRadarDetectable, Legacy
|
||||
converters.add(x -> {
|
||||
if(x.getKey() instanceof IRadarDetectable) return new RadarEntry((IRadarDetectable) x.getKey(), x.getKey());
|
||||
Entity e = x.getX();
|
||||
RadarScanParams params = x.getZ();
|
||||
if(e instanceof IRadarDetectable && params.scanMissiles) {
|
||||
return new RadarEntry((IRadarDetectable) e, e);
|
||||
}
|
||||
return null;
|
||||
});
|
||||
//Players
|
||||
converters.add(x -> {
|
||||
if(x.getKey() instanceof EntityPlayer) return new RadarEntry((EntityPlayer) x.getKey());
|
||||
if(x.getX() instanceof EntityPlayer && x.getZ().scanPlayers) return new RadarEntry((EntityPlayer) x.getX());
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user