Jump to content

Recommended Posts

Posted

Seems like it would be extremely simple with a bit of base-class modding of lava from what I hear, unless Forge already has a hook which could be used for this. If not, I'm pretty sure that you could mod the changes Forge made so you have a modified Forge class to make it compatible.

Posted

At that point, it's no better than base class modding, because you have to make sure everyone gets your modified forge file...

Anyway, it would probably be something like


@ForgeSubscribe

class Foo {

    public void lavaTime(LivingHurtEvent event) {

        if( event.entityLiving instanceof EntityPlayer ) {

            if( event.source instanceof DamageSource.lava ) {

                //code to be executed here

            }

        }

    }

}



and in you main file you would need



MinecraftForge.EVENT_BUS.register(new Foo());

This version of course would trigger on every damage tick, but it's the basic idea.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

×
×
  • Create New...