1
Events bug.
I tried to make my hoe till a 3x3 area around a player so I added a simple override to my hoe's class, however the syntax of "if (event.getResult() == Result.ALLOW)" was underlined at ALLOW, I tried to import events manualy but that did not help, I already looked into the original hoe class but that did not work out for me either, I do get a crash when I try to use the hoe, however this crash report will not say alot, if you want the hoe's class, tell me, I don't like throwing my codes around everywhere, thanks alot.
Edit : Error reads : ALLOW cannot be resolved or is not a field.
Edit : Error reads : ALLOW cannot be resolved or is not a field.
3
glowdemon1IAmChosenglowdemon1I tried to make my hoe till a 3x3 area around a player so I added a simple override to my hoe's class, however the syntax of "if (event.getResult() == Result.ALLOW)" was underlined at ALLOW, I tried to import events manualy but that did not help, I already looked into the original hoe class but that did not work out for me either, I do get a crash when I try to use the hoe, however this crash report will not say alot, if you want the hoe's class, tell me, I don't like throwing my codes around everywhere, thanks alot.
Edit : Error reads : ALLOW cannot be resolved or is not a field.
I haven't heard of a Result class in forge or minecraft, but in the case it does exist, anything called from the class itself and not an object must be static. ex:
Class class = new Class();
class.method();//Non-static, called in instance
Class.staticMethod();//Static, called from class itself
There is an events class in forge however it does seem to work properly when used in other Classes, it just does not work in my override :/
I know about the events class, I think the problem lies in whatever Result is.
IAmChosenglowdemon1I tried to make my hoe till a 3x3 area around a player so I added a simple override to my hoe's class, however the syntax of "if (event.getResult() == Result.ALLOW)" was underlined at ALLOW, I tried to import events manualy but that did not help, I already looked into the original hoe class but that did not work out for me either, I do get a crash when I try to use the hoe, however this crash report will not say alot, if you want the hoe's class, tell me, I don't like throwing my codes around everywhere, thanks alot.
Edit : Error reads : ALLOW cannot be resolved or is not a field.
I haven't heard of a Result class in forge or minecraft, but in the case it does exist, anything called from the class itself and not an object must be static. ex:
Class class = new Class();
class.method();//Non-static, called in instance
Class.staticMethod();//Static, called from class itself
There is an events class in forge however it does seem to work properly when used in other Classes, it just does not work in my override :/
glowdemon1I tried to make my hoe till a 3x3 area around a player so I added a simple override to my hoe's class, however the syntax of "if (event.getResult() == Result.ALLOW)" was underlined at ALLOW, I tried to import events manualy but that did not help, I already looked into the original hoe class but that did not work out for me either, I do get a crash when I try to use the hoe, however this crash report will not say alot, if you want the hoe's class, tell me, I don't like throwing my codes around everywhere, thanks alot.
Edit : Error reads : ALLOW cannot be resolved or is not a field.
I haven't heard of a Result class in forge or minecraft, but in the case it does exist, anything called from the class itself and not an object must be static. ex:
Class class = new Class();
class.method();//Non-static, called in instance
Class.staticMethod();//Static, called from class itself
