Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.8.9] Item Merge editing?


Atijaf
 Share

Recommended Posts

I'm wanting to control which items merge based on an additional requirement.

 

When two pieces of stone are dropped, they merge into 1 when they come close to each other.  Is there an event for this?

 

Thanks!

Link to comment
Share on other sites

The additional requirement is whether or not the item that is on the ground has been modified, by the player, in any way - If the block was placed by the player and then broken, or if the player drops the block it'll have a NBTTag storing a boolean.  A method for getting that information #isCollectable(ItemStack)

 

I've made a skill that depends on blocks that are naturally generated by the world and when the player collects said blocks.

 

But, the merging thing was just an extra step towards making this a little bit more friendly.  For instance, if one block of stone is collectible, and another block of stone is not collectible, and they merge, the two of them become non collectible and won't count towards the skill.

Link to comment
Share on other sites

...You realize that when that block gets placed that NBT information is lost...right?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

I think I have now realized your issue:

 

ItemStacks aren't combining at all (because of your NBT) and you want to force them to combine (rather than, as I initially thought, preventing them from combining).  That's tricky, as there are multiple places where this needs to occur, not just at the EntityItemStack level.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

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
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.