Help with entity change

Started by HazyDaze93 on

Topic category: Help with MCreator software

Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with entity change
Thu, 07/27/2023 - 08:27 (edited)

Hi everyone, I am new to the community and have gotten into making some simple mods as I am learning, I have made a mob, and then have made a stronger version of that same mob, I am looking to make the mob change into it's stronger form for a certain amount of time after feeding it a certain food, I am slowly learning the software so any help would be amazing!!

 

Cheers in advance!

Edited by HazyDaze93 on Thu, 07/27/2023 - 08:27
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello! You could use a…
Thu, 07/27/2023 - 10:25

Hello!


You could use a procedure linked to "When right clicked on entity" on your mob. 

Inside the procedure, create an if statement, check if the item Source Entity is holding in the main hand is your desired food item.

If correct, you can remove one of those food items from Source Entity's inventory, and apply a custom potion effect [Which you will also have to create] to Event/target entity, with the duration of the potion effect being the time it takes for it to transform into the stronger variant.

In the triggers of the custom potion effect, create another procedure linked to "When effect expires", here you'll simply spawn in the stronger variant and then despawn the current entity.

Hope this helps!

Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello I am fairly new to the…
Thu, 07/27/2023 - 11:51

Hello I am fairly new to the procedures and am not familiar with how to do this

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to use procedures is…
Thu, 07/27/2023 - 12:07

how to use procedures is explained in-depth if you search for it.  There is also a tutorial playlist on youtube that may be helpful.

 

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Image Link] Hello! I have…
Thu, 07/27/2023 - 13:58

[Image Link]

Hello! I have provided an image here on how you should make both procedures.

Make sure to replace the food item with what you want, the potion effect with your custom effect and the spawn entity with your stronger version of the mob.

Let me know if this helps or you need any more help!

Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This is quite helpful thank…
Fri, 07/28/2023 - 04:54

This is quite helpful thank you and I may use this in the near future on other projects as I learn more, but I actually made a custom counterpart creature and am looking for the correct procedure that will allow my original creature to despawn and the counterpart to appear in its place for a certain amount of time after feeding it the item of choice then to despawn that one and the original to appear :)

Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So I have this so far, just…
Fri, 07/28/2023 - 07:41

So I have this so far, just a basic procedure for now, will love to get more in depth later on, I made two random models to test with the code and it seems to work, all I am having trouble with is getting it to despawn after so long and the original to respawn again as I mentioned in my last comment. 

The target entity is already set to my original entity, so I guess my question is how do I go about adding the newly spawned entity as the next target to despawn before the original reappears?

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello! I have another…
Fri, 07/28/2023 - 11:08

Hello! I have another solution to this!
You will have to create a second custom potion effect first.

On that newly created potion effect, create an identical procedure like on the first potion procedure one, but instead it spawns in the first original variant of the mob, and make sure it's linked to When effect expires.

Now, go on to your stronger mob, go in 'Triggers' and create a 'On initial entity spawn' procedure. Inside you will add a potion effect with your newly created custom potion effect, and set the duration to what you want the time before the original one appears.

Hope this helps!