joekaiser / practicalities

1 stars 3 forks source link

Port the "Polarity Negator" #5

Closed joekaiser closed 8 years ago

joekaiser commented 8 years ago

The Polarity Negator is a block that when placed on the ground will stop any magnet from picking up items around it. The distance isn't set yet. Maybe a 5x5 centered around the block?

I was thinking about this. It would be nice to work with any magnet, but I am not sure how possible that is. In the current implementation, the magnet actually looks for a Polarity Negator within X blocks on the item. If it finds one, it won't pick the magnet up. that is a big backwards

Ideally, the polarity negator will intercept ItemPickup events and cancel the event if needed. I am not sure how performant this would be though. I haven't looked at the API but I would think all items would have to have the area scanned around it. not good at all.

If there is a way to cancel the event and not impact performance, that would be best