Started by
min03
on
Topic category: Help with Minecraft modding (Java Edition)
i'm trying make my mob bigger and i found how to scale custom mob,
but it only for custom model.
my mob using vanilla model so i don't know how to scale my mob
and i'm trying preRenderCallback() method but it doesn't work
also here is code that i found:
(for 1.12.2)
@SideOnly(Side.CLIENT)
public void registerRenderers() {
RenderLiving customRender = new RenderLiving<EntityBat>(Minecraft.getMinecraft().getRenderManager(), new mcreator_butterflyMonarch.ModelButterfly(), 0) {
protected ResourceLocation getEntityTexture(EntityBat par1Entity) {
return new ResourceLocation("t1.png");
}
protected void preRenderCallback(EntityBat entitylivingbaseIn, float partialTickTime) {
float f = 1.0F;
GlStateManager.scale(0.2f, 0.2f, 0.2f);
}
};
RenderingRegistry.registerEntityRenderingHandler(mcreator_butterflyMonarch.EntitybutterflyMonarch.class, customRender);
}
and this is my code:
@SideOnly(Side.CLIENT)
@Override
public void preInit(FMLPreInitializationEvent event) {
RenderingRegistry.registerEntityRenderingHandler(EntityCustom.class, renderManager -> {
return new RenderLiving(renderManager, new ModelSpider(), 2.5f) {
protected ResourceLocation getEntityTexture(Entity entity) {
return new ResourceLocation("spiders:textures/ice_spider.png");
}
};
});
}
I don't think many Java coders are still using 1.12.2 that could help here
do something like this:
ok I know this is a pretty old thread but where exactly would I put that code? I have basically no experience with coding especially in java and all I know how to do coding-wise is changing how fast the legs move in walking animations
edit your custom entity element. find the "public void preInit(FMLPreInitializationEvent event)" line and add the piece of code:
like my code example in my previous post. the 0.2f is the scale, you can change it to whatever scale you like.
remember this is for 1.12.2
Thanks, but how do we save the code? Because whenever I try to to it the scale of the mob resets itself.
If I don't lock the code I get an error screen.