Anyone know if there is already a method for setting the player on fire when hit by a certain mob?
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
mc.thePlayer.isBurning = true; //Sets player on fire
In the mob's file I think you can put "attackEntity(Entity entity, float f){}" in with the setting-on-fire code inside. Just a guess though, but something along those lines should work.
mc.thePlayer.isBurning = true; //Sets player on fire
In the mob's file I think you can put "attackEntity(Entity entity, float f){}" in with the setting-on-fire code inside. Just a guess though, but something along those lines should work.
Thanks. One problem though. It is looking in EntityPlayerSP instead of EntityPlayer where the isBurning method is situated.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
no. Could you give me an example please, haven't really done much of this sort of thing.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
public void setFire(int i)
{
int j = i * 20;
if (fire < j)
{
fire = j;
}
}
I want the player to be set on fire, not the entity that hits it.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I know I'm doing something wrong that is very simple to fix, but I cant figure it out. This, has no errors or crashes, but it doesn't set the player on fire.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
That's why you use the function to set stuff on fire
public void setFire(int i)
{
int j = i * 20;
if (fire < j)
{
fire = j;
}
}
instead of checking is player burning.
Where do I put that? (Sound like such a noob :laugh.gif: )
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Thankyou very much! Works perfectly. I'll put you in the credits of the mod if you want :smile.gif:
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
together they are powerful beyond imagination."
In the mob's file I think you can put "attackEntity(Entity entity, float f){}" in with the setting-on-fire code inside. Just a guess though, but something along those lines should work.
Thanks. One problem though. It is looking in EntityPlayerSP instead of EntityPlayer where the isBurning method is situated.
together they are powerful beyond imagination."
Did you create an instance of entityplayer?
no. Could you give me an example please, haven't really done much of this sort of thing.
together they are powerful beyond imagination."
I want the player to be set on fire, not the entity that hits it.
together they are powerful beyond imagination."
together they are powerful beyond imagination."
together they are powerful beyond imagination."
Where do I put that? (Sound like such a noob :laugh.gif: )
together they are powerful beyond imagination."
Thankyou very much! Works perfectly. I'll put you in the credits of the mod if you want :smile.gif:
together they are powerful beyond imagination."
how do you make it so it melees and sets them on fire at the same time? id like to know of this.