chore: format Minecraft.Client

This commit is contained in:
Tropical
2026-03-13 17:10:10 -05:00
parent 33d0737d1d
commit e8424f2000
531 changed files with 67709 additions and 62690 deletions

View File

@@ -4,8 +4,8 @@
#include "../../../Minecraft.World/Util/Random.h"
#include "../../../Minecraft.World/Headers/net.minecraft.world.level.h"
LavaParticle::LavaParticle(Level *level, double x, double y, double z) : Particle(level, x, y, z, 0, 0, 0)
{
LavaParticle::LavaParticle(Level* level, double x, double y, double z)
: Particle(level, x, y, z, 0, 0, 0) {
xd *= 0.8f;
yd *= 0.8f;
zd *= 0.8f;
@@ -15,14 +15,13 @@ LavaParticle::LavaParticle(Level *level, double x, double y, double z) : Particl
size *= (random->nextFloat() * 2 + 0.2f);
oSize = size;
lifetime = (int) (16 / (Math::random() * 0.8 + 0.2));
lifetime = (int)(16 / (Math::random() * 0.8 + 0.2));
noPhysics = false;
setMiscTex(49);
}
// 4J - brought forward from 1.8.2
int LavaParticle::getLightColor(float a)
{
int LavaParticle::getLightColor(float a) {
float l = (age + a) / lifetime;
if (l < 0) l = 0;
if (l > 1) l = 1;
@@ -33,27 +32,24 @@ int LavaParticle::getLightColor(float a)
return br1 | br2 << 16;
}
float LavaParticle::getBrightness(float a)
{
return 1;
}
float LavaParticle::getBrightness(float a) { return 1; }
void LavaParticle::render(Tesselator *t, float a, float xa, float ya, float za, float xa2, float za2)
{
float s = (age + a) / (float) lifetime;
size = oSize * (1 - s*s);
void LavaParticle::render(Tesselator* t, float a, float xa, float ya, float za,
float xa2, float za2) {
float s = (age + a) / (float)lifetime;
size = oSize * (1 - s * s);
Particle::render(t, a, xa, ya, za, xa2, za2);
}
void LavaParticle::tick()
{
void LavaParticle::tick() {
xo = x;
yo = y;
zo = z;
if (age++ >= lifetime) remove();
float odds = age / (float) lifetime;
if (random->nextFloat() > odds) level->addParticle(eParticleType_smoke, x, y, z, xd, yd, zd);
float odds = age / (float)lifetime;
if (random->nextFloat() > odds)
level->addParticle(eParticleType_smoke, x, y, z, xd, yd, zd);
yd -= 0.03;
move(xd, yd, zd);
@@ -61,8 +57,7 @@ void LavaParticle::tick()
yd *= 0.999f;
zd *= 0.999f;
if (onGround)
{
if (onGround) {
xd *= 0.7f;
zd *= 0.7f;
}