Started by
AnTDD
on
Topic category: Help with Minecraft modding (Java Edition)
Hello, I am using MCreator version 1.8.0. I keep getting the "Failed to load dependency entity for procedure" error. Here is what it says in the console:[15:51:39] [Server thread/INFO] [STDERR]: [mod.mcreator.mcreator_myplantPlanted:executeProcedure:24 Failed to load dependency entity for procedure myplantPlanted!
[15:50:20] [Server thread/INFO] [STDERR]: [mod.mcreator.mcreator_myplantDropSeed:executeProcedure:20 Failed to load dependency entity for procedure myplantDropSeed!
IDK if it is a bug or if I am just stupid but I don't see anything wrong with the code that I have.
Here is the code for myplantDropSeed:
Here is the code for myplantPlanted:
Thank you in advance for your help.
This is a bug of some sort recreate your procedure and try then
I found what may be the issue, if you go into the code itself, you can see the dependencies, and sourceentity is not provided for some reason!
(I used the on entity death event, same arguments)
public void onEntityDeath(LivingDeathEvent event) {
if (event != null && event.getEntity() != null) {
Entity entity = event.getEntity();
int i = (int) entity.posX;
int j = (int) entity.posY;
int k = (int) entity.posZ;
World world = entity.world;
java.util.HashMap<String, Object> dependencies = new java.util.HashMap<>();
dependencies.put("x", i);
dependencies.put("y", j);
dependencies.put("z", k);
dependencies.put("world", world);
dependencies.put("entity", entity);
dependencies.put("event", event);
this.executeProcedure(dependencies);
}
}
sourceentity is not provided, though here it is required:
if (dependencies.get("sourceentity") == null) {
System.err.println("Failed to load dependency sourceentity for procedure BloodKill!");
return;
}
This line of code seemed to help:
dependencies.put("sourceentity", event.getSource());
Nevermind, I can't find the variable to put into this dependency. The event.getSource() did not return an entity
the real fix is
dependencies.put("sourceentity", event.getSource().getTrueSource());