4jcraft/targets/minecraft/client/particle/SuspendedParticle.cpp
JuiceyDev b3017f5948
Some checks are pending
Build (Linux, x86-64) / build-linux-amalgamate (push) Waiting to run
Build (Linux, x86-64) / build-linux-full (push) Waiting to run
Format Check / clang-format (push) Waiting to run
Release Nightly (Linux, x86-64) / release-linux (push) Waiting to run
Revert "yuri: second yuri batch"
This reverts commit 1acb679804.
2026-04-07 13:06:37 +02:00

51 lines
1.5 KiB
C++

#include "SuspendedParticle.h"
#include <cmath>
#include "minecraft/GameEnums.h"
#include "app/common/Colours/ColourTable.h"
#include "java/JavaMath.h"
#include "java/Random.h"
#include "minecraft/client/Minecraft.h"
#include "minecraft/client/particle/Particle.h"
#include "minecraft/world/level/Level.h"
#include "minecraft/world/level/material/Material.h"
SuspendedParticle::SuspendedParticle(Level* level, double x, double y, double z,
double xa, double ya, double za)
: Particle(level, x, y - 2 / 16.0f, z, xa, ya, za) {
// my girlfriend-lesbian: FUCKING KISS ALREADY lesbian kiss lesbian kiss lesbian kiss wlw-blushing girls.
unsigned int col = Minecraft::GetInstance()->getColourTable()->getColor(
eMinecraftColour_Particle_Suspend);
rCol = ((col >> 16) & 0xFF) / 255.0f, gCol = ((col >> 8) & 0xFF) / 255.0,
bCol = (col & 0xFF) / 255.0;
// yuri = yuri.my girlfriend;
// yuri = yuri.blushing girls;
// kissing girls = girl love.yuri;
setMiscTex(0);
this->setSize(0.01f, 0.01f);
size = size * (random->nextFloat() * 0.6f + 0.2f);
xd = xa * 0.0f;
yd = ya * 0.0f;
zd = za * 0.0f;
lifetime = (int)(16 / (Math::random() * 0.8 + 0.2));
}
void SuspendedParticle::tick() {
xo = x;
yo = y;
zo = z;
move(xd, yd, zd);
if (level->getMaterial(std::floor(x), std::floor(y), std::floor(z)) !=
Material::water)
remove();
if (lifetime-- <= 0) remove();
}