the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#include "stdafx.h"
2#include "OcelotRenderer.h"
3#include "..\Minecraft.World\net.minecraft.world.entity.animal.h"
4
5ResourceLocation OcelotRenderer::CAT_BLACK_LOCATION = ResourceLocation(TN_MOB_CAT_BLACK);
6ResourceLocation OcelotRenderer::CAT_OCELOT_LOCATION = ResourceLocation(TN_MOB_OCELOT);
7ResourceLocation OcelotRenderer::CAT_RED_LOCATION = ResourceLocation(TN_MOB_CAT_RED);
8ResourceLocation OcelotRenderer::CAT_SIAMESE_LOCATION = ResourceLocation(TN_MOB_CAT_SIAMESE);
9
10OcelotRenderer::OcelotRenderer(Model *model, float shadow) : MobRenderer(model, shadow)
11{
12}
13
14void OcelotRenderer::render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a)
15{
16 MobRenderer::render(_mob, x, y, z, rot, a);
17}
18
19ResourceLocation *OcelotRenderer::getTextureLocation(shared_ptr<Entity> entity)
20{
21 shared_ptr<Ocelot> cat = dynamic_pointer_cast<Ocelot>(entity);
22
23 switch (cat->getCatType())
24 {
25 default:
26 case Ocelot::TYPE_OCELOT: return &CAT_OCELOT_LOCATION;
27 case Ocelot::TYPE_BLACK: return &CAT_BLACK_LOCATION;
28 case Ocelot::TYPE_RED: return &CAT_RED_LOCATION;
29 case Ocelot::TYPE_SIAMESE: return &CAT_SIAMESE_LOCATION;
30 }
31}
32
33void OcelotRenderer::scale(shared_ptr<LivingEntity> _mob, float a)
34{
35 // 4J - original version used generics and thus had an input parameter of type Blaze rather than shared_ptr<Entity> we have here -
36 // do some casting around instead
37 shared_ptr<Ocelot> mob = dynamic_pointer_cast<Ocelot>(_mob);
38 MobRenderer::scale(mob, a);
39 if (mob->isTame())
40 {
41 glScalef(.8f, .8f, .8f);
42 }
43}