Scale and Size of A Mob??

Started by Gaansey on Mon, 06/26/2017 - 03:35

Topic category: Advanced modding

Last seen on 02:23, 8. Sep 2019
Joined Dec 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Scale and Size of A Mob??
Mon, 06/26/2017 - 03:35

Just a question, how would you be able to change the scale of a mob, for instance a creeper to be much smaller in MCreator?

Last seen on 00:21, 11. Aug 2019
Joined Aug 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
If you mean scale of the
Mon, 06/26/2017 - 04:54

If you mean scale of the model itself, use GL11.glScalef(scale, scale, scale) in its renderer

Last seen on 02:23, 8. Sep 2019
Joined Dec 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:If you mean scale of the
Mon, 06/26/2017 - 05:25

@#1 Thanks, I'll see how it goes

Last seen on 16:41, 26. Sep 2019
Joined Sep 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
where i should put this?…
Mon, 11/27/2017 - 18:09

where i should put this? work on 1.10? because i made a flying mob, and the code from my aquatic/terrestrial mobs (that breed childs) dont work for soem reason, dont render the mob and crash Mcreator too, (witch i never seen happen before), so im trying to just find a line to scale the flying mob, i put this:

GL11.glScalef(2F, 2F, 2F);

 

@SideOnly(Side.CLIENT)
	public void registerRenderers() {
		RenderLiving customRender = new RenderLiving(Minecraft.getMinecraft().getRenderManager(), new mcreator_butterflyMonarch.ModelButterfly(), 0) {
			protected ResourceLocation getEntityTexture(Entity par1Entity) {
				return new ResourceLocation("t1.png");
			}
                
		};
          GL11.glScalef(2F, 2F, 2F); 
		RenderingRegistry.registerEntityRenderingHandler(mcreator_butterflyMonarch.EntitybutterflyMonarch.class, customRender);
          }

 

Last seen on 16:41, 26. Sep 2019
Joined Sep 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
and i try to put also here,…
Mon, 11/27/2017 - 18:10

and i try to put also here, it compile ok but Mob is not scaled:

 

public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
			super.render(entity, f, f1, f2, f3, f4, f5);
			setRotationAngles(f, f1, f2, f3, f4, f5, entity);
			body.render(f5);
			RightWing.render(f5);
			LeftWing.render(f5);
			Antenas.render(f5);
			Head.render(f5);
               GL11.glScalef(2F, 2F, 2F);
               
		}

 

Last seen on 00:21, 11. Aug 2019
Joined Aug 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
You have to override method…
Mon, 11/27/2017 - 18:24

You have to override method preRenderCallback() and do it there, in the renderer.

Last seen on 16:41, 26. Sep 2019
Joined Sep 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
the 'renderer' is 'public…
Mon, 11/27/2017 - 18:38

the 'renderer' is 'public void registerRenderers' or 'public void render' ? im so confused thats why i put on both...

how i override?

 

if you mean do this: when i do it crashed Mcreator and the texture is invisible:

@SideOnly(Side.CLIENT)
     public void registerRenderers() {
          RenderLiving customRender = new RenderLiving<EntityAgeable>(Minecraft.getMinecraft().getRenderManager(), new mcreator_monkeyBlack.ModelMonkey(), 0) {
     
     protected ResourceLocation getEntityTexture(EntityAgeable par1Entity) {
          return new ResourceLocation("monkeyblack.png");
     }
     
     protected void preRenderCallback(EntityAgeable entitylivingbaseIn, float partialTickTime) {
          float f = 0.8F;
          if (entitylivingbaseIn.getGrowingAge() < 0) {
               f = (float)((double)f * 0.5D);
               this.shadowSize = 0.25F;
          } else {
               this.shadowSize = 0.5F;
          }
          GlStateManager.scale(f, f, f);
     }    
     
};
          RenderingRegistry.registerEntityRenderingHandler(mcreator_monkeyBlack.EntitymonkeyBlack.class, customRender);

     }

 

Last seen on 16:41, 26. Sep 2019
Joined Sep 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
there is also this…
Mon, 11/27/2017 - 18:40

there is also this GlStateManager, i was using this fine on the other mobs, i cant undersand why it wont work on the flying mob :/

Last seen on 16:41, 26. Sep 2019
Joined Sep 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
i tried this now, as you…
Mon, 11/27/2017 - 18:47

i tried this now, as you said, still no size change

 

@SideOnly(Side.CLIENT)
	public void registerRenderers() {
		RenderLiving customRender = new RenderLiving(Minecraft.getMinecraft().getRenderManager(), new mcreator_butterflyMonarch.ModelButterfly(), 0) {
			protected ResourceLocation getEntityTexture(Entity par1Entity) {
				return new ResourceLocation("t1.png");
			}

              protected void preRenderCallback(EntitybutterflyMonarch entitylivingbaseIn, float partialTickTime)
              {
               GL11.glScalef(2F, 2F, 2F);
              }
		};
           
		RenderingRegistry.registerEntityRenderingHandler(mcreator_butterflyMonarch.EntitybutterflyMonarch.class, customRender);
          }

 

 

Last seen on 00:21, 11. Aug 2019
Joined Aug 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Post all you have - the full…
Mon, 11/27/2017 - 18:57

Post all you have - the full code, the crash reports /logs from the crashes you mentioned before, etc...

Last seen on 16:41, 26. Sep 2019
Joined Sep 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
there is no crash report, no…
Mon, 11/27/2017 - 20:33

there is no crash report, no compilations errors now, with those 2 codes above, none of them render the model on the scale i put there (2F) - it renders with regular size. what i want to know is how to scale the flying mob. thanks again!