mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-17 20:10:23 +03:00
* Bring back the cube shading, but with fixed lighting.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
#include "Minecraft.hpp"
|
||||
|
||||
TripodCameraRenderer::TripodCameraRenderer() :
|
||||
m_tile(0, 243, Material::plant),
|
||||
m_tile(),
|
||||
m_cube(0, 0)
|
||||
{
|
||||
m_cube.addBox(-4.0f, -4.0f, -6.0f, 8, 8, 10);
|
||||
@@ -36,12 +36,16 @@ void TripodCameraRenderer::render(Entity* entity, float x, float y, float z, flo
|
||||
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.tesselateCrossTexture(&m_tile, 0, -0.5f, -0.5f, -0.5f);
|
||||
//m_renderer.tesselateCrossTexture(&m_tile, 0, -0.5f, -0.5f, -0.5f);
|
||||
m_renderer.renderTile(&m_tile, 0, brightness);
|
||||
t.draw();
|
||||
|
||||
bindTexture("item/camera.png");
|
||||
m_cube.setBrightness(brightness);
|
||||
m_cube.render(0.0625f);
|
||||
|
||||
Entity* pHREntity = m_pDispatcher->m_pMinecraft->m_hitResult.m_pEnt;
|
||||
@@ -68,3 +72,12 @@ void TripodCameraRenderer::render(Entity* entity, float x, float y, float z, flo
|
||||
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
TripodTile::TripodTile() : Tile(0, 243, Material::plant)
|
||||
{
|
||||
}
|
||||
|
||||
int TripodTile::getRenderShape()
|
||||
{
|
||||
return SHAPE_CROSS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user