Something went wrong. Try again.
the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
Something went wrong. Try again.
1.0 kB · 38 lines
C++
at main
1234567891011121314151617181920212223242526272829303132333435363738#include "stdafx.h"#include "PigRenderer.h"#include "..\Minecraft.World\net.minecraft.world.entity.animal.h"
ResourceLocation PigRenderer::PIG_LOCATION = ResourceLocation(TN_MOB_PIG);ResourceLocation PigRenderer::SADDLE_LOCATION = ResourceLocation(TN_MOB_SADDLE);
PigRenderer::PigRenderer(Model *model, Model *armor, float shadow) : MobRenderer(model,shadow){ setArmor(armor);}
int PigRenderer::prepareArmor(shared_ptr<LivingEntity> _pig, int layer, float a){ // 4J - dynamic cast required because we aren't using templates/generics in our version shared_ptr<Pig> pig = dynamic_pointer_cast<Pig>(_pig);
if (layer == 0 && pig->hasSaddle()) { MemSect(31); bindTexture(&SADDLE_LOCATION); MemSect(0); return 1; }
return -1;}
void PigRenderer::render(shared_ptr<Entity> mob, double x, double y, double z, float rot, float a){ MobRenderer::render(mob, x, y, z, rot, a);}
ResourceLocation *PigRenderer::getTextureLocation(shared_ptr<Entity> mob){ return &PIG_LOCATION;}