This commit is contained in:
AlgorithmX2 2014-08-27 00:01:59 -05:00
commit 59925c9145
10 changed files with 41 additions and 58 deletions

View file

@ -336,7 +336,8 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
@Override @Override
public void onNeighborChange(IBlockAccess w, int x, int y, int z, int tileX, int tileY, int tileZ) public void onNeighborChange(IBlockAccess w, int x, int y, int z, int tileX, int tileY, int tileZ)
{ {
cb( w, x, y, z ).onNeighborChanged(); if ( Platform.isServer() )
cb( w, x, y, z ).onNeighborChanged();
} }
@Override @Override

View file

@ -57,47 +57,42 @@ public class CraftingFx extends EntityBreakingFX
this.particleAlpha *= 0.51f; this.particleAlpha *= 0.51f;
} }
public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7) public void renderParticle(Tessellator par1Tessellator, float partialTick, float x, float y, float z, float rx, float rz)
{ {
/* if ( partialTick < 0 || partialTick > 1 )
* Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.locationBlocksTexture ); return;
*
* GL11.glPushMatrix(); GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS ); GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
*
* GL11.glDepthMask( false ); GL11.glEnable( GL11.GL_BLEND ); GL11.glBlendFunc( GL11.GL_SRC_ALPHA,
* GL11.GL_ONE_MINUS_SRC_ALPHA ); GL11.glAlphaFunc( GL11.GL_GREATER, 0.003921569F );
*/
float f6 = this.particleTextureIndex.getMinU(); float f6 = this.particleTextureIndex.getMinU();
float f7 = this.particleTextureIndex.getMaxU(); float f7 = this.particleTextureIndex.getMaxU();
float f8 = this.particleTextureIndex.getMinV(); float f8 = this.particleTextureIndex.getMinV();
float f9 = this.particleTextureIndex.getMaxV(); float f9 = this.particleTextureIndex.getMaxV();
float f10 = 0.1F * this.particleScale; float scale = 0.1F * this.particleScale;
float f11 = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX); float offx = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) partialTick);
float f12 = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY); float offy = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) partialTick);
float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ); float offz = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) partialTick);
float f14 = 1.0F; float f14 = 1.0F;
int blkX = MathHelper.floor_double( posX ); int blkX = MathHelper.floor_double( offx );
int blkY = MathHelper.floor_double( posY ); int blkY = MathHelper.floor_double( offy );
int blkZ = MathHelper.floor_double( posZ ); int blkZ = MathHelper.floor_double( offz );
if ( blkX == startBlkX && blkY == startBlkY && blkZ == startBlkZ ) if ( blkX == startBlkX && blkY == startBlkY && blkZ == startBlkZ )
{ {
offx -= interpPosX;
offy -= interpPosY;
offz -= interpPosZ;
// AELog.info( "" + partialTick );
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ); par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha );
par1Tessellator.addVertexWithUV( (double) (f11 - par3 * f10 - par6 * f10), (double) (f12 - par4 * f10), (double) (f13 - par5 * f10 - par7 * f10), par1Tessellator.addVertexWithUV( (double) (offx - x * scale - rx * scale), (double) (offy - y * scale), (double) (offz - z * scale - rz * scale),
(double) f7, (double) f9 ); (double) f7, (double) f9 );
par1Tessellator.addVertexWithUV( (double) (f11 - par3 * f10 + par6 * f10), (double) (f12 + par4 * f10), (double) (f13 - par5 * f10 + par7 * f10), par1Tessellator.addVertexWithUV( (double) (offx - x * scale + rx * scale), (double) (offy + y * scale), (double) (offz - z * scale + rz * scale),
(double) f7, (double) f8 ); (double) f7, (double) f8 );
par1Tessellator.addVertexWithUV( (double) (f11 + par3 * f10 + par6 * f10), (double) (f12 + par4 * f10), (double) (f13 + par5 * f10 + par7 * f10), par1Tessellator.addVertexWithUV( (double) (offx + x * scale + rx * scale), (double) (offy + y * scale), (double) (offz + z * scale + rz * scale),
(double) f6, (double) f8 ); (double) f6, (double) f8 );
par1Tessellator.addVertexWithUV( (double) (f11 + par3 * f10 - par6 * f10), (double) (f12 - par4 * f10), (double) (f13 + par5 * f10 - par7 * f10), par1Tessellator.addVertexWithUV( (double) (offx + x * scale - rx * scale), (double) (offy - y * scale), (double) (offz + z * scale - rz * scale),
(double) f6, (double) f9 ); (double) f6, (double) f9 );
} }
// GL11.glPopAttrib();
// GL11.glPopMatrix();
} }
} }

View file

@ -58,15 +58,6 @@ public class EnergyFx extends EntityBreakingFX
public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7) public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
{ {
/*
* Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.locationBlocksTexture );
*
* GL11.glPushMatrix(); GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS ); GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
*
* GL11.glDepthMask( false ); GL11.glEnable( GL11.GL_BLEND ); GL11.glBlendFunc( GL11.GL_SRC_ALPHA,
* GL11.GL_ONE_MINUS_SRC_ALPHA ); GL11.glAlphaFunc( GL11.GL_GREATER, 0.003921569F );
*/
float f6 = this.particleTextureIndex.getMinU(); float f6 = this.particleTextureIndex.getMinU();
float f7 = this.particleTextureIndex.getMaxU(); float f7 = this.particleTextureIndex.getMaxU();
float f8 = this.particleTextureIndex.getMinV(); float f8 = this.particleTextureIndex.getMinV();
@ -94,9 +85,6 @@ public class EnergyFx extends EntityBreakingFX
par1Tessellator.addVertexWithUV( (double) (f11 + par3 * f10 - par6 * f10), (double) (f12 - par4 * f10), (double) (f13 + par5 * f10 - par7 * f10), par1Tessellator.addVertexWithUV( (double) (f11 + par3 * f10 - par6 * f10), (double) (f12 - par4 * f10), (double) (f13 + par5 * f10 - par7 * f10),
(double) f6, (double) f9 ); (double) f6, (double) f9 );
} }
// GL11.glPopAttrib();
// GL11.glPopMatrix();
} }
} }

View file

@ -9,8 +9,6 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
import net.minecraft.world.World; import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
public class LightningFX extends EntityFX public class LightningFX extends EntityFX
{ {
@ -167,12 +165,10 @@ public class LightningFX extends EntityFX
} }
} }
} }
/*
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS ); * GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS ); GL11.glDisable( GL11.GL_CULL_FACE ); tess.draw();
GL11.glDisable( GL11.GL_CULL_FACE ); * GL11.glPopAttrib(); tess.startDrawingQuads();
tess.draw(); */
GL11.glPopAttrib();
tess.startDrawingQuads();
} }
boolean hasData = false; boolean hasData = false;

View file

@ -1,9 +1,7 @@
package appeng.client.render.effects; package appeng.client.render.effects;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityBreakingFX; import net.minecraft.client.particle.EntityBreakingFX;
import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraft.world.World; import net.minecraft.world.World;
@ -42,11 +40,15 @@ public class MatterCannonFX extends EntityBreakingFX
this.particleAlpha *= 0.59f; this.particleAlpha *= 0.59f;
} }
@Override
public int getFXLayer()
{
return 1;
}
@Override @Override
public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7) public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
{ {
Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.locationBlocksTexture );
float f6 = this.particleTextureIndex.getMinU(); float f6 = this.particleTextureIndex.getMinU();
float f7 = this.particleTextureIndex.getMaxU(); float f7 = this.particleTextureIndex.getMaxU();
float f8 = this.particleTextureIndex.getMinV(); float f8 = this.particleTextureIndex.getMinV();

View file

@ -147,6 +147,7 @@ public class NEIFacadeRecipeHandler extends TemplateRecipeHandler
public PositionedStack result; public PositionedStack result;
public CachedShapedRecipe(ItemStack output) { public CachedShapedRecipe(ItemStack output) {
output.stackSize = 4;
result = new PositionedStack( output, 119, 24 ); result = new PositionedStack( output, 119, 24 );
ingredients = new ArrayList<PositionedStack>(); ingredients = new ArrayList<PositionedStack>();
ItemStack in = ifa.getTextureItem( output ); ItemStack in = ifa.getTextureItem( output );

View file

@ -211,7 +211,10 @@ public class PartMonitor extends AEBasePart implements IPartMonitor, IPowerChann
super( c, is ); super( c, is );
if ( requireChannel ) if ( requireChannel )
{
proxy.setFlags( GridFlags.REQUIRE_CHANNEL ); proxy.setFlags( GridFlags.REQUIRE_CHANNEL );
proxy.setIdlePowerUsage( 1.0 / 2.0 );
}
else else
proxy.setIdlePowerUsage( 1.0 / 16.0 ); // lights drain a little bit. proxy.setIdlePowerUsage( 1.0 / 16.0 ); // lights drain a little bit.

View file

@ -248,6 +248,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IAEAppEn
public TileMolecularAssembler() { public TileMolecularAssembler() {
settings.registerSetting( Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE ); settings.registerSetting( Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE );
inv.setMaxStackSize( 1 ); inv.setMaxStackSize( 1 );
gridProxy.setIdlePowerUsage( 0.0 );
addNewHandler( new TileMolecularAssemblerHandler() ); addNewHandler( new TileMolecularAssemblerHandler() );
} }
@ -399,7 +400,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IAEAppEn
if ( reboot ) if ( reboot )
TicksSinceLastCall = 1; TicksSinceLastCall = 1;
if ( ! isAwake ) if ( !isAwake )
return TickRateModulation.SLEEP; return TickRateModulation.SLEEP;
reboot = false; reboot = false;
@ -479,7 +480,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IAEAppEn
ItemStack is = inv.getStackInSlot( x ); ItemStack is = inv.getStackInSlot( x );
if ( is != null ) if ( is != null )
{ {
if ( myPlan == null || ! myPlan.isValidItemForSlot( x, is, worldObj ) ) if ( myPlan == null || !myPlan.isValidItemForSlot( x, is, worldObj ) )
{ {
inv.setInventorySlotContents( 9, is ); inv.setInventorySlotContents( 9, is );
inv.setInventorySlotContents( x, null ); inv.setInventorySlotContents( x, null );

View file

@ -242,16 +242,12 @@ public class TileSecurity extends AENetworkTile implements ITerminalHost, IAEApp
return isActive && gridProxy.isActive(); return isActive && gridProxy.isActive();
} }
public void updateNodeCount(int nodes)
{
gridProxy.setIdlePowerUsage( 2.0 + ((double) nodes / 0.033) );
}
public TileSecurity() { public TileSecurity() {
addNewHandler( new SecurityHandler() ); addNewHandler( new SecurityHandler() );
gridProxy.setFlags( GridFlags.REQUIRE_CHANNEL ); gridProxy.setFlags( GridFlags.REQUIRE_CHANNEL );
gridProxy.setIdlePowerUsage( 2.0 ); gridProxy.setIdlePowerUsage( 2.0 );
diffrence++; diffrence++;
securityKey = System.currentTimeMillis() * 10 + diffrence; securityKey = System.currentTimeMillis() * 10 + diffrence;
if ( diffrence > 10 ) if ( diffrence > 10 )
diffrence = 0; diffrence = 0;

View file

@ -28,7 +28,7 @@ public class TileController extends AENetworkPowerTile implements IAEPowerStorag
public TileController() { public TileController() {
internalMaxPower = 8000; internalMaxPower = 8000;
internalPublicPowerStorage = true; internalPublicPowerStorage = true;
gridProxy.setIdlePowerUsage( 6 ); gridProxy.setIdlePowerUsage( 3 );
gridProxy.setFlags( GridFlags.CANNOT_CARRY, GridFlags.DENSE_CAPACITY ); gridProxy.setFlags( GridFlags.CANNOT_CARRY, GridFlags.DENSE_CAPACITY );
} }