Jump to content

Use Forge events on Cauldron server


bloodi

Recommended Posts

Hello,

 

i am looking for a way to use forge/cauldron Events in my plugins. I need the LivingAttackEvent (the Bukkit "EntityDamage" event doesn't work in this case), so I tried use Cauldron as build path and create the Event:

 

@SubscribeEvent

public void onHit(LivingAttackEvent e){

 

System.out.println("Test Message");

 

}

 

Unfortunately it doesn't work. Does anyone of you have experiences with Cauldron?

 

Greetings,

bloodi

 

Link to comment
Share on other sites

Why? If you want to use forge events, write a mod.

Thanks for this great adivce but I want to use it in multiplayer and server-side only...

 

Forge mods can be client-only or server-only.

 

If your mod only needs to be installed on one side, set the

acceptableRemoteVersions

property of your

@Mod

annotation to

"*"

(i.e. accept any version, including none).

 

In 1.8+, you can also set either the

clientSideOnly

or

serverSideOnly

property to

true

(but not both) to prevent the mod from loading on the wrong side.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Why? If you want to use forge events, write a mod.

Thanks for this great adivce but I want to use it in multiplayer and server-side only...

 

Your reply to diesieben07 in no way contradicts what he told you.

 

If you want to use Forge events, you need to write a Forge mod.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

There's also Forge Inter-Mod Communciations, also known as IMC messages.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

  • 1 year later...
On 3/26/2016 at 2:10 PM, diesieben07 said:

Of course. They are running in the same JVM process. Just call each other's methods.

Importing the plugin classes and trying to instantiate their methods will call a class not found exception (also tried with reflection and same problem), haven't tried the other-way around though. (On a Thermos server -> fork of KCauldron -> for of Cauldron -> fork of MCPC+).

Edited by ApplePieXpto
Link to comment
Share on other sites

1 hour ago, diesieben07 said:

Why are people still using this... crap...

Write a Sponge plugin if you absolutely want it to run on a non-forge server, but then you cannot use Forge events. If you need the Forge events, why are you writing a plugin? It makes no sense.

It's challenging.

 

On 3/26/2016 at 11:06 AM, bloodi said:

Okay thanks.

Is there a way to let mods and plugins communicate?

You could also store NBT data to an entity on the forge mod event, and then read the NBT on the bukkit event, as forge events have priority over bukkit events.

You could also remove the NBT data later when not needed on forge side, maybe calling a forge mod method from the plugin side? Still haven't tested that yet.

Link to comment
Share on other sites

@diesieben07 This thread is over a year old, ApplePie bumped it.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

  • 1 month later...
On 10. 10. 2017 at 1:06 PM, diesieben07 said:

It is. So is trying to create a PNG image with a hex editor. I don't get why you want to do it.

 

Please... just stop.

Hi! I found your responses in this thread and I really need to communicate with SpongeForge plugin from my mod. I've a real reason for that. The reason is that we use the SpongeForge on our server, because we use a couple of Sponge plugins together with Forge mods. We use an economy plugin for managing money and transactions between players.

Now I'm writing a mod which should communicate with the Sponge economy. How to do that? 

Please can you give me an advice? Is there a proper way how to communicate with SpongeForge from Forge mod?

Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.