A flight and invulnerability giving item breaks other game modes and mods

Started by Ruy Vuusen on

Topic category: Troubleshooting, bugs, and solutions

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
A flight and invulnerability giving item breaks other game modes and mods

I created a simple procedure for an item to give the player flight and invulnerability when in inventory (and also set it to activate on the global trigger "On player tick update"). It simply says:

[ Allow [Event/target entity] to fly if [Has [Event/Target entity] in inventory [the item]] otherwise don't]

[ Disable damage of [Event/target entity] if [Has [Event/Target entity] in inventory [the item]] otherwise enable it]

 

The problem is that this also disables the natural flight and invulnerability of creative and spectator as well as similar properties from other mods' items (such as the flight and invulnerability from Avaritia's infinity armor). I really want to use this mod in a certain modpack that has other flight-granting items, so I would appreciate it if someone has a fix for my problem.

 

Also important to note: This is a mod I made with MCreator 2021.1 with the 1.12.2 mod plugin. This means some tools such as the block that checks your game mode don't work with my selected generator.

 

Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
then just check if player is…
Mon, 04/10/2023 - 17:56

then just check if player is in the gamemode and dont make creative and spectator modes players vulnerable and not able to fly.

Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I mean exception to rule of…
Mon, 04/10/2023 - 17:56

I mean exception to rule of not having the item in inventory

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I cannot really follow your…
Tue, 04/11/2023 - 08:05

I cannot really follow your solution, since I'm unable to check the game mode due to using a more limited generator (and I'm too bad at it to edit the code directly). Also, my bigger problem is making the mod compatible with other similar mods as stated in my post. How do I do that?