How do i scale mob size in 1.18?

Started by Thermoza on Fri, 06/03/2022 - 21:07

Topic category: Help with modding (Java Edition)

Last seen on 09:47, 7. Aug 2022
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How do i scale mob size in 1.18?
Fri, 06/03/2022 - 21:07

Hi there, has anyone managed to scale mobs in 1.18? I have tried using the older posts without success.

Last seen on 09:47, 7. Aug 2022
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
The reason why i cant just…
Fri, 06/03/2022 - 21:18

The reason why i cant just change the model size is that i want the mob to also use armor and weapons that also scales with the size of the mob like a wither skeleton compared to a skeleton

Last seen on 09:47, 7. Aug 2022
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Found a solution, here is my…
Sun, 06/05/2022 - 19:53

Found a solution, here is my custom skeleton mob with the scaling at 1.2

package net.mcreator.earthdungeons.client.renderer;

import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.world.entity.monster.AbstractSkeleton;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.client.renderer.entity.layers.HumanoidArmorLayer;
import net.minecraft.client.renderer.entity.HumanoidMobRenderer;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.client.model.geom.ModelLayers;
import net.minecraft.client.model.SkeletonModel;

import net.mcreator.earthdungeons.entity.ArmoredSkeletonEntity;

public class ArmoredSkeletonRenderer extends HumanoidMobRenderer<ArmoredSkeletonEntity, SkeletonModel<ArmoredSkeletonEntity>> {
    public ArmoredSkeletonRenderer(EntityRendererProvider.Context context) {
        super(context, new SkeletonModel(context.bakeLayer(ModelLayers.SKELETON)), 0.5f);
        this.addLayer(new HumanoidArmorLayer(this, new SkeletonModel(context.bakeLayer(ModelLayers.SKELETON_INNER_ARMOR)),
                new SkeletonModel(context.bakeLayer(ModelLayers.SKELETON_OUTER_ARMOR))));
    }

    @Override
    public ResourceLocation getTextureLocation(ArmoredSkeletonEntity entity) {
        return new ResourceLocation("earth_dungeons:textures/skeleton.png");
    }
       protected void scale(ArmoredSkeletonEntity p_116460_, PoseStack p_116461_, float p_116462_) {
      p_116461_.scale(1.2F, 1.2F, 1.2F);
   }

}