Started by
dimondking2016
on
Topic category: Help with Minecraft modding (Java Edition)
I noticed that you can't use custom code snippets as the trigger but you can call other procedures using custom code snippets.
Is there a way without locking my code to edit it to have custom triggers?
A trigger normally in code looks like this.
public static void execute(LevelAccessor world, double x, double y, double z) {
This is what I want to do.
public static void execute(LevelAccessor world, double x, double y, double z, double tx, double ty, double tz) {
Called the procedure I can do, it seems quite simple with custom code snippets, swapping out the call procedure block with a code snippet.
EventProcedure.execute(world, x, y, z);
Code snippet to call the procedure.
EventProcedure.execute(world, x, y, z, tx, ty, tz);
EDIT: To anyone who is finding this now: use the dependency blocks found in the advanced section. Also, stop programming at 2 am because that is the only reason you're having this issue.
Edited by dimondking2016 on Wed, 01/04/2023 - 10:11
This could be implemented by having additional arguments addable to the call procedure block.
And additional arguments addable to the existing Event Trigger or a new event trigger in advanced that can have additional arguments.
Also, looking at the code what is the point of having call procedure vs called procedure at x y z? In code, they are the exact same.
You can add new custom dependencies by putting a custom dependency block in the procedure, not sure if that would help in this case fully, though.
At x y z procedure variant, you can swap out x y z for a custom location
Where are the custom dependency blocks?
Also, I think this isn't what I'm going for anyway... *checked one last time and found block* this is exactly what I was looking for and my 2 am brain couldn't comprehend that. Thank you very much!
Oh yea, that was my 2 am brain being a little silly. Thanks.