mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-28 12:25:59 +00:00
Proper Reformating
This commit is contained in:
1 parent
ce75880aba
commit
180d257024
1179 files changed
+59847
-61583
No files matched your search
@@ -8,7 +8,7 @@ import noppes.npcs.entity.EntityCustomNpc;
|
||||
import noppes.npcs.entity.data.ModelPartData;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class EntityEnderFX extends EntityPortalFX{
|
||||
public class EntityEnderFX extends EntityPortalFX {
|
||||
|
||||
private float portalParticleScale;
|
||||
private int particleNumber;
|
||||
@@ -18,57 +18,56 @@ public class EntityEnderFX extends EntityPortalFX{
|
||||
private boolean move = true;
|
||||
private float startX = 0, startY = 0, startZ = 0;
|
||||
|
||||
public EntityEnderFX(EntityCustomNpc npc, double par2, double par4,
|
||||
double par6, double par8, double par10, double par12, ModelPartData data) {
|
||||
super(npc.worldObj, par2, par4, par6, par8, par10, par12);
|
||||
public EntityEnderFX(EntityCustomNpc npc, double par2, double par4,
|
||||
double par6, double par8, double par10, double par12, ModelPartData data) {
|
||||
super(npc.worldObj, par2, par4, par6, par8, par10, par12);
|
||||
|
||||
this.npc = npc;
|
||||
particleNumber = npc.getRNG().nextInt(2);
|
||||
this.npc = npc;
|
||||
particleNumber = npc.getRNG().nextInt(2);
|
||||
portalParticleScale = particleScale = rand.nextFloat() * 0.2F + 0.5F;
|
||||
|
||||
particleRed = (data.color >> 16 & 255) / 255f;
|
||||
particleGreen = (data.color >> 8 & 255) / 255f;
|
||||
particleGreen = (data.color >> 8 & 255) / 255f;
|
||||
particleBlue = (data.color & 255) / 255f;
|
||||
|
||||
if(npc.getRNG().nextInt(3) == 1){
|
||||
move = false;
|
||||
if (npc.getRNG().nextInt(3) == 1) {
|
||||
move = false;
|
||||
this.startX = (float) npc.posX;
|
||||
this.startY = (float) npc.posY;
|
||||
this.startZ = (float) npc.posZ;
|
||||
}
|
||||
|
||||
if(data.playerTexture)
|
||||
location = npc.textureLocation;
|
||||
if (data.playerTexture)
|
||||
location = npc.textureLocation;
|
||||
else
|
||||
location = new ResourceLocation(data.texture);
|
||||
}
|
||||
location = new ResourceLocation(data.texture);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
if(move){
|
||||
startX = (float)(npc.prevPosX + (npc.posX - npc.prevPosX) * (double)par2);
|
||||
startY = (float)(npc.prevPosY + (npc.posY - npc.prevPosY) * (double)par2);
|
||||
startZ = (float)(npc.prevPosZ + (npc.posZ - npc.prevPosZ) * (double)par2);
|
||||
}
|
||||
@Override
|
||||
public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7) {
|
||||
if (move) {
|
||||
startX = (float) (npc.prevPosX + (npc.posX - npc.prevPosX) * (double) par2);
|
||||
startY = (float) (npc.prevPosY + (npc.posY - npc.prevPosY) * (double) par2);
|
||||
startZ = (float) (npc.prevPosZ + (npc.posZ - npc.prevPosZ) * (double) par2);
|
||||
}
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.draw();
|
||||
float scale = ((float)particleAge + par2) / (float)particleMaxAge;
|
||||
float scale = ((float) particleAge + par2) / (float) particleMaxAge;
|
||||
scale = 1.0F - scale;
|
||||
scale *= scale;
|
||||
scale = 1.0F - scale;
|
||||
particleScale = portalParticleScale * scale;
|
||||
|
||||
ClientProxy.bindTexture(location);
|
||||
ClientProxy.bindTexture(location);
|
||||
|
||||
float f = 0.875f;
|
||||
float f1 = f + 0.125f;
|
||||
float f2 = 0.75f - (particleNumber * 0.25f);
|
||||
float f3 = f2 + 0.25f;
|
||||
float f4 = 0.1F * particleScale;
|
||||
float f5 = (float)(((prevPosX + (posX - prevPosX) * (double)par2) - interpPosX) + startX);
|
||||
float f6 = (float)(((prevPosY + (posY - prevPosY) * (double)par2) - interpPosY) + startY);
|
||||
float f7 = (float)(((prevPosZ + (posZ - prevPosZ) * (double)par2) - interpPosZ) + startZ);
|
||||
float f5 = (float) (((prevPosX + (posX - prevPosX) * (double) par2) - interpPosX) + startX);
|
||||
float f6 = (float) (((prevPosY + (posY - prevPosY) * (double) par2) - interpPosY) + startY);
|
||||
float f7 = (float) (((prevPosZ + (posZ - prevPosZ) * (double) par2) - interpPosZ) + startZ);
|
||||
|
||||
GL11.glColor4f(1, 1, 1, 1.0F);
|
||||
tessellator.startDrawingQuads();
|
||||
@@ -85,7 +84,7 @@ public class EntityEnderFX extends EntityPortalFX{
|
||||
tessellator.startDrawingQuads();
|
||||
}
|
||||
|
||||
public int getFXLayer(){
|
||||
return 0;
|
||||
public int getFXLayer() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user