How to access methods #136
Answered
by
ZXMushroom63
Death680930
asked this question in
Q&A
-
|
So I was looking through discussions and found this example given by @ZXMushroom63 (function NoHurtCam() {
//during development, ideally you would have the eaglerforge client open and be able to put things into devtools to test them while writing code
//we want to remove the code responsible for the hurt camera animation
const compiledMethodName = ModAPI.util.getMethodFromPackage("net.minecraft.client.renderer.EntityRenderer", "hurtCameraEffect");
//you can patch / overwrite java methods using `ModAPI.hooks.methods`
ModAPI.hooks.methods[compiledMethodName] = ()=>{} //this is the same as ModAPI.hooks.methods.functionname = ()=>{}
})()
//This function in brackets that is being immediately executed is called an IIFE. this means that variable names will not clash with other mods.And I am wondering how I can see all methods . So different valus for this line: Please let me know if this doesn't make sense |
Beta Was this translation helpful? Give feedback.
Answered by
ZXMushroom63
Jan 5, 2026
Replies: 1 comment 3 replies
-
|
a copy of the eaglercraft source code, or look through |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
Death680930
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
a copy of the eaglercraft source code, or look through
ModAPI.hooks.methods