Make an item go invisible.

Started by Ima-builder on

Topic category: Help with modding (Java Edition)

Last seen on 04:25, 19. Mar 2023
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).

Last seen on 04:35, 17. Jan 2021
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?

Last seen on 04:25, 19. Mar 2023
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes
Thu, 06/18/2020 - 03:35

Yes

Last seen on 04:35, 17. Jan 2021
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?

Last seen on 04:25, 19. Mar 2023
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?

Last seen on 04:35, 17. Jan 2021
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

Last seen on 04:25, 19. Mar 2023
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?

Last seen on 04:35, 17. Jan 2021
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

Last seen on 04:25, 19. Mar 2023
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?

Last seen on 04:35, 17. Jan 2021
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

Last seen on 04:25, 19. Mar 2023
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);
        }
    }

 

Last seen on 04:35, 17. Jan 2021
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

 

Last seen on 04:25, 19. Mar 2023
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.

Last seen on 04:35, 17. Jan 2021
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