Imported textures from FM, and minor work

This commit is contained in:
DarkGuardsman 2013-08-26 15:52:24 -04:00
parent 19b6c5ee8a
commit 972bb67835
15 changed files with 25 additions and 27 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 B

View file

@ -2,7 +2,6 @@ package dark.client.renders;
import ic2.api.energy.tile.IEnergyAcceptor;
import ic2.api.energy.tile.IEnergyTile;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.ForgeDirection;
@ -14,34 +13,33 @@ import universalelectricity.core.block.IConnector;
import universalelectricity.core.vector.Vector3;
import universalelectricity.core.vector.VectorHelper;
import buildcraft.api.power.IPowerReceptor;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.client.models.ModelCopperWire;
import dark.common.transmit.TileEntityWire;
import dark.core.DarkMain;
@SideOnly(Side.CLIENT)
public class RenderCopperWire extends TileEntitySpecialRenderer
public class RenderCopperWire extends RenderMachine
{
private static final ResourceLocation copperWireTexture = new ResourceLocation(DarkMain.TEXTURE_DIRECTORY, "textures/models/copperWire.png");
private static final ResourceLocation copperWireTexture = new ResourceLocation(DarkMain.getInstance().DOMAIN, "textures/models/copperWire.png");
public static final ModelCopperWire model = new ModelCopperWire();
public void renderModelAt(TileEntityWire wire, double d, double d1, double d2, float f)
@Override
public void renderTileEntityAt(TileEntity tileEntity, double d, double d1, double d2, float f)
{
// Texture file
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(copperWireTexture);
this.bindTextureByName(this.getTexture(tileEntity.getBlockType().blockID, tileEntity.getBlockMetadata()));
GL11.glPushMatrix();
GL11.glTranslatef((float) d + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
GL11.glScalef(1.0F, -1F, -1F);
Boolean[] renderSide = new Boolean[6];
boolean[] renderSide = new boolean[6];
for (byte i = 0; i < 6; i++)
{
ForgeDirection dir = ForgeDirection.getOrientation(i);
TileEntity ent = VectorHelper.getTileEntityFromSide(wire.worldObj, new Vector3(wire), dir);
TileEntity ent = VectorHelper.getTileEntityFromSide(tileEntity.worldObj, new Vector3(tileEntity), dir);
if (ent instanceof IConnector)
{
@ -54,7 +52,7 @@ public class RenderCopperWire extends TileEntitySpecialRenderer
{
if (ent instanceof IEnergyAcceptor)
{
if (((IEnergyAcceptor) ent).acceptsEnergyFrom(wire, dir.getOpposite()))
if (((IEnergyAcceptor) ent).acceptsEnergyFrom(tileEntity, dir.getOpposite()))
{
renderSide[i] = true;
}
@ -70,10 +68,9 @@ public class RenderCopperWire extends TileEntitySpecialRenderer
}
}
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
{
if(renderSide[side.ordinal()])
if (renderSide[side.ordinal()])
{
model.renderSide(side);
}
@ -83,8 +80,8 @@ public class RenderCopperWire extends TileEntitySpecialRenderer
}
@Override
public void renderTileEntityAt(TileEntity tileEntity, double var2, double var4, double var6, float var8)
public ResourceLocation getTexture(int block, int meta)
{
this.renderModelAt((TileEntityWire) tileEntity, var2, var4, var6, var8);
return copperWireTexture;
}
}

View file

@ -15,13 +15,6 @@ public abstract class RenderMachine extends TileEntitySpecialRenderer
}
@Override
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f)
{
// TODO Auto-generated method stub
}
/** Sudo method for setting the texture for current render
*
* @param name */

View file

@ -48,7 +48,7 @@ public class TileEntityInfLoad extends TileEntity implements IElectrical
@Override
public float getVoltage()
{
return 10000;
return 120;
}
}

View file

@ -15,6 +15,7 @@ public class TileEntityInfSupply extends TileEntityUniversalElectrical implement
if (!this.worldObj.isRemote)
{
System.out.println("Inf power supply cycle " + this.ticks);
this.produce();
}
}
@ -50,10 +51,15 @@ public class TileEntityInfSupply extends TileEntityUniversalElectrical implement
return Integer.MAX_VALUE;
}
@Override
public float getEnergyStored()
{
return Integer.MAX_VALUE;
}
@Override
public float getRequest(ForgeDirection direction)
{
// TODO Auto-generated method stub
return 0;
}

View file

@ -1,5 +1,6 @@
package dark.common.transmit;
import universalelectricity.prefab.block.BlockConductor;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
@ -10,12 +11,13 @@ import net.minecraftforge.common.Configuration;
import dark.core.DarkMain;
import dark.core.blocks.BlockMachine;
public class BlockWire extends BlockMachine
public class BlockWire extends BlockConductor
{
public BlockWire(Configuration config, int blockID)
{
super("DMWire", config, blockID, Material.cloth);
super(config.getBlock("DMWire", blockID).getInt(), Material.cloth);
this.setUnlocalizedName("DMWire");
this.setStepSound(soundClothFootstep);
this.setResistance(0.2F);
this.setHardness(0.1f);