how do you make a disk

Started by V8gaming on

Topic category: Help with MCreator software

Last seen on 22:39, 20. May 2017
Joined Oct 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how do you make a disk

please help me im new and i want to make a mo'music mod

 

Last seen on 17:17, 10. Jan 2024
Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Your Item needs extend
Fri, 10/28/2016 - 21:54

Your Item needs extend ItemRecord. It will want a string argument in a constructor. That's the record name. Also you will need variable of type Map , and override some methods:

 

[spoiler]

 @Override
public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ)
    {
        IBlockState iblockstate = worldIn.getBlockState(pos);

        if (iblockstate.getBlock() == Blocks.jukebox && !((Boolean)iblockstate.getValue(BlockJukebox.HAS_RECORD)).booleanValue())
        {
            if (worldIn.isRemote)
            {
                return true;
            }
            else
            {
                ((BlockJukebox)Blocks.jukebox).insertRecord(worldIn, pos, iblockstate, stack);
                worldIn.playAuxSFXAtEntity((EntityPlayer)null, 1005, pos, Item.getIdFromItem(this));
                --stack.stackSize;
                return true;
            }
        }
        else
        {
            return false;
        }
    }

 @Override
 public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
 {
 par3List.add(this.getRecordNameLocal());
 }

 @Override
 //TODO: getRecordTitle()
 public String getRecordNameLocal()
 {
 return StatCollector.translateToLocal(this.getUnlocalizedName() + ".desc");
 }

 @Override
 public EnumRarity getRarity(ItemStack itemStack)
 {
 return EnumRarity.RARE;
 }

 public static MusicDisc getRecord(String par0Str)
 {
 return (MusicDisc)records.get(par0Str);
 }

 @Override
 public ResourceLocation getRecordResource(String name)
 {
 return new ResourceLocation("testenvironmentmod:" + name);
 }

[/spoiler]

Last seen on 19:01, 30. May 2022
Joined Dec 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:Your Item needs extend
Fri, 10/28/2016 - 23:20

@#1 Hi, Nuparu. Thank yoy for helping users, but can you be more specific with helping. Most users are of the younger generation and understand very little about code. Video specific tutorials are the greatest, but you sound code savy enough to translate and help them more.

Last seen on 15:16, 14. Aug 2018
Joined Aug 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Nuparu00 I do not understand…
Tue, 08/14/2018 - 15:12

Nuparu00 I do not understand how you do it.

Last seen on 20:03, 6. May 2023
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think I remember there…
Sun, 08/19/2018 - 09:32

I think I remember there being a way to doing it without code, but Its not there for me.

Last seen on 10:40, 4. Jun 2020
Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
After some experimenting I…
Mon, 08/20/2018 - 09:44

After some experimenting I think I can answer this for you:

1. Make a new procedure and use the "Play at..." event and select your music disc sound that you should have already uploaded as a .ogg file.

2. Make a new "item" Mod Element, upload your disc texture and do what you need to. When you get to procedure there is a "When right clicked on block and choose the procedure u just made. This will mean that when the disc is right clicked against a block your new music disc sound will be played. I am sorry though, as this will mean the disc can be played clicked on whatever block and not just a Jukebox. If you're still fine with this, then it will work fine for you!

Also, you can try make a procedure that block checks but my MCreator keeps crashing when trying to select a block when making a procedure but you can always try that although i have no idea if it will work! :D 

Last seen on 10:28, 10. May 2021
Joined Mar 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
First, although this is the…
Tue, 08/21/2018 - 05:36

First, although this is the best method, it still doesn't act like a vanilla music disc. It doesn't consume the disk when played (this is possible)and it doesn't give it back when the jukebox is right clicked.

Second, For me mcreator works fine with blocks in procedures, so I think you should open a ticket on the tracker for this bug if there isn't one yet. 

Third, Nuparu00 should specify where exactly to insert that code.(the line of code)