Make an item go invisible.

Started by Ima-builder on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make an item go invisible.

Hi, I am trying to make a super invisibility potion (with a stack size of 16) , where even the potion disappears, I thought about swiping out the potion with a dummy invisible item but I'm not quite Shure how to do that (preferably with block coding).

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh sorry. Let me back up a…
Thu, 06/18/2020 - 03:34

Oh sorry. Let me back up a bit.

 

So does the code above (without the special code) run correctly, with the speed and all?

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Great! Now have you yet, or…
Thu, 06/18/2020 - 03:38

Great! Now have you yet, or can you, add the entity NBT stuff in the procedure editor?

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
maybe? what would I need to…
Thu, 06/18/2020 - 03:39

maybe? what would I need to add?

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There are blocks in mcreator…
Thu, 06/18/2020 - 04:37

There are blocks in mcreator such as;

Set EntityNBT "string" = false/true

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok, so what would I want to…
Thu, 06/18/2020 - 04:40

Ok, so what would I want to set the NBT as?

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
True when you want the…
Thu, 06/18/2020 - 04:45

True when you want the player to be invisible

False when you don't

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What should the TagName be?
Thu, 06/18/2020 - 04:47

What should the TagName be?

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Whatever you want Examples; …
Thu, 06/18/2020 - 04:48

Whatever you want

Examples;

"superinvisibility"

"[modid]invisibility"

NBTs should be lowercase btw

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok, so now do I just put…
Thu, 06/18/2020 - 04:52

Ok, so now do I just put this at the end now?

@SubscribeEvent
    public void renderPlayerPre(RenderPlayerEvent.Pre event)
    {
        if (event.getPlayer().getPersistentData().getBoolean("cancelrendering") == true)
        {
            event.setCanceled(true);
        }
    }

 

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes, make sure …
Thu, 06/18/2020 - 04:55

Yes,

make sure "cancelrendering" is equal to whatever you set the NBT to in the procedure

 

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I pasted it at the very end…
Thu, 06/18/2020 - 05:04

I pasted it at the very end if that maters.

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
very end That can actually…
Thu, 06/18/2020 - 05:06

very end

That can actually be an issue lol, post'e code