aboutsummaryrefslogtreecommitdiff
path: root/featureClass/class.js
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-05-29 12:04:52 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-05-29 12:04:52 +0800
commita6593709b0e1e99e241b6c163fe66623685b6efc (patch)
tree9714e82716caf9edd6be05a1822fa492eb6756ed /featureClass/class.js
parenta7dcf231cc43c9ef73d6a969203c2dafd2ce8caf (diff)
downloadSoopyV2-a6593709b0e1e99e241b6c163fe66623685b6efc.tar.gz
SoopyV2-a6593709b0e1e99e241b6c163fe66623685b6efc.tar.bz2
SoopyV2-a6593709b0e1e99e241b6c163fe66623685b6efc.zip
first part of supporting java side rendering
Diffstat (limited to 'featureClass/class.js')
-rw-r--r--featureClass/class.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/featureClass/class.js b/featureClass/class.js
index d595e4b..b8a17d9 100644
--- a/featureClass/class.js
+++ b/featureClass/class.js
@@ -79,17 +79,16 @@ class Feature {
delete this.soopyEvents[event.id]
}
- registerForge(event, func, messageIfError) {
+ registerForge(event, func, priority) {
let theEvent
try {
- theEvent = this.FeatureManager.registerForge(event, func, this)
- } catch (e) { //TODO: option to disable this chat message + fallback register for some that support (eg fallback of RenderWorldLastEvent to ct 'renderWorld')
- if (!messageIfError) messageIfError = "An error occured while registering the event " + event.class.toString().split(".").pop() + ", this may cause " + this.constructor.name + " to not work properly."
- ChatLib.chat(this.FeatureManager.messagePrefix + messageIfError)
+ theEvent = this.FeatureManager.registerForge(event, func, priority, this)
+ } catch (e) {
+ ChatLib.chat(this.FeatureManager.messagePrefix + "An error occured while registering the event " + event.class.toString().split(".").pop() + ", this may cause " + this.constructor.name + " to not work properly.")
}
if (theEvent) this.forgeEvents[theEvent.id] = theEvent
- return new ForgeEvent(theEvent, theEvent.trigger, [event, func, messageIfError], this)
+ return new ForgeEvent(theEvent, theEvent.trigger, [event, func, priority], this)
}
unregisterForge(event) {