First update pass (1/3) - ~1400 -> 82 errors
This is first update pass, which is mainly import reorganization, name fixes, etc... Although some parts of second were done where changes aren't important. Errors: ~1400 -> 82.
This commit is contained in:
@@ -19,8 +19,8 @@
|
||||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -30,7 +30,7 @@ import appeng.core.CommonHelper;
|
||||
import appeng.entity.EntityFloatingItem;
|
||||
|
||||
|
||||
public class AssemblerFX extends EntityFX
|
||||
public class AssemblerFX extends Particle
|
||||
{
|
||||
|
||||
private final EntityFloatingItem fi;
|
||||
@@ -47,6 +47,7 @@ public class AssemblerFX extends EntityFX
|
||||
this.fi = new EntityFloatingItem( this, w, x, y, z, is.getItemStack() );
|
||||
w.spawnEntityInWorld( this.fi );
|
||||
this.particleMaxAge = (int) Math.ceil( Math.max( 1, 100.0f / speed ) ) + 2;
|
||||
//TODO 1.9.4 - noClip => ?
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
@@ -62,7 +63,7 @@ public class AssemblerFX extends EntityFX
|
||||
{
|
||||
super.onUpdate();
|
||||
|
||||
if( this.isDead )
|
||||
if( this.isExpired )
|
||||
{
|
||||
this.fi.setDead();
|
||||
}
|
||||
@@ -74,7 +75,7 @@ public class AssemblerFX extends EntityFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
|
||||
public void renderParticle( final VertexBuffer par1Tessellator, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
|
||||
{
|
||||
this.time += l;
|
||||
if( this.time > 4.0 )
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityReddustFX;
|
||||
import net.minecraft.client.particle.ParticleRedstone;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
public class ChargedOreFX extends EntityReddustFX
|
||||
public class ChargedOreFX extends ParticleRedstone
|
||||
{
|
||||
|
||||
public ChargedOreFX( final World w, final double x, final double y, final double z, final float r, final float g, final float b )
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityBreakingFX;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.particle.ParticleBreaking;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -34,7 +34,7 @@ import appeng.client.texture.ExtraBlockTextures;
|
||||
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public class CraftingFx extends EntityBreakingFX
|
||||
public class CraftingFx extends ParticleBreaking
|
||||
{
|
||||
|
||||
private final TextureAtlasSprite particleTextureIndex;
|
||||
@@ -59,6 +59,7 @@ public class CraftingFx extends EntityBreakingFX
|
||||
this.startBlkY = MathHelper.floor_double( this.posY );
|
||||
this.startBlkZ = MathHelper.floor_double( this.posZ );
|
||||
|
||||
//TODO 1.9.4 - noClip => ?
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
@@ -69,7 +70,7 @@ public class CraftingFx extends EntityBreakingFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float partialTick, final float x, final float y, final float z, final float rx, final float rz )
|
||||
public void renderParticle( final VertexBuffer par1Tessellator, final Entity p_180434_2_, final float partialTick, final float x, final float y, final float z, final float rx, final float rz )
|
||||
{
|
||||
if( partialTick < 0 || partialTick > 1 )
|
||||
{
|
||||
@@ -119,4 +120,19 @@ public class CraftingFx extends EntityBreakingFX
|
||||
this.particleScale *= 0.51f;
|
||||
this.particleAlpha *= 0.51f;
|
||||
}
|
||||
|
||||
public void setMotionX( float motionX )
|
||||
{
|
||||
this.motionX = motionX;
|
||||
}
|
||||
|
||||
public void setMotionY( float motionY )
|
||||
{
|
||||
this.motionY = motionY;
|
||||
}
|
||||
|
||||
public void setMotionZ( float motionZ )
|
||||
{
|
||||
this.motionZ = motionZ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityBreakingFX;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.particle.ParticleBreaking;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -34,7 +34,7 @@ import appeng.client.texture.ExtraBlockTextures;
|
||||
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public class EnergyFx extends EntityBreakingFX
|
||||
public class EnergyFx extends ParticleBreaking
|
||||
{
|
||||
|
||||
private final TextureAtlasSprite particleTextureIndex;
|
||||
@@ -58,6 +58,7 @@ public class EnergyFx extends EntityBreakingFX
|
||||
this.startBlkY = MathHelper.floor_double( this.posY );
|
||||
this.startBlkZ = MathHelper.floor_double( this.posZ );
|
||||
|
||||
//TODO 1.9.4 - noClip => ?
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
@@ -68,7 +69,7 @@ public class EnergyFx extends EntityBreakingFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7 )
|
||||
public void renderParticle( final VertexBuffer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7 )
|
||||
{
|
||||
final float f6 = this.particleTextureIndex.getMinU();
|
||||
final float f7 = this.particleTextureIndex.getMaxU();
|
||||
@@ -109,4 +110,19 @@ public class EnergyFx extends EntityBreakingFX
|
||||
this.particleScale *= 0.89f;
|
||||
this.particleAlpha *= 0.89f;
|
||||
}
|
||||
|
||||
public void setMotionX( float motionX )
|
||||
{
|
||||
this.motionX = motionX;
|
||||
}
|
||||
|
||||
public void setMotionY( float motionY )
|
||||
{
|
||||
this.motionY = motionY;
|
||||
}
|
||||
|
||||
public void setMotionZ( float motionZ )
|
||||
{
|
||||
this.motionZ = motionZ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ public class LightningArcFX extends LightningFX
|
||||
public LightningArcFX( final World w, final double x, final double y, final double z, final double ex, final double ey, final double ez, final double r, final double g, final double b )
|
||||
{
|
||||
super( w, x, y, z, r, g, b, 6 );
|
||||
//TODO 1.9.4 - noClip => ?
|
||||
this.noClip = true;
|
||||
|
||||
this.rx = ex - x;
|
||||
|
||||
@@ -22,15 +22,15 @@ package appeng.client.render.effects;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
public class LightningFX extends EntityFX
|
||||
public class LightningFX extends Particle
|
||||
{
|
||||
|
||||
private static final Random RANDOM_GENERATOR = new Random();
|
||||
@@ -55,6 +55,7 @@ public class LightningFX extends EntityFX
|
||||
this.motionY = 0;
|
||||
this.motionZ = 0;
|
||||
this.particleMaxAge = maxAge;
|
||||
//TODO 1.9.4 - noClip => ?
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
@@ -84,7 +85,7 @@ public class LightningFX extends EntityFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle( final WorldRenderer tess, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
|
||||
public void renderParticle( final VertexBuffer tess, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
|
||||
{
|
||||
final float j = 1.0f;
|
||||
float red = this.particleRed * j * 0.9f;
|
||||
@@ -210,7 +211,7 @@ public class LightningFX extends EntityFX
|
||||
this.hasData = false;
|
||||
}
|
||||
|
||||
private void draw( float red, float green, float blue, final WorldRenderer tess, final double[] a, final double[] b, final double f6, final double f8 )
|
||||
private void draw( float red, float green, float blue, final VertexBuffer tess, final double[] a, final double[] b, final double f6, final double f8 )
|
||||
{
|
||||
if( this.hasData )
|
||||
{
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityBreakingFX;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.particle.ParticleBreaking;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -30,7 +30,7 @@ import appeng.api.util.AEPartLocation;
|
||||
import appeng.client.texture.ExtraBlockTextures;
|
||||
|
||||
|
||||
public class MatterCannonFX extends EntityBreakingFX
|
||||
public class MatterCannonFX extends ParticleBreaking
|
||||
{
|
||||
|
||||
private final TextureAtlasSprite particleTextureIndex;
|
||||
@@ -48,6 +48,7 @@ public class MatterCannonFX extends EntityBreakingFX
|
||||
this.motionY = 0.0f;
|
||||
this.motionZ = 0.0f;
|
||||
this.particleTextureIndex = ExtraBlockTextures.BlockMatterCannonParticle.getIcon().getAtlas();
|
||||
//TODO 1.9.4 - noClip => ?
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
@@ -71,7 +72,7 @@ public class MatterCannonFX extends EntityBreakingFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7 )
|
||||
public void renderParticle( final VertexBuffer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7 )
|
||||
{
|
||||
final float f6 = this.particleTextureIndex.getMinU();
|
||||
final float f7 = this.particleTextureIndex.getMaxU();
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public class VibrantFX extends EntityFX
|
||||
public class VibrantFX extends Particle
|
||||
{
|
||||
|
||||
public VibrantFX( final World par1World, final double x, final double y, final double z, final double par8, final double par10, final double par12 )
|
||||
@@ -46,13 +46,14 @@ public class VibrantFX extends EntityFX
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
this.particleMaxAge = (int) ( 20.0D / ( Math.random() * 0.8D + 0.1D ) );
|
||||
//TODO 1.9.4 - noClip => ?
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getBrightness( final float par1 )
|
||||
public int getBrightnessForRender( final float par1 )
|
||||
{
|
||||
return 1.0f;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,7 +70,7 @@ public class VibrantFX extends EntityFX
|
||||
|
||||
if( this.particleMaxAge <= 0 || this.particleScale < 0.1 )
|
||||
{
|
||||
this.setDead();
|
||||
this.setExpired();
|
||||
}
|
||||
this.particleMaxAge--;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user