Blood Magic

Blood Magic

90M Downloads

Bound Pickaxe + Sigil of Magnetism = Server Death

LyraelRayne opened this issue ยท 13 comments

commented

I've been playing on a server which has blood magic installed and whenever the bound pickaxe right click is used while the sigil of magnetism is active the server stops responding for a period of time before recovering. This happens less often in single player but still occurs on occasion. While this is happening the client plays the "pick up item" sound repeatedly and in quick succession. It kidna sounds like the pickaxe and the sigil are fighting over who gets to pick up the item, if that makes sense.

I'm playing on version 1.3.0beta (MC 1.7.10).

commented

Just confirming now I'm back home that this definitely solved the issue for me. Good stuff!

commented

That's probably just because the server doesn't have enough memory, I'll go ask Way to try and make the bound pickaxe less...memory intensive.

commented

The pickaxe works fine when the sigil is not activated, just FYI. Not sure if that makes a difference.

commented

Well, the plain fact that the pickaxe drops a lot of item entities should be alarming, but the game lags as the sigil checks for the entities and pulls them all in.

commented

Ah yes this makes sense. Perhaps the pickaxe could drop an item which contains the drops and "expands" in the inventory. Kind of like what the similar item from Equivalent Exchange did all those years ago. That'd probably make the pickaxe more friendly all 'round.

commented

Or it could attempt to transfer as much as possible directly into the inventory, only dropping what doesn't fit.
I could try and make a PR for that.

commented

Wouldn't that result in the same problem in cases where the player's inventory is full?

commented

Well it's kinda unavoidable if you don't want to lose the drops
unless...
Right now for each block one item entity is being spawned, resulting in potentially over 1000 entities. It might make sense to group them together before dropping them.

commented

I implemented it for the bound pickaxe: d800e06
The drops are collected in a multiset and then dropped in groups of 64.
I'm going to do the same for shovel and axe and then PR it in.

commented

Make sure it works!

commented

Will test myself.

commented

Just a heads up I probably won't be able to test this before the 21st of April as I'm currently away from home. I'm also not really sure how I'd do so.

commented

Seems to fix it!