Invincible mob, except for one custom weapon.

Started by noTLST on

Topic category: Help with Minecraft modding (Java Edition)

Active 2 years ago
Joined Jul 2022
Points:
327

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3
Invincible mob, except for one custom weapon.

Invincible mob, except for one custom weapon. Unfortunately, I can't write the procedure correctly.
I have a mob where there are all checkboxes for immunity. I also have a weapon with which to kill him.

How to write a procedure correctly (I would be grateful if they showed an image)

Active 2 weeks ago
Joined Sep 2019
Points:
1182

User statistics:

  • Modifications: 4
  • Forum topics: 58
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 427
(No subject)
Wed, 07/27/2022 - 19:35

Procedure

Active 2 weeks ago
Joined Sep 2019
Points:
1182

User statistics:

  • Modifications: 4
  • Forum topics: 58
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 427
Hopefully the image appears…
Wed, 07/27/2022 - 19:36

Hopefully the image appears for you

Active 2 years ago
Joined Feb 2022
Points:
576

User statistics:

  • Modifications: 0
  • Forum topics: 18
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 158
Put this procedure in the …
Wed, 07/27/2022 - 19:44

Put this procedure in the "when entity hurt" trigger in your entity's triggers section.

https://imgur.com/nQAMP14

Change damage and your item to whatever you like. Hope this helps.

 

 

Active 2 years ago
Joined Jul 2022
Points:
327

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3
 @FreddyFoxGam3r @ImOd102…
Thu, 07/28/2022 - 05:30

 @FreddyFoxGam3r @ImOd102 First of all, thanks for your answers. I actually did this and tried to do it, but only with an additional entity check. When adding a procedure to a creature's triggers, this error occurs. What could be wrong?

Task :compileJava FAILED 
C:\Users\dmitr\MCreatorWorkspaces\invasionmod\src\main\java\net\mcreator\invasionmod\entity\EntityLordOfEnd.java:142: error: cannot find symbol 
            $_dependencies.put("sourceentity", sourceentity); 
                                               ^ 
  symbol:   variable sourceentity 
  location: class EntityCustom 
1 error 
FAILURE: Build failed with an exception. 
* What went wrong: 
Execution failed for task ':compileJava'. 
> Compilation failed; see the compiler error output for details. 
* Try: 
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. 
* Get more help at https://help.gradle.org 
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0. 
Use '--warning-mode all' to show the individual deprecation warnings. 
See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:command_line_warnings 
BUILD FAILED in 3s 
1 actionable task: 1 executed 
BUILD FAILED

 

Active 2 weeks ago
Joined Sep 2019
Points:
1182

User statistics:

  • Modifications: 4
  • Forum topics: 58
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 427
make sure to put it in the…
Thu, 07/28/2022 - 11:26

make sure to put it in the right trigger. Sometimes mcreator does this if you use the wrong trigger. Is it in  the "when enitity is hurt" trigger?

Active 2 years ago
Joined Feb 2022
Points:
576

User statistics:

  • Modifications: 0
  • Forum topics: 18
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 158
I think it might have…
Thu, 07/28/2022 - 15:11

I think it might have something to do with the invincibility?? So try this instead:
https://imgur.com/TRtc6lL

Don't put this in the entity triggers, and the green block is found in the advanced procedure blocks tab.

Active 2 years ago
Joined Jul 2022
Points:
327

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3
Unfortunately, nothing…
Thu, 07/28/2022 - 16:26

Unfortunately, nothing helped, although it would seem that the task is simple. Most likely I will have to contact the modder with this simple task, I can’t cope myself :(

If there are no errors with your advice, but the damage to the mob does not pass