Scaling Living Entities in 1.17.1

Started by brainboy102 on

Topic category: Help with modding (Java Edition)

Last seen on 16:03, 13. Mar 2022
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Scaling Living Entities in 1.17.1
Wed, 02/09/2022 - 18:17 (edited)

Hello!

Recently I have been attempting to scale a mob via the code editor, but have not found any documentation for the newest 1.17 version of MCreator. So far, my problem is even finding the render file lines of code I need to change, as seen on this forum page (https://mcreator.net/forum/73570/render-scaling-you-entities-matrixstack). For me, it only displays the imports and then this.. (see code below, name of entity is Normal for example)

I have searched through all scaling and size posts, and none have been of use for the most recent builds of MCreator.
If anyone has any info on how to scale in 1.17, it would be very, very much appreciated!

public class NormalRenderer extends MobRenderer<NormalEntity, ModelNormal<NormalEntity>> {
    public NormalRenderer(EntityRendererProvider.Context context) {
        super(context, new ModelNormal(context.bakeLayer(ModelNormal.LAYER_LOCATION)), 0.5f);
    }

    @Override
    public ResourceLocation getTextureLocation(NormalEntity entity) {
        return new ResourceLocation("modpackname:textures/normal.png");
    }
}
Edited by brainboy102 on Wed, 02/09/2022 - 18:17
Last seen on 12:25, 17. Nov 2023
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Same here, I am looking for…
Fri, 06/03/2022 - 06:07

Same here, I am looking for a solution for scaling mobs and i don't understand what the wither skeleton renderer for scaling mobs in 1.18. What is the p_116460_, p_116461_, p_116462_ refer to?

package net.minecraft.client.renderer.entity;

import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.model.geom.ModelLayers;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.monster.AbstractSkeleton;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;

@OnlyIn(Dist.CLIENT)
public class WitherSkeletonRenderer extends SkeletonRenderer {
   private static final ResourceLocation WITHER_SKELETON_LOCATION = new ResourceLocation("textures/entity/skeleton/wither_skeleton.png");

   public WitherSkeletonRenderer(EntityRendererProvider.Context p_174447_) {
      super(p_174447_, ModelLayers.WITHER_SKELETON, ModelLayers.WITHER_SKELETON_INNER_ARMOR, ModelLayers.WITHER_SKELETON_OUTER_ARMOR);
   }

   public ResourceLocation getTextureLocation(AbstractSkeleton p_116458_) {
      return WITHER_SKELETON_LOCATION;
   }

   protected void scale(AbstractSkeleton p_116460_, PoseStack p_116461_, float p_116462_) {
      p_116461_.scale(1.2F, 1.2F, 1.2F);
   }
}