Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[solved]How to prevent a sound from playing

Featured Replies

Posted

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

  • Author

Bump

 

Oops. I just noticed I didn't attack the code right.

 

Help would be appreciated (again). Thanks!

  • 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...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.