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

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.

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.

  • Author

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");
    }

}

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.