the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 31 lines 1.0 kB view raw
1#include "stdafx.h" 2#include "BlazeModel.h" 3#include "..\Minecraft.World\net.minecraft.world.entity.monster.h" 4#include "BlazeRenderer.h" 5 6ResourceLocation BlazeRenderer::BLAZE_LOCATION = ResourceLocation(TN_MOB_BLAZE); 7 8BlazeRenderer::BlazeRenderer() : MobRenderer(new BlazeModel(), 0.5f) 9{ 10 modelVersion = ((BlazeModel *) model)->modelVersion(); 11} 12 13void BlazeRenderer::render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a) 14{ 15 // 4J - original version used generics and thus had an input parameter of type Blaze rather than shared_ptr<Entity> we have here - 16 // do some casting around instead 17 shared_ptr<Blaze> mob = dynamic_pointer_cast<Blaze>(_mob); 18 19 int modelVersion = ((BlazeModel *) model)->modelVersion(); 20 if (modelVersion != this->modelVersion) 21 { 22 this->modelVersion = modelVersion; 23 model = new BlazeModel(); 24 } 25 MobRenderer::render(mob, x, y, z, rot, a); 26} 27 28ResourceLocation *BlazeRenderer::getTextureLocation(shared_ptr<Entity> mob) 29{ 30 return &BLAZE_LOCATION; 31}