2026-03-01 12:16:08 +08:00
|
|
|
#pragma once
|
|
|
|
|
#include "EntityRenderer.h"
|
|
|
|
|
|
|
|
|
|
class Painting;
|
|
|
|
|
class Random;
|
|
|
|
|
|
|
|
|
|
class PaintingRenderer : public EntityRenderer
|
|
|
|
|
{
|
|
|
|
|
private:
|
|
|
|
|
Random *random;
|
2026-03-03 03:04:10 +08:00
|
|
|
static ResourceLocation PAINTING_LOCATION;
|
2026-03-01 12:16:08 +08:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
PaintingRenderer(); // 4J -added
|
2026-03-02 17:37:16 +07:00
|
|
|
virtual void render(shared_ptr<Entity> _painting, double x, double y, double z, float rot, float a);
|
2026-03-01 12:16:08 +08:00
|
|
|
|
|
|
|
|
private:
|
2026-03-02 17:37:16 +07:00
|
|
|
void renderPainting(shared_ptr<Painting> painting, int w, int h, int uo, int vo);
|
|
|
|
|
void setBrightness(shared_ptr<Painting> painting, float ss, float ya);
|
2026-03-03 03:04:10 +08:00
|
|
|
virtual ResourceLocation *getTextureLocation(shared_ptr<Entity> mob);
|
2026-03-01 12:16:08 +08:00
|
|
|
};
|