Jump to content

Thefifth

Members
  • Posts

    8
  • Joined

  • Last visited

Thefifth's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. In your Init class, you have your type set to be an Item, when your class is an ItemPitch that is extending Item, is that perhaps the source of the issue?
  2. I have a pineapple haha, I knew exactly what you were suggesting without the link.
  3. Thanks Draco, this is exactly the solution I came up with after talking the issue out in my head. I'll be doing it on the other side as well, so if they stack three of the items that have the same stored ItemStack, it'll split the remainder into the inventory/throw it on the ground. Wonderful how writing down your problem and asking for help can make you realise you're being an idiot haha.
  4. Hi all I've created an item that is functioning as I want, when the player shift right clicks it opens a GUI that has a single slot that they can store an item into, and when they close it stores the ItemStack they placed into it and can be retrieved whenever they like. Basically at this point it's a single slot chest. What I'm currently attempting to do is implement a (logical) recipe for this, and I realised for what it is, it would make sense to return a stack of these items per crafting operation. What I've run into at the moment is that if I stack them, in whatever quantity (by using this.setMaxStackSize(>1) ) is that obviously, the ItemStack the player stores in it is copied to every instance of my single slot chest item if I split the stack. I've looked into the vanilla files for examples (glass bottles > water bottles) and they return a new ItemStack when the player right clicks a valid block/tile. Is there a way I can implement similar functionality to my item without creating a new ItemStack and placing it into the players inventory? The gist of what I'm trying to achieve is that for example I have a stack of 8 of my item, then when I store an item into one of them, it splits the remainder of the stack and *doesn't* allow it to be restacked with the other items. Again, much thanks in advance.
  5. Hi all, I'm currently trying to create an item that has the capacity to hold a single ItemStack within itself. I'm just wondering which of the methods available I should be using. I've been browsing through githubs for things like Iron Backpacks and Actually Additions, even McJtys tutorials, and they all seem to use different methods, be it ItemStack[] or ItemStackHandler or IInventory. The ones that are dealing with tile entities are a bit challenging for me to apply to an item as well, due to methods available on TileEntity that aren't there on items. If someone could point me in the right direction as to what I would be best using that'd be much appreciated. Thanks in advance.
  6. Thanks for all your help on this, I've managed to get my tile entity println'ing minecraft:entities/<entity>, which means I'm getting the right ResourceLocation. Unfortunately I need sleep to function tomorrow so I'll have to pick up on this tomorrow. Thanks again everyone.
  7. I've been fiddling about with ReflectionHelper and getting some results. Just as a quick question, am I on the right track here: //.. if (ent instanceof EntityLiving) { try { ResourceLocation loc = (ResourceLocation) ReflectionHelper.getPrivateValue(ent.getClass(), ent, new String[]{"getLootTable"}); if (loc != null) { //.. } } catch (Exception e) { //.. } } Or am I way off and need to rethink this. Again, thanks in advance.
  8. Hi all I've been trying to find a way to get this information in a readable format for a while now, most searches (both here and via Google) usually lead to someone trying to add a drop to an existing mob. What I'm trying to do is find out the possible drops from an entity standing on/near my tile entity. As in, if it were a skeleton, it would be an array containing arrows, bones and broken bows etc. Is this at all possible or would I need to hard code these lists? I'd like to avoid that as obviously that means that it wouldn't work for custom mobs or mobs with edited drop tables. Thanks in advance for any help.
×
×
  • Create New...

Important Information

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