Jump to content

[solved]How to prevent a sound from playing


chubel10

Recommended Posts

So I created an entity that inherits from ZombiePigmanEntity and I've been able to replace the basic sounds like death and the like because they are inside methods that can be overritten.

 

The problem is that the ENTITY_ZOMBIE_PIGMAN_ANGRY sound is inside a method that uses a bunch of other methods inside the class. This is problematic because if I override it I have to define the other functions it calls which basically means I have to overwrite everything.

 

The alternative is inheriting directly from the parent ZombieEntity and copy-pasting the vanilla code inside the ZombiePigmanEntity and just change it to fit my mod (which I think is better).

Is there a less messy way to do this? I wish I could just override an if statement within a method but I guess that's life hahaha.

 

This is the code for ZombiePigmanEntity:

[remove copyrighted code - diesieben07]

 

The method that is giving me trouble is the updateAITasks() one.

 

Help would be greatly appreciated!

 

Edited by diesieben07
Link to comment
Share on other sites

  • chubel10 changed the title to [solved]How to prevent a sound from playing

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.