How to despawn an default minecraft entity and replace it with custom.

Started by Gamemaster2022 on Wed, 04/28/2021 - 16:26

Topic category: Help with modding (Java Edition)

Last seen on 08:33, 4. Oct 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to despawn an default minecraft entity and replace it with custom.
Wed, 04/28/2021 - 16:26

Hey there! I am working on Diary of an eight  bit warrior mod and I made new types of villagers. They also has a shop GUI and they fight. I want to make them to spawn in vanilla villages (if you know how to do it lets tell it) or how to replace normal villagers with my, new, custom. I searched a lot on google, I found some same questions, but they werer old and in many cases it was wrongly explained. So I decided to ask by my own. Thanks for all replys. Gamemaster2022.

Last seen on 09:43, 1. Jun 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Code, you want it? Its you…
Wed, 04/28/2021 - 19:27

Code, you want it? Its you'res my friend!

-------------------------------------------

Heres the code: https://ibb.co/h8cGss3

-------------------------------------------

Last seen on 08:33, 4. Oct 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Hello, thank you for the…
Thu, 04/29/2021 - 06:09

Hello, thank you for the code,but I have got this error in gradle when I try to compile it:

if ((entity instanceof VillagerEntity)) {
^
1 error
> Task :compileJava FAILED
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
BUILD FAILED in 11s
1 actionable task: 1 executed
BUILD FAILED
Task completed in 16 seconds

 

Do you know how to fix it?

 

- Gamemaster2022

Last seen on 14:43, 2. Aug 2022
Joined Nov 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Did you use the correct…
Thu, 04/29/2021 - 06:37

Did you use the correct global trigger? "On loaded entity tick update"

Last seen on 08:33, 4. Oct 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Yes, of course. I "copied"…
Thu, 04/29/2021 - 06:48

Yes, of course. I "copied" the whole screenshot and made procedure. See:

https://ibb.co/qW2DdZx

 

Last seen on 09:43, 1. Jun 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Does it show the error from…
Thu, 04/29/2021 - 07:53

Does it show the error from the procedure, which you have written? (there should be a red triangle above the mod element)

Please check, maybe while coding, you accedently broke by activating something. Don't worry this happened to my mod, and all later fixed :)

Last seen on 09:43, 1. Jun 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
The error, which you showed,…
Thu, 04/29/2021 - 08:02

The error, which you showed, kinda looks like something went wrong with one of you're mobs (like giving him the entity base of a mob which can't do the AI goals, which you gave).

Example: giving a mob the entity base of a bat, then giving him the ai goal to wander -- GIVES OUT AN ERROR similar to yours...

Please tell me later.

Last seen on 08:33, 4. Oct 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Problem is I already tried…
Thu, 04/29/2021 - 08:16

Problem is I already tried it with a normal vanilla entities like you. Same error. I do not understand why is this happening :(

Last seen on 09:43, 1. Jun 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Im asking -- Are you sure…
Thu, 04/29/2021 - 08:23

Im asking -- Are you sure that the problem is in the procedure, wich you just write?

As I said, it looks like something might wrong with the entity, not the procedure.

Last seen on 09:43, 1. Jun 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Try detecting where the…
Thu, 04/29/2021 - 08:26

Try detecting where the error is really coming out.

Last seen on 08:33, 4. Oct 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Interesting, I renamed my…
Thu, 04/29/2021 - 09:05

Interesting, I renamed my villager from Villager to CasualVillager and now it works! Thank you very much!

Last seen on 09:43, 1. Jun 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
That's great my friend, hope…
Thu, 04/29/2021 - 09:50

That's great my friend, hope you're mod gets "Mod Of the Week" prestige!

Last seen on 09:43, 1. Jun 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
If you can please look in to…
Thu, 04/29/2021 - 09:52

If you can please look in to my forums, maybe you know the answer ;)

Last seen on 08:33, 4. Oct 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Yeah, I will look, thank you…
Thu, 04/29/2021 - 11:02

Yeah, I will look, thank you very much bro! :)