Wire fixes
No files matched your search
@@ -61,7 +61,7 @@ public class MekanismRenderer
|
||||
{
|
||||
for(EnumColor color : EnumColor.values())
|
||||
{
|
||||
colors[color.ordinal()] = event.map.registerIcon("mekanism:Overlay" + color.getLocalizedName().replace(" ", ""));
|
||||
colors[color.ordinal()] = event.map.registerIcon("mekanism:overlay/Overlay" + color.getLocalizedName().replace(" ", ""));
|
||||
}
|
||||
|
||||
energyIcon = event.map.registerIcon("mekanism:LiquidEnergy");
|
||||
|
||||
@@ -47,7 +47,7 @@ public class RenderBattery extends TileEntitySpecialRenderer
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("incomplete-switch")
|
||||
public void renderTileEntityAt(TileEntity t, double x, double y, double z, float f)
|
||||
public void renderTileEntityAt(TileEntity t, double x, double y, double z, float partialTick)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5, y + 1.5, z + 0.5);
|
||||
|
||||
@@ -17,7 +17,7 @@ public class RenderEMContractor extends TileEntitySpecialRenderer
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("incomplete-switch")
|
||||
public void renderTileEntityAt(TileEntity t, double x, double y, double z, float f)
|
||||
public void renderTileEntityAt(TileEntity t, double x, double y, double z, float partialTick)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5, y + 1.5, z + 0.5);
|
||||
|
||||
@@ -146,7 +146,7 @@ public class RenderPartWire
|
||||
{
|
||||
wireIcon = iconReg.registerIcon("mekanism:render/Wire");
|
||||
insulationIcon = iconReg.registerIcon("mekanism:render/" + "Insulation" + (MekanismInduction.LO_FI_INSULATION ? "Tiny" : ""));
|
||||
breakIcon = iconReg.registerIcon("mekanism:wire");
|
||||
breakIcon = iconReg.registerIcon("mekanism:Wire");
|
||||
}
|
||||
|
||||
public void renderStatic(PartWire wire)
|
||||
|
||||
@@ -18,12 +18,6 @@ import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* TODO: Use ISBRH.
|
||||
*
|
||||
* @author Calclavia
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderWire extends TileEntitySpecialRenderer
|
||||
{
|
||||
@@ -32,17 +26,23 @@ public class RenderWire extends TileEntitySpecialRenderer
|
||||
|
||||
public static final ModelWire WIRE_MODEL = new ModelWire();
|
||||
public static final ModelInsulation INSULATION_MODEL = new ModelInsulation();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTick)
|
||||
{
|
||||
renderAModelAt((TileEntityWire)tileEntity, x, y, z, partialTick);
|
||||
}
|
||||
|
||||
public void renderModelAt(TileEntityWire tileEntity, double x, double y, double z, float f)
|
||||
public void renderAModelAt(TileEntityWire tileEntity, double x, double y, double z, float partialTick)
|
||||
{
|
||||
if(tileEntity != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);
|
||||
GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
|
||||
GL11.glScalef(1, -1, -1);
|
||||
|
||||
EnumWireMaterial material = tileEntity.getMaterial();
|
||||
//Texture file
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(WIRE_TEXTURE);
|
||||
GL11.glColor4d(material.color.x, material.color.y, material.color.z, 1);
|
||||
|
||||
@@ -129,10 +129,4 @@ public class RenderWire extends TileEntitySpecialRenderer
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double var2, double var4, double var6, float var8)
|
||||
{
|
||||
renderModelAt((TileEntityWire)tileEntity, var2, var4, var6, var8);
|
||||
}
|
||||
}
|
||||
@@ -60,15 +60,6 @@ public class MekanismInduction implements IModule
|
||||
/** MekanismInduction version number */
|
||||
public static Version versionNumber = new Version(5, 6, 0);
|
||||
|
||||
public static final String DOMAIN = "mekanism";
|
||||
public static final String PREFIX = DOMAIN + ":";
|
||||
public static final String DIRECTORY = "/assets/" + DOMAIN + "/";
|
||||
public static final String TEXTURE_DIRECTORY = "textures/";
|
||||
public static final String GUI_DIRECTORY = "gui/";
|
||||
public static final String BLOCK_TEXTURE_DIRECTORY = TEXTURE_DIRECTORY + "blocks/";
|
||||
public static final String ITEM_TEXTURE_DIRECTORY = TEXTURE_DIRECTORY + "items/";
|
||||
public static final String MODEL_TEXTURE_DIRECTORY = "render/";
|
||||
|
||||
/**
|
||||
* Settings
|
||||
*/
|
||||
@@ -118,7 +109,7 @@ public class MekanismInduction implements IModule
|
||||
if(Loader.isModLoaded("ForgeMultipart"))
|
||||
{
|
||||
try {
|
||||
itemPartWire = (Item)Class.forName("mekanism.induction.common.wire.ItemPartWire").getDeclaredConstructor(Integer.TYPE).newInstance(getNextItemID());
|
||||
itemPartWire = ((Item)Class.forName("mekanism.induction.common.wire.ItemPartWire").getDeclaredConstructor(Integer.TYPE).newInstance(getNextItemID())).setUnlocalizedName("Wire");
|
||||
Mekanism.logger.fine("Mekanism Induction multipart loaded.");
|
||||
} catch(Exception e) {
|
||||
Mekanism.logger.severe("Failed to load multipart wire.");
|
||||
@@ -137,7 +128,7 @@ public class MekanismInduction implements IModule
|
||||
|
||||
if(itemPartWire == null)
|
||||
{
|
||||
blockWire = new BlockWire(getNextBlockID());
|
||||
blockWire = new BlockWire(getNextBlockID()).setUnlocalizedName("Wire");
|
||||
}
|
||||
|
||||
Mekanism.configuration.save();
|
||||
|
||||
@@ -29,14 +29,12 @@ public class BlockWire extends BlockConductor
|
||||
{
|
||||
super(Mekanism.configuration.getBlock("wire", id).getInt(id), Material.cloth);
|
||||
|
||||
setUnlocalizedName(MekanismInduction.PREFIX + "wire");
|
||||
setStepSound(soundClothFootstep);
|
||||
setResistance(0.2F);
|
||||
setHardness(0.1f);
|
||||
setBlockBounds(0.3f, 0.3f, 0.3f, 0.7f, 0.7f, 0.7f);
|
||||
setCreativeTab(CreativeTabs.tabRedstone);
|
||||
Block.setBurnProperties(blockID, 30, 60);
|
||||
setTextureName(MekanismInduction.PREFIX + "wire");
|
||||
setCreativeTab(Mekanism.tabMekanism);
|
||||
}
|
||||
|
||||
@@ -56,8 +54,7 @@ public class BlockWire extends BlockConductor
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityPlayer, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
TileEntity t = world.getBlockTileEntity(x, y, z);
|
||||
TileEntityWire tileEntity = (TileEntityWire)t;
|
||||
TileEntityWire tileEntity = (TileEntityWire)world.getBlockTileEntity(x, y, z);
|
||||
|
||||
if(entityPlayer.getCurrentEquippedItem() != null)
|
||||
{
|
||||
@@ -120,11 +117,11 @@ public class BlockWire extends BlockConductor
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, int par5, int par6)
|
||||
{
|
||||
TileEntity t = world.getBlockTileEntity(x, y, z);
|
||||
TileEntity tile = world.getBlockTileEntity(x, y, z);
|
||||
|
||||
if(t instanceof TileEntityWire)
|
||||
if(tile instanceof TileEntityWire)
|
||||
{
|
||||
TileEntityWire tileEntity = (TileEntityWire) t;
|
||||
TileEntityWire tileEntity = (TileEntityWire) tile;
|
||||
|
||||
if(tileEntity.isInsulated)
|
||||
{
|
||||
|
||||
@@ -20,8 +20,8 @@ public class ItemBlockWire extends ItemBlock
|
||||
public ItemBlockWire(int id)
|
||||
{
|
||||
super(id);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
setMaxDamage(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -33,23 +33,23 @@ public class ItemBlockWire extends ItemBlock
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack)
|
||||
{
|
||||
return this.getUnlocalizedName() + "." + EnumWireMaterial.values()[itemStack.getItemDamage()].name().toLowerCase();
|
||||
return getUnlocalizedName() + "." + EnumWireMaterial.values()[itemStack.getItemDamage()].getName().toLowerCase();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List par3List, boolean par4)
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean par4)
|
||||
{
|
||||
par3List.add("Resistance: " + ElectricityDisplay.getDisplay(EnumWireMaterial.values()[itemstack.getItemDamage()].resistance, ElectricUnit.RESISTANCE));
|
||||
par3List.add("Max Amperage: " + ElectricityDisplay.getDisplay(EnumWireMaterial.values()[itemstack.getItemDamage()].maxAmps, ElectricUnit.AMPERE));
|
||||
list.add("Resistance: " + ElectricityDisplay.getDisplay(EnumWireMaterial.values()[itemstack.getItemDamage()].resistance, ElectricUnit.RESISTANCE));
|
||||
list.add("Max Amperage: " + ElectricityDisplay.getDisplay(EnumWireMaterial.values()[itemstack.getItemDamage()].maxAmps, ElectricUnit.AMPERE));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister)
|
||||
public void registerIcons(IconRegister register)
|
||||
{
|
||||
for (int i = 0; i < EnumWireMaterial.values().length; i++)
|
||||
for(EnumWireMaterial material : EnumWireMaterial.values())
|
||||
{
|
||||
this.icons[i] = iconRegister.registerIcon(this.getUnlocalizedName(new ItemStack(this.itemID, 1, i)).replaceAll("tile.", ""));
|
||||
icons[material.ordinal()] = register.registerIcon("mekanism:" + material.getName() + "Wire");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,6 @@ public class ItemBlockWire extends ItemBlock
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage(int meta)
|
||||
{
|
||||
return this.icons[meta];
|
||||
return icons[meta];
|
||||
}
|
||||
}
|
||||
@@ -16,25 +16,33 @@ import universalelectricity.core.vector.Vector3;
|
||||
|
||||
public enum EnumWireMaterial
|
||||
{
|
||||
COPPER(12.5f, 3, 2, new Vector3(184, 115, 51)), TIN(13, 2, 0.5f, new Vector3(132, 132, 130)),
|
||||
IRON(0.1f, 2, 4, new Vector3(97, 102, 105)),
|
||||
ALUMINUM(0.025f, 6, 0.15f, new Vector3(215, 205, 181)),
|
||||
SILVER(0.005f, 1, 2, new Vector3(192, 192, 192)),
|
||||
SUPERCONDUCTOR(0, 8, Float.MAX_VALUE, new Vector3(212, 175, 55));
|
||||
COPPER("Copper", 12.5F, 3, 2, new Vector3(184, 115, 51)),
|
||||
TIN("Tin", 13, 2, 0.5F, new Vector3(132, 132, 130)),
|
||||
IRON("Iron", 0.1F, 2, 4, new Vector3(97, 102, 105)),
|
||||
ALUMINUM("Aluminum", 0.025F, 6, 0.15F, new Vector3(215, 205, 181)),
|
||||
SILVER("Silver", 0.005F, 1, 2, new Vector3(192, 192, 192)),
|
||||
SUPERCONDUCTOR("Superconductor", 0, 8, Float.MAX_VALUE, new Vector3(212, 175, 55));
|
||||
|
||||
public final float resistance;
|
||||
public final float damage;
|
||||
public final float maxAmps;
|
||||
public final Vector3 color;
|
||||
private ItemStack wire;
|
||||
private final String name;
|
||||
|
||||
EnumWireMaterial(float resist, float electrocution, float max, Vector3 vec)
|
||||
private EnumWireMaterial(String s, float resist, float electrocution, float max, Vector3 vec)
|
||||
{
|
||||
name = s;
|
||||
resistance = resist;
|
||||
damage = electrocution;
|
||||
maxAmps = max;
|
||||
color = vec.scale(1D / 255D);
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public ItemStack getWire()
|
||||
{
|
||||
@@ -54,7 +62,7 @@ public enum EnumWireMaterial
|
||||
if(wire == null)
|
||||
{
|
||||
wire = item;
|
||||
OreDictionary.registerOre(name().toLowerCase() + "Wire", wire);
|
||||
OreDictionary.registerOre(getName().toLowerCase() + "Wire", wire);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ public class ItemPartWire extends JItemMultiPart
|
||||
public ItemPartWire(int id)
|
||||
{
|
||||
super(Mekanism.configuration.get(Configuration.CATEGORY_ITEM, "wireMultipart", id).getInt(id));
|
||||
setUnlocalizedName(MekanismInduction.PREFIX + "wire");
|
||||
setCreativeTab(Mekanism.tabMekanism);
|
||||
setHasSubtypes(true);
|
||||
setMaxDamage(0);
|
||||
@@ -40,12 +39,6 @@ public class ItemPartWire extends JItemMultiPart
|
||||
return new PartWire(getDamage(arg0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName()
|
||||
{
|
||||
return super.getUnlocalizedName().replace("item", "tile");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int damage)
|
||||
{
|
||||
@@ -55,26 +48,26 @@ public class ItemPartWire extends JItemMultiPart
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack)
|
||||
{
|
||||
return getUnlocalizedName() + "." + EnumWireMaterial.values()[itemStack.getItemDamage()].name().toLowerCase();
|
||||
return "tile.Wire." + EnumWireMaterial.values()[itemStack.getItemDamage()].getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List par3List, boolean par4)
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean par4)
|
||||
{
|
||||
par3List.add("Resistance: " + ElectricityDisplay.getDisplay(EnumWireMaterial.values()[itemstack.getItemDamage()].resistance, ElectricUnit.RESISTANCE));
|
||||
par3List.add("Max Amperage: " + ElectricityDisplay.getDisplay(EnumWireMaterial.values()[itemstack.getItemDamage()].maxAmps, ElectricUnit.AMPERE));
|
||||
list.add("Resistance: " + ElectricityDisplay.getDisplay(EnumWireMaterial.values()[itemstack.getItemDamage()].resistance, ElectricUnit.RESISTANCE));
|
||||
list.add("Max Amperage: " + ElectricityDisplay.getDisplay(EnumWireMaterial.values()[itemstack.getItemDamage()].maxAmps, ElectricUnit.AMPERE));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister)
|
||||
{
|
||||
for(int i = 0; i < EnumWireMaterial.values().length; i++)
|
||||
public void registerIcons(IconRegister register)
|
||||
{
|
||||
for(EnumWireMaterial material : EnumWireMaterial.values())
|
||||
{
|
||||
icons[i] = iconRegister.registerIcon(getUnlocalizedName(new ItemStack(itemID, 1, i)).replaceAll("tile.", ""));
|
||||
icons[material.ordinal()] = register.registerIcon("mekanism:" + material.getName() + "Wire");
|
||||
}
|
||||
|
||||
RenderPartWire.registerIcons(iconRegister);
|
||||
RenderPartWire.registerIcons(register);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -380,27 +380,23 @@ tile.Multimeter.name=Multimeter
|
||||
tile.ElectromagneticContractor.name=Electromagnetic Contractor
|
||||
tile.Battery.name=Modular Battery
|
||||
|
||||
<<<<<<< HEAD
|
||||
tile.mekanism:wire.copper.name=Copper Wire
|
||||
tile.mekanism:wire.tin.name=Tin Wire
|
||||
tile.mekanism:wire.iron.name=Iron Wire
|
||||
tile.mekanism:wire.aluminum.name=Aluminum Wire
|
||||
tile.mekanism:wire.silver.name=Silver Wire
|
||||
tile.mekanism:wire.superconductor.name=Superconductor Wire
|
||||
//Wires
|
||||
tile.Wire.CopperWire.name=Copper Wire
|
||||
tile.Wire.TinWire.name=Tin Wire
|
||||
tile.Wire.IronWire.name=Iron Wire
|
||||
tile.Wire.AluminumWire.name=Aluminum Wire
|
||||
tile.Wire.SilverWire.name=Silver Wire
|
||||
tile.Wire.SuperconductorWire.name=Superconductor Wire
|
||||
|
||||
//Items
|
||||
item.Linker.name=Electrostatic Linker
|
||||
=======
|
||||
|
||||
//General text
|
||||
text.contractor.success=Linked contractor successfully
|
||||
text.tesla.success=Linked tesla successfully
|
||||
>>>>>>> master
|
||||
|
||||
//Gui text
|
||||
gui.heatGenerator.fuel=Fuel
|
||||
|
||||
gui.solarGenerator.sun=Sun
|
||||
|
||||
gui.bioGenerator.biofuel=BioFuel
|
||||
|
||||
gui.electrolyticSeparator.dump=Dump
|
||||
|
Before Width: | Height: | Size: 269 B After Width: | Height: | Size: 269 B |
|
Before Width: | Height: | Size: 224 B After Width: | Height: | Size: 224 B |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 269 B After Width: | Height: | Size: 269 B |
|
Before Width: | Height: | Size: 225 B After Width: | Height: | Size: 225 B |
|
Before Width: | Height: | Size: 224 B After Width: | Height: | Size: 224 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |