Scale a Mob on the Code

Started by gustavowizard123 on Sun, 06/07/2020 - 03:20

Topic category: Help with modding (Java Edition)

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Scale a Mob on the Code
Sun, 06/07/2020 - 03:20

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!

Last seen on 08:32, 19. Jun 2021
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
why can't u just do a custom…
Sun, 06/07/2020 - 04:13

why can't u just do a custom model?

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
i have 80+ mobs now, if i…
Sun, 06/07/2020 - 21:12

i have 80+ mobs now, if i would have to make 1 new model for each one... also i dont know how to make a mob breed and generate a diferent mob (the code), my question is; minecraft 1.15 do have scale right? so there must be a way to scale a mob, most of my mobs were made out of scale too, i would have to do all them again.

Last seen on 08:32, 19. Jun 2021
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
it isn't really possible,…
Mon, 06/08/2020 - 01:03

it isn't really possible, vanilla mobs don't have this behaviour except that some mobs could be babies I think

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
wait im lost here... on…
Mon, 06/08/2020 - 17:28

wait im lost here... on minecraft 1.12 you could scale mobs (i did it) so now on a more recent version (1.15) you CANT anymore??? also how come the cows and pigs and sheeps have their babies growing up per tick? you telling me mojang removed the scale function and did like 50 models of each of those mobs that grow?? something is really missing here...

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
if thats is true, i dont see…
Mon, 06/08/2020 - 17:29

if thats is true, i dont see how any mob mod will update to 1.15 :/

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
where can i see the cow …
Mon, 06/08/2020 - 17:48

where can i see the cow .java code file? can i see it on Mcreator 2020? i could on the older versions

Last seen on 17:22, 8. Jun 2021
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
to see the source code of…
Tue, 06/09/2020 - 01:32

to see the source code of minecraft, on the left of the vertical tabs "Mod elements/Resources/global vars..." there's a thin vertical bar with tiny left and down buttons. click on the tiny down button to bring up a new window to the left. find the source code in the "External libraries" folder

but if you want to do custom model scales, maybe you want to edit the model's rendering class to scale it to whatever you want, this involves some of coding, like using GlStateManager.scale to scale the model and GlStateManager.translate to offset the model position...

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
yes but you see…
Tue, 06/09/2020 - 02:18

yes but you see... GlStateManager.scale dont work anymore on MCreator 2020 coding, so i need to replace it for something, i tried:

 

                    GL11.glScalef(0.2F, 0.2F, 0.2F);
                    RenderSystem.scalef(0.2F, 0.2F, 0.2F);
                    GlStateManager.scale(0.25f, 0.25f, 0.25f);

 

and none of those work now, i google it so much for about 3 days and i could not find a way to scale mobs on MC 1.15 at all.

but im pretty sure there is a way, because i download a 1.15 mod today that have a mob model scaled down

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
i use to do on 1.12 like…
Tue, 06/09/2020 - 02:24

i use to do on 1.12 like this:

 

@SideOnly(Side.CLIENT)
    public void registerRenderers() {
        RenderLiving customRender = new RenderLiving<EntityBat>(Minecraft.getMinecraft().getRenderManager(), new ModelButterfly(), 0) {

            protected ResourceLocation getEntityTexture(EntityBat par1Entity) {
                return new ResourceLocation("Butterfly_CymothoeSangaris.png");
            }

            protected void preRenderCallback(EntityBat entitylivingbaseIn, float partialTickTime) {
          float f = 1.0F;
         
          GlStateManager.scale(0.2f, 0.2f, 0.2f);
             }
            
        };
        RenderingRegistry.registerEntityRenderingHandler(EntitybutterflyBloodRedGlider.class, customRender);
    }

 

 

but that wont work on 1.15, i need the proper functions witch i cant find anywhere

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
thanks for the location tip…
Tue, 06/09/2020 - 02:28

thanks for the location tip i found the vanilla .javas

Last seen on 17:22, 8. Jun 2021
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
yeah i dont know anything…
Tue, 06/09/2020 - 03:24

yeah i dont know anything about 1.15. but in 1.12.x i scale my models in the model's class instead of the renderer class. if your butterfly is your own custom model then maybe try that

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
yeah its my model, but what…
Tue, 06/09/2020 - 20:15

yeah its my model, but what do you mean scale on the model class? you mean like change the values here:?

 

public ModelButterfly() {
            textureWidth = 64;
            textureHeight = 64;
            body = new ModelRenderer(this, 4, 4);
            body.addBox(-1F, -1F, -4F, 2, 2, 9);
            body.setRotationPoint(0F, 22F, 0F);
            body.setTextureSize(64, 64);
            body.mirror = true;

 

but them what about the texture? if i change this i will have to make a new texture, so i would prefer to make a hole new model on techne i guess... im asking people if its possible to scale on 1.15 and nobody knows its so strange, i saw more than 1 mod with scaled mobs for 1.15 so im pretty sure there is a way

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
the other major problem of…
Tue, 06/09/2020 - 20:17

the other major problem of doing a hole new (and smaller) butterfly model would be the texture; a butterfly on the correct size would have no more than 5 pixels per wing in lengh, this would produce a much more poor mob in terms of texture.. thats why i want to scale them so bad

Last seen on 21:36, 16. Jun 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Code for 1.15.2 is different…
Tue, 06/09/2020 - 20:32

Code for 1.15.2 is different for 1.12.2. They didn't remove it, it's just different.