1. Here is my code:

    Code:
    oid OnDispenserGather(ResourceDispenser dispenser, BaseEntity entity, Item item)
    {
        if (!entity.ToPlayer()) return;
        item.amount = 0;
    }
    The player gets a single item, not 0. No more than 1.

    Any ideas? is this not possible?
     
  2. No it's not possible, you can't prevent players from gathering.
     
  3. Store the given item.
    Remove it with NextTick(() => ....);
    Should work in theory
     
  4. One thing I noticed though is that the item the player is given when you set the item amount to 0 is that the item actually isn't an item. It's very weird, it's like a percentage of the item amount or something. idk
     
  5. What are you actually trying to do? Get rid of the item after gathering? If so, just do item.RemoveFromContainer() and then item.Remove()