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.

Leaderboard

Popular Content

Showing content with the highest reputation on 07/26/22 in all areas

  1. Use a lambda expression and create a new Supplier, for the vanilla MobEffects.
  2. Basic objects like Blocks and Items are always registered first. This is to avoid circular references in the loading/registration. You should change your item constructor to accept a Supplier<MobEffect> or RegistryObject<MobEffect> as the parameter and then use the get() when you need the real object later at runtime.
  3. Yes you need to store the instance somewhere. If you create new ones they are different shouts. Think about if another player starts/stops shouting. They will send messages to the server which will send messages to your client. You need to keep track of which players are linked to which sound instances to handle this properly. As I said above, a player capability would be a good way to store this data. WARNING: You would need to be careful that any server side code of the capability doesn't try to load the SoundInstance class, e.g. by wrapping the sound instance in a holder class that only gets used on the client.
  4. Remove OptiFine or downgrade Forge to 41.0.63, since there no compatible OptiFine version for Forge 41.0.100
  5. You will need to do more than playing the sound from the key press, otherwise it will only work in single player. ๐Ÿ™‚ You are going to need to tell the server to broadcast your shout/stop to other players. Looking at ClientBoundSoundPacket - the normal way to do this from one of the ServerLevel.playSound() methods, it does not have a parameter for looping so it looks like you will need your own custom packet handling for that as well? And you do need the tick event. Look at EntityBoundSoundInstance that has code so the sound moves with the entity/player.

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.