Started by
Gamemaster2022
on
Topic category: Help with Minecraft modding (Java Edition)
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.
Code, you want it? Its you'res my friend!
-------------------------------------------
Heres the code: https://ibb.co/h8cGss3
-------------------------------------------
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
Did you use the correct global trigger? "On loaded entity tick update"
Yes, of course. I "copied" the whole screenshot and made procedure. See:
https://ibb.co/qW2DdZx
sorry bad link. Here is new:
https://ibb.co/rtyr5Xr
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 :)
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.
Problem is I already tried it with a normal vanilla entities like you. Same error. I do not understand why is this happening :(
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.
Try detecting where the error is really coming out.
Interesting, I renamed my villager from Villager to CasualVillager and now it works! Thank you very much!
That's great my friend, hope you're mod gets "Mod Of the Week" prestige!
If you can please look in to my forums, maybe you know the answer ;)
Yeah, I will look, thank you very much bro! :)