mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-25 14:44:35 +00:00
[ci skip] spotlessApply with the new settings
This commit is contained in:
1 parent
a314fccd1b
commit
8f026dad8f
161 files changed
+14073
-12846
No files matched your search
@@ -1,60 +1,59 @@
|
||||
package team.chisel.entity.fx;
|
||||
|
||||
import team.chisel.block.BlockGrimstone;
|
||||
import team.chisel.utils.General;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import team.chisel.block.BlockGrimstone;
|
||||
import team.chisel.utils.General;
|
||||
|
||||
public class EntityGrimstoneFX extends EntityFX {
|
||||
|
||||
float initialScale;
|
||||
float angleOffset;
|
||||
static final float fadetime = 20f;
|
||||
float initialScale;
|
||||
float angleOffset;
|
||||
static final float fadetime = 20f;
|
||||
|
||||
public EntityGrimstoneFX(World world, BlockGrimstone block, double x, double y, double z) {
|
||||
super(world, x, y, z, 0, 0, 0);
|
||||
public EntityGrimstoneFX(World world, BlockGrimstone block, double x, double y, double z) {
|
||||
super(world, x, y, z, 0, 0, 0);
|
||||
|
||||
initialScale = 1.0f + 1.0f * General.rand.nextFloat();
|
||||
angleOffset = rand.nextFloat() * 360;
|
||||
initialScale = 1.0f + 1.0f * General.rand.nextFloat();
|
||||
angleOffset = rand.nextFloat() * 360;
|
||||
|
||||
particleMaxAge = (int) (Math.random() * 10.0D) + 80;
|
||||
particleMaxAge = (int) (Math.random() * 10.0D) + 80;
|
||||
|
||||
setPosition(x, y, z);
|
||||
prevPosX = posX;
|
||||
prevPosY = posY;
|
||||
prevPosZ = posZ;
|
||||
setPosition(x, y, z);
|
||||
prevPosX = posX;
|
||||
prevPosY = posY;
|
||||
prevPosZ = posZ;
|
||||
|
||||
noClip = true;
|
||||
noClip = true;
|
||||
|
||||
setParticleIcon(block.iconStar);
|
||||
}
|
||||
setParticleIcon(block.iconStar);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFXLayer() {
|
||||
return 1;
|
||||
}
|
||||
@Override
|
||||
public int getFXLayer() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(Tessellator tessellator, float partialTick, float rotX, float rotXZ, float rotZ, float rotYZ, float rotXY) {
|
||||
particleScale = 0.25f + initialScale * (float) Math.sin((particleAge + angleOffset) / 180.f);
|
||||
@Override
|
||||
public void renderParticle(Tessellator tessellator, float partialTick, float rotX, float rotXZ, float rotZ,
|
||||
float rotYZ, float rotXY) {
|
||||
particleScale = 0.25f + initialScale * (float) Math.sin((particleAge + angleOffset) / 180.f);
|
||||
|
||||
if (particleAge < fadetime)
|
||||
particleAlpha = particleAge / fadetime;
|
||||
else if (particleAge + fadetime >= particleMaxAge)
|
||||
particleAlpha = (particleMaxAge - particleAge) / fadetime;
|
||||
else
|
||||
particleAlpha = 1.0f;
|
||||
if (particleAge < fadetime) particleAlpha = particleAge / fadetime;
|
||||
else if (particleAge + fadetime >= particleMaxAge) particleAlpha = (particleMaxAge - particleAge) / fadetime;
|
||||
else particleAlpha = 1.0f;
|
||||
|
||||
super.renderParticle(tessellator, partialTick, rotX, rotXZ, rotZ, rotYZ, rotXY);
|
||||
super.renderParticle(tessellator, partialTick, rotX, rotXZ, rotZ, rotYZ, rotXY);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
if (particleAge++ >= particleMaxAge) {
|
||||
setDead();
|
||||
}
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
if (particleAge++ >= particleMaxAge) {
|
||||
setDead();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user