Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I just want to make something like bigger zombies when they're stronger, or creepers bigger when they have more explosion power.

 

Not only the hitbox, the model too

Edited by Insane96MCP

  • Author

So, I managed to mess up with RenderLivingEvent

 


@SubscribeEvent
public static void EventRenderLivingPre(RenderLivingEvent.Pre<EntityLivingBase> event) {
  if (event.getEntity() instanceof EntityZombie) {
  	GL11.glPushMatrix();
  	GL11.glScalef(2.0f, 2.0f, 2.0f);
  }
}

@SubscribeEvent
public static void EventRenderLivingPost(RenderLivingEvent.Post<EntityLivingBase> event) {
  if (event.getEntity() instanceof EntityZombie) {
  	GL11.glPopMatrix();
  }
}

But I'm obiviously doing something wrong
2018-01-07_17_58_37.png.35a7b03949867b464d6d5d2dcfe31a94.png

But as I'm writing I'm thinking that to do what I want to do, I have to replace the RendererZombie (or whatever mob) with mine and change size there.

Edited by Insane96MCP

9 minutes ago, Insane96MCP said:

So, I managed to mess up with RenderLivingEvent

 



@SubscribeEvent
public static void EventRenderLivingPre(RenderLivingEvent.Pre<EntityLivingBase> event) {
  if (event.getEntity() instanceof EntityZombie) {
  	GL11.glPushMatrix();
  	GL11.glScalef(2.0f, 2.0f, 2.0f);
  }
}

@SubscribeEvent
public static void EventRenderLivingPost(RenderLivingEvent.Post<EntityLivingBase> event) {
  if (event.getEntity() instanceof EntityZombie) {
  	GL11.glPopMatrix();
  }
}

But I'm obiviously doing something wrong
2018-01-07_17_58_37.png.35a7b03949867b464d6d5d2dcfe31a94.png

But as I'm writing I'm thinking that to do what I want to do, I have to replace the RendererZombie (or whatever mob) with mine and change size there.

Scale using GL changes the position/origin as well. So you need to sort that out. You also need to update it's serverside bounding box.

 

Use https://www.programcreek.com/java-api-examples/index.php?class=org.lwjgl.opengl.GL11&method=glTranslatef for changing position.

Edited by TheAwesomeGem

  • Author
2 minutes ago, TheAwesomeGem said:

Scale using GL changes the position/origin as well. So you need to sort that out. You also need to update it's serverside bounding box.

 

Use https://www.programcreek.com/java-api-examples/index.php?class=org.lwjgl.opengl.GL11&method=glTranslatef for changing position.

But the mob is not bigger ... and when seen from above it disapears
2018-01-07_18_10_32.png.923aae314b46e62fd0dc2e8cb8375cae.png

12 minutes ago, Insane96MCP said:

But the mob is not bigger ... and when seen from above it disapears
2018-01-07_18_10_32.png.923aae314b46e62fd0dc2e8cb8375cae.png

Are you changing it on clientside or serverside? 

 

Also use GLStateManager and not the raw GL calls.

 

Edit: Look at RenderGiantZombie as an example.

Edited by TheAwesomeGem

  • Author
9 minutes ago, TheAwesomeGem said:

Are you changing it on clientside or serverside?

The event is called clientside only, right?

 

10 minutes ago, TheAwesomeGem said:

Edit: Look at RenderGiantZombie as an example.

As an example to use GLStateManager?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.