[TUTORIAL] How you can hide hunger or any other bar! 1.16.5 SIMPLE!

Started by Siku on

Topic category: User side tutorials

Last seen on 21:23, 11. Mar 2023
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[TUTORIAL] How you can hide hunger or any other bar! 1.16.5 SIMPLE!
Tue, 02/21/2023 - 13:27 (edited)

Here's a list of things you can hide (from mc source)

    ALL,
    HELMET,
    PORTAL,
    CROSSHAIRS,
    BOSSHEALTH, // All boss bars
    BOSSINFO,    // Individual boss bar
    ARMOR,
    HEALTH,
    FOOD,
    AIR,
    HOTBAR,
    EXPERIENCE,
    TEXT,
    HEALTHMOUNT,
    JUMPBAR,
    CHAT,
    PLAYER_LIST,
    DEBUG,
    POTION_ICONS,
    SUBTITLES,
    FPS_GRAPH,
    VIGNETTE
im not sure what each does since i just copied it to here 

Step 1

make a custom element 
make sure its named HideHunger

NAME IT HideHunger (REQUIRED!)

 

STEP 2

now that youve got a custom element it should have opened a code editor

delete everything other than your packag

paste this below your pacage

import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.eventbus.api.SubscribeEvent;
@Mod.EventBusSubscriber(modid = "putmodidhere", bus = Mod.EventBusSubscriber.Bus.FORGE) //SET YOUR MOD ID IN PUTMODIDHERE!
public class HideHunger{

    @SubscribeEvent
    public static void hideHungerBar(RenderGameOverlayEvent.Pre event) {
        if (event.getType() == RenderGameOverlayEvent.ElementType.FOOD) { // .FOOD can be anything from the list at top of forum!
            event.setCanceled(true);
        }
    }
}

.ALL doesnt work but u can remove the if and just cancel to hide all

Edited by Siku on Tue, 02/21/2023 - 13:27
Last seen on 21:23, 11. Mar 2023
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
dont try rn itll error…
Mon, 02/20/2023 - 06:07

dont try rn itll error fixing quickly 

 

Last seen on 21:23, 11. Mar 2023
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ok it should work now   
Mon, 02/20/2023 - 06:09

ok it should work now 

 

Last seen on 19:25, 27. Mar 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is it possible to implement…
Wed, 03/01/2023 - 20:05

Is it possible to implement this with a variable to check if an certain Variable or Effect?

Last seen on 20:04, 27. Mar 2024
Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Where am I wrong?
Sat, 09/30/2023 - 23:59

Where am I wrong?

Last seen on 00:23, 6. Nov 2023
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is there a fabric version of…
Thu, 10/19/2023 - 13:37

Is there a fabric version of this?

Last seen on 10:34, 23. Mar 2024
Joined Apr 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
PLZ for Mcreator 2023+ ^))))…
Thu, 10/19/2023 - 14:12

PLZ for Mcreator 2023+ ^))))))

Last seen on 12:05, 21. Mar 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
2023+?
Sun, 12/24/2023 - 06:02

2023+?