Make an item go invisible.

Started by Ima-builder on

Topic category: Help with Minecraft modding (Java Edition)

Active 2 years ago
Joined Jun 2020
Points:
695

User statistics:

  • Modifications: 2
  • Forum topics: 5
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 58
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).

Active 4 years ago
Joined Sep 2019
Points:
986

User statistics:

  • Modifications: 1
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 507
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?

Active 2 years ago
Joined Jun 2020
Points:
695

User statistics:

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

Yes

Active 4 years ago
Joined Sep 2019
Points:
986

User statistics:

  • Modifications: 1
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 507
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?

Active 2 years ago
Joined Jun 2020
Points:
695

User statistics:

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

maybe? what would I need to add?

Active 4 years ago
Joined Sep 2019
Points:
986

User statistics:

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

There are blocks in mcreator such as;

Set EntityNBT "string" = false/true

Active 2 years ago
Joined Jun 2020
Points:
695

User statistics:

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

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

Active 4 years ago
Joined Sep 2019
Points:
986

User statistics:

  • Modifications: 1
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 507
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

Active 2 years ago
Joined Jun 2020
Points:
695

User statistics:

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

What should the TagName be?

Active 4 years ago
Joined Sep 2019
Points:
986

User statistics:

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

Whatever you want

Examples;

"superinvisibility"

"[modid]invisibility"

NBTs should be lowercase btw

Active 2 years ago
Joined Jun 2020
Points:
695

User statistics:

  • Modifications: 2
  • Forum topics: 5
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 58
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);
        }
    }

 

Active 4 years ago
Joined Sep 2019
Points:
986

User statistics:

  • Modifications: 1
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 507
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

 

Active 2 years ago
Joined Jun 2020
Points:
695

User statistics:

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

I pasted it at the very end if that maters.

Active 4 years ago
Joined Sep 2019
Points:
986

User statistics:

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

very end

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