Jump to content

Recommended Posts

Posted

Hello all  sorry if this has already been solved  . but i have been trying  to add  attack to my mob  "Guard"

however no luck so far  maybe i haven't done enough  but this is really getting to me. 

i think Im making the mob passive  but don't  Know  how to change that please help  in new to modding and iv come back to after a while of frustration and failed attempts thanks  in advance  code  from baseMod and the GuardMod files  is below

 

 

 

BaseMod

 

 

  Reveal hidden contents

 

 

GuardMod

 

 

  Reveal hidden contents

 

  • 1 month later...
Posted
  On 1/22/2014 at 11:59 PM, junzuke said:

Hello all  sorry if this has already been solved  . but i have been trying  to add  attack to my mob  "Guard"

however no luck so far  maybe i haven't done enough  but this is really getting to me. 

i think Im making the mob passive  but don't  Know  how to change that please help  in new to modding and iv come back to after a while of frustration and failed attempts thanks  in advance  code  from baseMod and the GuardMod files  is below

 

 

 

BaseMod

 

 

  Reveal hidden contents

 

 

GuardMod

 

 

  Reveal hidden contents

 

 

Try to use that tags in your mob class:

this.tasks.addTask(1, new EntityAIFollowCalled(this, this.moveSpeed, 5.0F, 2.0F));
this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this,EntityPlayer.class, 25.0F, 0, true));

Posted
  On 1/22/2014 at 11:59 PM, junzuke said:

Hello all  sorry if this has already been solved  . but i have been trying  to add  attack to my mob  "Guard"

however no luck so far  maybe i haven't done enough  but this is really getting to me. 

i think Im making the mob passive  but don't  Know  how to change that please help  in new to modding and iv come back to after a while of frustration and failed attempts thanks  in advance  code  from baseMod and the GuardMod files  is below

 

 

 

BaseMod

 

 

  Reveal hidden contents

 

 

GuardMod

 

 

  Reveal hidden contents

 

 

Try those tasks. Put them in your mob class

this.tasks.addTask(1, new EntityAIAttackOnCollide(this, 0.25F, true));
        this.tasks.addTask(2, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
        this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));

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.