Code style changes, entities fixes
This commit is contained in:
parent
9d604b2d25
commit
44962e18b6
377 changed files with 5038 additions and 4914 deletions
|
@ -19,18 +19,18 @@ import ru.betterend.registry.EndBlocks;
|
|||
@Environment(EnvType.CLIENT)
|
||||
public class ParticleTenaneaPetal extends TextureSheetParticle {
|
||||
private static BlockColor provider;
|
||||
|
||||
|
||||
private double preVX;
|
||||
private double preVY;
|
||||
private double preVZ;
|
||||
private double nextVX;
|
||||
private double nextVY;
|
||||
private double nextVZ;
|
||||
|
||||
|
||||
protected ParticleTenaneaPetal(ClientLevel world, double x, double y, double z, double r, double g, double b, SpriteSet sprites) {
|
||||
super(world, x, y, z, r, g, b);
|
||||
pickSprite(sprites);
|
||||
|
||||
|
||||
if (provider == null) {
|
||||
IColorProvider block = (IColorProvider) EndBlocks.TENANEA_FLOWERS;
|
||||
provider = block.getProvider();
|
||||
|
@ -39,15 +39,15 @@ public class ParticleTenaneaPetal extends TextureSheetParticle {
|
|||
this.rCol = ((color >> 16) & 255) / 255F;
|
||||
this.gCol = ((color >> 8) & 255) / 255F;
|
||||
this.bCol = ((color) & 255) / 255F;
|
||||
|
||||
|
||||
this.lifetime = MHelper.randRange(120, 200, random);
|
||||
this.quadSize = MHelper.randRange(0.05F, 0.15F, random);
|
||||
this.setAlpha(0);
|
||||
|
||||
|
||||
preVX = 0;
|
||||
preVY = 0;
|
||||
preVZ = 0;
|
||||
|
||||
|
||||
nextVX = random.nextGaussian() * 0.02;
|
||||
nextVY = -random.nextDouble() * 0.02 - 0.02;
|
||||
nextVZ = random.nextGaussian() * 0.02;
|
||||
|
@ -57,7 +57,7 @@ public class ParticleTenaneaPetal extends TextureSheetParticle {
|
|||
public int getLightColor(float tint) {
|
||||
return 15728880;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
int ticks = this.age & 63;
|
||||
|
@ -70,25 +70,25 @@ public class ParticleTenaneaPetal extends TextureSheetParticle {
|
|||
nextVZ = random.nextGaussian() * 0.02;
|
||||
}
|
||||
double delta = (double) ticks / 63.0;
|
||||
|
||||
|
||||
if (this.age <= 40) {
|
||||
this.setAlpha(this.age / 40F);
|
||||
}
|
||||
else if (this.age >= this.lifetime - 40) {
|
||||
this.setAlpha((this.lifetime - this.age) / 40F);
|
||||
}
|
||||
|
||||
|
||||
if (this.age >= this.lifetime) {
|
||||
this.remove();
|
||||
}
|
||||
|
||||
|
||||
this.xd = Mth.lerp(delta, preVX, nextVX);
|
||||
this.yd = Mth.lerp(delta, preVY, nextVY);
|
||||
this.zd = Mth.lerp(delta, preVZ, nextVZ);
|
||||
|
||||
|
||||
super.tick();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ParticleRenderType getRenderType() {
|
||||
return ParticleRenderType.PARTICLE_SHEET_TRANSLUCENT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue