Hopper events only ever have 1 inventory to select from so instead of trying both source and dest use only the one that is not the hopper

For my test server this removed about 30% of the cache reads some may be more or less

Lastly, optimize flags a tiny bit and add a resolveProtectionConfiguration method to skip the getBlock call