Flux Networks

Flux Networks

55M Downloads

ItemTossEvent compatibility issue.

Crimix opened this issue ยท 2 comments

commented

I am developing a mod that uses the item toss event, but when you change the EntityItem to be an EntityFireItem for redstone, the event gets called and I even check to see if the entity is dead which is not true at the time of the event. SoI still end up getting Fetching addPacket for removed entity.

commented

To overcome this issue, I can use the EntityJoinWorldEvent and do what I need to do, if when you create the EntityFireItem sets the thrower to be the same as the original EntityItem.

commented

Come to think of it, you could do what I did in the PR and at the same time raise an ItemTossEvent based on the EntityFireItem and find the player using the name of the original thrower. Then there will be no compatibility issues besides the warning in the log.

-Edit
I have not made the PR to the right branch and also included the posting of a new ItemTossEvent for maximum compatibility