Posted September 15, 201312 yr I'd like to add an event that gets called when a jukebox starts playing a record or completes. How would I do this? Do I need to write my own custom jukebox that extends the vanilla one?
September 17, 201312 yr Author I'd like to also support if a mod put a record there, not just a player. Going to look at TickHandlers and if that doesn't work I'll try a custom jukebox to replace the vanilla one
September 22, 201312 yr Author I've got to the point where I extended the existing jukebox in my own custom jukebox and that all works great. i.e.: public class BlockGreenJukebox extends BlockJukeBox { ... /snip But the problem is that the sound as well as the insertRecord event is triggered by the record item. 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) I'd like to not have to write a custom record - just work with vanilla ones, but I'm not sure how to do that without overriding base classes. The record item checks to verify the block at x,y,z is a jukebox, so it returns false if it finds my custom jukebox. Any tips on how to make this work or should I just customize the records as well? Thanks, Ron
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.