Jump to content

FunshineX

Members
  • Posts

    7
  • Joined

  • Last visited

Converted

  • Gender
    Male

FunshineX's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Not sure how I can do this - I need to render my item's icon first, then render a block icon over top. I can confirm that yes if I override that method for my item , then the block icons work fine, but my item's icon is then not rendered correctly Catch 22
  2. Exactly, hence my original question how to I get the correct sheet for the dirt block's item icon?
  3. When I do icon = Block.dirt.getIcon(1, 1); renderItem.renderIcon(0, 0, icon, 16, 16); it appears to be rendering half of the lapis icon.
  4. I have a custom IItemRenderer working, and need to add the following functionality: First render the default icon for that item. Then render the icon of a block based on the damage value of the item So it would render my item's icon, then maybe the icon for dirt on top as an overlay. I think my biggest question is how to bind the correct texture sheet of the overlay'd block so I can pass it to renderItem.renderIcon @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { return item.itemID == Items.arcaneTemplate.itemID; } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { return false; } @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { Icon icon = item.getIconIndex(); renderItem.renderIcon(0, 0, icon, 16, 16); switch(item.getItemDamage()) { case 1: // render Dirt overlay break; case 2: // render Cobble overlay break; } }
  5. 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
  6. 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
  7. 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?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.