Scale and Size of A Mob??

Started by Gaansey on

Topic category: Advanced modding

Joined Dec 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Scale and Size of A Mob??

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?

Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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

Joined Dec 2016
Points:

User statistics:

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

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

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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);
          }

 

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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);
               
		}

 

Joined Aug 2013
Points:

User statistics:

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

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

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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);

     }

 

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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 :/

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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);
          }

 

 

Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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...

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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!

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
well i figger it out, that…
Mon, 11/27/2017 - 22:39

well i figger it out, that code NEED a mob that can generate childs, i manage to pull it out using GIState instead of this G11 stuff... but now ALL my mobs must breed if i want to scale then.. well thats not so bad since they only breed with the player actions lol i

Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well, then you have done…
Mon, 11/27/2017 - 22:54

Well, then you have done something bad because what I have written to you should work and (actually even works, look at Giant) for any Entity.

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
this code wont work because…
Mon, 11/27/2017 - 22:59

this code wont work because the mob cant breed, this code is for breeding, if i make the flying mob breed on Mcreator, or give the code manually after, it crashed Mcreator and wont render the mob... i dont get it makes no sense...

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
like if i scale down the…
Mon, 11/27/2017 - 22:59

like if i scale down the flying mob it wont fly, if it fly it wont scale down... :( :(