copygirl / BetterStorage

A Minecraft mod aimed at offering more storage options.
http://copy.mcft.net/mc/BetterStorage/
MIT License
57 stars 33 forks source link

OpenBlocks graves incompatibility #288

Open HiTECNOLOGYs opened 9 years ago

HiTECNOLOGYs commented 9 years ago

When dropBackpackOnDeath is set to true, there's a chance grave won't spawn (which is probably proper but annoying behavior). However, if I set it to false, items don't make it into the grave. Instead, they're dropped on the ground which is wrong behavior for sure. Can this be fixed, please?

By the way, thanks for great mod! Crates and backpacks are really awesome.

copygirl commented 9 years ago

I would love to hear the response from the grave mod author. What's the proper way to drop items on death so it will capture the items? I have no idea why the grave would not spawn with the setting on. Backpacks don't replace blocks unless they're replaceable (like tall grass or fluids).

HiTECNOLOGYs commented 9 years ago

I see. I'll try to find some time to take a look into OpenBlocks API, if there is any public API at all, or contact it's author. I will report back once it's done unless somebody does that quicker than me (which is highly probable).

boq commented 9 years ago

Hi, OpenBlocks author here.

We don't have API for item drops, since we are using already existing Forge event - PlayerDropsEvent. As far as I know, this event contains most of the drops from other mods. (Also please note lower priority, so all normal priority handlers always have chance to add items).

The problem is that you are using different event and drop items "manually" (spawning entities directly via WorldUtils.dropStackFromEntity) - so our code has no chance to notice, capture and abort that drops.

copygirl commented 9 years ago

Thanks for responding. I was of the assumption that all items dropping during the death of a player should be captured. The reason why I'm using LivingDeathEvent is because backpacks can be worn by entities other than just players, but this shouldn't be too difficult to fix.