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

Okay so here's the problem:

I changed the player's model with a cutom model and texture with the method in the bottom of the post, but the problem is pumpkin helmet, infact pumpkin helmet is not in player's model but in renderPlayer;

 

Is there a way in GL11 to complitely scale the player (with pumpkin) so that i can then re-scale it just for the model?

 

public static class PlayerRendererEvent
    {
	public Field mainRenderer;
	public Field mainTexture;
	public Field globalMc;

	public PlayerRendererEvent()
	{
		try {
			mainRenderer = RendererLivingEntity.class.getDeclaredField("mainModel");
			mainRenderer.setAccessible(true);
			mainTexture = AbstractClientPlayer.class.getDeclaredField("locationSkin");
			mainTexture.setAccessible(true);
			globalMc = RenderGlobal.class.getDeclaredField("mc");
			globalMc.setAccessible(true);
		} 
		catch (NoSuchFieldException e) 
		{
			e.printStackTrace();
		}
	}

	@SubscribeEvent
	public void onPlayerRenderThirdPerson(RenderPlayerEvent.Pre event) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException
	{
		mainRenderer.set(event.renderer, new ModelPlayerSnowMan(0));
		event.renderer.modelBipedMain = (ModelBiped)mainRenderer.get(event.renderer);
		mainTexture.set((EntityPlayerSP)event.entityPlayer, new ResourceLocation("textures/entity/player/Glacia/snowman.png"));

		event.renderer.modelArmor = new ModelPlayerSnowMan(1);
		event.renderer.modelArmorChestplate = new ModelPlayerSnowMan(2);
	}

	@SubscribeEvent
	public void onPlayerRenderFirstPerson(RenderHandEvent event) throws IllegalArgumentException, IllegalAccessException
	{
		Minecraft mc = (Minecraft) globalMc.get(event.context);
		RenderPlayer renderplayer = (RenderPlayer) RenderManager.instance.getEntityRenderObject(mc.thePlayer);

		mainRenderer.set(renderplayer, new ModelPlayerSnowMan(0));
		renderplayer.modelBipedMain = (ModelBiped)mainRenderer.get(renderplayer);
		mainTexture.set(mc.thePlayer, new ResourceLocation("textures/entity/player/Glacia/snowman.png"));
	}
    }

Actually i don't know what to write in this signature soooo.... anyway

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.