Started by
SparkleArts
on
Topic category: Plugins and third-party tools
I'm making an Global Trigger that fired when someone gets Knockback. But for some reason it doesn't add the necessary import Code to work with.
Here is the Global Trigger Code:
<#include "procedures.java.ftl">
@Mod.EventBusSubscriber public class ${name}Procedure {
@SubscribeEvent public void onLivingKnockback(LivingKnockbackEvent event) {
if (event!=null && event.getEntity()!=null) {
<#assign dependenciesCode><#compress>
<@procedureDependenciesCode dependencies, {
"entity": "event.getEntity()",
"strength": "event.getStrength()",
"originalStrength": "event.getOriginalStrength()",
"ratioX": "event.getRatioX()",
"ratioZ": "event.getRatioZ()",
"originalRatioX": "event.getOriginalRatioX()",
"originalRatioZ": "event.getoriginalRatioZ()",
"event": "event"
}/>
</#compress></#assign>
execute(event<#if dependenciesCode?has_content>,</#if>${dependenciesCode});
}
}
I get this Error If I test my Global Trigger:
C:\Users\Jonas\MCreatorWorkspaces\another_world_to_discover\src\main\java\net\mcreator\anotherworldtodiscover\procedures\KnockbackMessageProcedure.java:16: error: cannot find symbol
public void onLivingKnockback(LivingKnockbackEvent event) {
Edited by SparkleArts on Sun, 03/12/2023 - 22:29