* Add proper firework rendering

This commit is contained in:
iProgramInCpp
2023-12-31 15:14:56 +02:00
parent 90bd2935d4
commit bcd63f43f5
6 changed files with 85 additions and 7 deletions

View File

@@ -0,0 +1,44 @@
/********************************************************************
Minecraft: Pocket Edition - Decompilation Project
Copyright (C) 2023 iProgramInCpp
The following code is licensed under the BSD 1 clause license.
SPDX-License-Identifier: BSD-1-Clause
********************************************************************/
#include "RocketRenderer.hpp"
#include "client/app/Minecraft.hpp"
RocketRenderer::RocketRenderer() :
m_tile()
{
field_4 = 0.5f;
}
void RocketRenderer::render(Entity* entity, float x, float y, float z, float a, float b)
{
glPushMatrix();
glTranslatef(x, y, z);
Tesselator& t = Tesselator::instance;
t.color(1.0f, 1.0f, 1.0f);
float brightness = entity->getBrightness(1.0f);
bindTexture("gui/items.png");
t.begin();
m_renderer.renderTile(&m_tile, 0, brightness);
t.draw();
glPopMatrix();
}
FakeRocketTile::FakeRocketTile() : Tile(0, 16*2+14, Material::plant)
{
}
int FakeRocketTile::getRenderShape()
{
return SHAPE_CROSS;
}