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

Started by Siku on Mon, 02/20/2023 - 05:48

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:45, 3. Jun 2023
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?