Jump to content

should be a simple one


RadioHasNoFuture

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...