Jump to content

Music Disk Help


tamanor

Recommended Posts

Hi I need help getting my Mod to work properly. The Music File and the Textures all work 100% when in Eclipse Minecraft DeBug but when i Decompile and reobfuscate and try to test it in normal minecraft the texture does not sure and when i place it in the Jake box it comes up with the Song is now playing but there no sound. so i was wondering if anyone knew how to fix this

 

Also I got the resources and Texture files in my zip.

Link to comment
Share on other sites

Couple of questions:

1) Which version of minecraft/ forge is your mod for?

2) what was the path for your assets/art/sounds/etc.?

3) posted code in spoiler tags would help immensely.

4)does the forge log 0 have any errors reported in it? might want to post it too with spoilers.

Link to comment
Share on other sites

Hi Thanks for Replying

      Minecraft Version is 1.5.1 - Forge Version is 7.7.2.682

      After some messing around I got the texture for the music disk Textures working I missed the s on the mods folder but I'm still not able to get the sounds to    play from the zip file

 

i use this in my main java file

RecordTest = new recordtest(5000).setUnlocalizedName("record");

and the music disk code is

package miscpack;

import java.util.List;

import net.minecraft.block.Block;
import net.minecraft.block.BlockJukeBox;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemRecord;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraft.world.World;

public class recordtest extends ItemRecord
{
public final String recordName;
private Icon blockIcon;
public recordtest(int id) {
	  super(id, "RecordTest");
	  this.setCreativeTab(CreativeTabs.tabMisc);
	  this.maxStackSize = 1;
	  this.recordName = "RecordTest";
	  
}

public String getSoundFile()
    {
            return "/resources/mod/streaming/RecordTest.ogg";
    }
    @Override
    public void registerIcons(IconRegister iconRegister) {
        this.itemIcon = iconRegister.registerIcon("TMP:RecordTest");
    }



public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
    {
        if (par3World.getBlockId(par4, par5, par6) == Block.jukebox.blockID && par3World.getBlockMetadata(par4, par5, par6) == 0)
        {
            if (par3World.isRemote)
            {
                return true;
            }
            else
            {
                ((BlockJukeBox)Block.jukebox).insertRecord(par3World, par4, par5, par6, par1ItemStack);
                par3World.playAuxSFXAtEntity((EntityPlayer)null, 1005, par4, par5, par6, this.itemID);
                --par1ItemStack.stackSize;
                return true;
            }
        }
        else
        {
            return false;
        }
    }
    @Override
    public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
    par3List.add("RecordTest");
    }

}

Link to comment
Share on other sites

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.