Started by
gustavowizard123
on
Topic category: Help with Minecraft modding (Java Edition)
Hey guys! nice software btw;
how do i change the code of a Mob to scale its model down/up? i use to do it easy on MCreator 1.8 for MC 1.12, but i cant do bananas with new Mcreator 2020 for MC 1.15... can someone please light my way here?
thanks!
yes i realise that, but i cant find the information anywhere :( the new commands and functions.. i need the scale thing for mobs
there's a render method in the models class.put your GlStateManager.scale functions there
can you point me where here please? im new on java yet :(
thats the mob entire code there.. thank you btw!
in your ModelButterfly class there's a render method right above the setRotation method. try doing something like this:
but i have to warn you i'm not familiar with 1.15.x, like i dont know what MatrixStack is, so you will need to test it on your own.
just tried but all those GlStateManager functions dont exist on MC 1.15,
not even the entry
import net.minecraft.client.renderer.GlStateManager
will be acepted :(
i just looked up MatrixStack info on the web, seems the push/pop/scale functions are all in MatrixStack in 1.15x. use the following instead:
omg thank you so much it actually worked!
:D
Now all i need is make the child breed thing and the taming code; you said you make a new file for the childs right? how do you make the mob breed a different mob in the code?
thanks again!
no that wasn't me, i'm not familiar with mc breeding mechanics yet. but if the child is still the same entity class then you code it in the same entity class. look at what vanilla mc does with villagers or zombies.
you could try searching on minecraftforge.net if you're gonna jump deep down the coding path.
ah cool...
hey the scale thing worked but the mob now spawn a little bit over the ground (floating), i know i have to change the Z offset someplace now, not sure how thou
Sorry, about the ms.push/scale/pop, I dont know where to put it ?
This is mine :
public void render(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue,
float alpha) {
All.render(matrixStack, buffer, packedLight, packedOverlay);
}
Should I do this? <I wont work tho>
public void render(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue,
float alpha) {
ms.push();
ms.scale(0.25f, 0.25f, 0.25f);
ms.pop();
All.render(matrixStack, buffer, packedLight, packedOverlay);
}
you put here, at the end, above the animations
nvm the translate part for now, im still trying to figger how to make the mob spawn on the floor and not floating... it de-scale but not from the floor it seams
yes i fix it with that translate call, you need to set a positive value to push the spawn down; so for a mob scaled to 70% like the one above i use