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

Started by Siku on

Topic category: User side tutorials

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
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 

 

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 

 

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?

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?

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?

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+ ^))))))

Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you make a tutorial for…
Wed, 05/01/2024 - 17:52

Can you make a tutorial for 2023.4 / 1.20.1+