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.

Featured Replies

Posted

good days

im leaving this mini guide here for miself later retake wen ned.

 

well first i wanna set a simple sound for an item nothing complicated soo  i gonna take the sound file Rhapsody of Fire - Dark Wings of Steel [2013] 320/11 - Sad Mystic Moon.mp3 and i gona converit to ogg using the sound converter tool from linux and chop the name to  sadmistickmoon.ogg

 

this sadmistickmoon.ogg i gonna put in mi mod sounds folder 

forge-1.8-11.14.0.1261-1.8-src/src/main/resources/assets/modmercenario/sounds/sadmistickmoon.ogg

 

now the json file , this one is a little tricky there is this colon ', ' must be wached because it can fuck all the file

forge-1.8-11.14.0.1261-1.8-src/src/main/resources/assets/modmercenario/sounds.json

 

//__________________________________________________________

 

{

    "taladro": { "category": "player", "sounds": [ "taladro" ] },

    "neutro":  { "category": "player", "sounds": [ "n" ] },

    "smm":  { "category": "player", "sounds": [ "sadmistickmoon" ] } 

}

 

//__________________________________________________________

 

there is only tree sounds files declarated in this json and now the colon thing is

at the end of every sound line there must be a colon at the end but never in the last one if you let the colon in the last one or omit the colon in any other line minecraft wont gonna load the file and surprise  no custom sounds just one one error and nothing works

 

 

now to play the sound you must writte this  in the item you wanna use whit, mi MODID name is "modmercenario"

and this is in the  onItemRightClick of mi testingItem 

 

public ItemStack onItemRightClick(ItemStack sierra, World worldIn, EntityPlayer playerIn){

 

//plays taladro

worldIn.playSoundAtEntity(playerIn, "modmercenario:taladro", 1.0F, 1.0F);

 

//plays neutro

        worldIn.playSoundAtEntity(playerIn, "modmercenario:neutro", 1.0F, 1.0F);

 

        //plays  sad mistic moon

worldIn.playSoundAtEntity(playerIn, "modmercenario:smm", 1.0F, 1.0F);

 

}

 

when i fireup minecraft take the testitem on mi hand and press rigth click it sounds first taladro then neutro and sadmistic moon is like all at the same time, but the sound dont gonna move whith steve is like a music box whit a disk

if you move ten meters far there is no sound if you get close again there is again the sound . 

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.