Stopping item entities from merging?

Discussion in 'Plugin Development' started by BladeFireTurtle, Jul 3, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    BladeFireTurtle

    Hello,

    I've just made a drop party plugin that spawns items at random locations within a region. Because my plugin can't have items merging on the ground I've coded the spawned items to have a unique lore added upon creation and removed on player pickup. The problem using my current method is that when players have a full inventory with some not full itemstacks, they cannot pick up items even though it would fit into a stack within their inventory. This is because the different lore mean it wont stack and it can't be removed because the pickup event is not fired.

    A solution I was considering is on the player move event somehow checking for item entities at the players feet and then looping through all their inventory slots and checking if it should be able to fit, then removing the lore.

    This does seem a little too fiddly and resource intensive to fix such a minor issue but I can't think of a better way to do it.

    Does anyone have any other solutions?
    Thanks!

    Just a bump.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 12, 2016
Thread Status:
Not open for further replies.

Share This Page