Adventure Backpack

Adventure Backpack

5M Downloads

Backpacks vanish when lootable bodies are enabled

iBELLinc opened this issue · 11 comments

commented

Mod Versions:
Lootable Bodies 1.3.5
Adventure Backpack 0.8b

Minecraft 1.7.10
Forge 1408

This has been tested a few times in a larger mod pack but I am pretty sure that something is not working properly between this mod and Dr. Cyano's lootable bodies mod found here:

http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2298198-dr-cyanos-lootable-bodies-save-your-inventory-on-a

When a player dies a body entity is spawned holding all items carried by the player including equipped items (equipped vanilla armor and baubles/tinkers construct equipables which have their own gui and inventory slots) but the backpack is nowhere to be found. Is this because the backpack is not in a real inventory space?

If you need more information just let me know and I'll be glad to get it for you. Also, I will be reporting this issue to DrCyano in case this is an issue on his end.

commented

@Cyanobacterium Thanks a lot for this. It's so very nice to see people taking care when one can't. And yes, @julliande, If it can't place a block it will simply drop.

That implementation will be fixed with the config option, and support for the KeepInventory rule, among other things.

I'm working on it this week, pinky promise.

commented

I can try disabling the placement when Looting Bodies is installed, and droppping along with everything else.

commented

That would work, although I think you should also have a config option to manually specify whether to drop as an item or block, just in case another mod comes along doing something similar to Lootable Bodies.

Yet another angle you could take (in the Minecraft 1.8 version) would be to make the item model use the backpack block model and then always drop the backpack as an item entity with despawning disabled. The disadvantage with this approach is that the backpack would spin while it is sitting on the ground.

commented

Added a config option to disable placement on death and fixed the KeepInventory Gamerule in Beta-0.8c

commented

DrCyano here. I'd like to help. My first question is whether the backpack drops to the ground as an item when the player dies or if it spawns some other kind of entity?

commented

When this issue originally occurred we were inside a Unique Artifact Wizard Tower which has a limited amount of space (1x2 hallway.) When the player died the backpack did not drop at all. I say it "vanished" because there was no trace that it ever existed. The player died and the backpack was no-where to be found.

After testing I see that the backpack is supposed to be placed on the ground when a player is killed. Is it possible that a suitable place to put the backpack down could not be found and so the "placing of the backpack" step was skipped therefore destroying the backpack and it's inventory?

commented

Just to be clear, does the backpack disappear every time you die or only under certain circumstances?

When the lootable body appears, it sucks up all item entities within a 3 block radius for about 2 seconds. Looking at the Adventure Backpack mod code, it looks like it tries to place a backpack block (not item) when you die, searching up to 7 blocks away for an open space, dropping the backpack item only if it fails to find a suitable location to place the block. So I think your backpack is just in an airspace above or below where you died. If you want it to be in the lootable body, you need to disable backpack block placement (there might be a config option for that).

commented

Unfortunately the original world save where this issue occurred had been
deleted. It is possible that the backpack was placed behind a wall which is
unfortunate since some of the wizard towers have anti-builder blocks
stopping players from placing or destroying blocks in our around the tower.
That original world was my first experience with the backpack mod and the
only other time I died with a backpack was in a void. (So definitely gone)

I tested dieing with a backpack on my newest world file and it seems to be
working fine.

After rereading above I realized maybe the anti-builder block would have
caused a problem? If the backpack couldn't be placed would it drop as an
item in the location the player originally died or would it drop on the
last block it attempted to place itself on?

On Tue, Jun 30, 2015, 7:39 AM Chris Hall [email protected] wrote:

Just to be clear, does the backpack disappear every time you die or only
under certain circumstances?

When the lootable body appears, it sucks up all item entities within a 3
block radius for about 2 seconds. Looking at the Adventure Backpack mod
code, it looks like it tries to place a backpack block (not item) when you
die, searching up to 7 blocks away for an open space, dropping the backpack
item only if it fails to find a suitable location to place the block. So I
think your backpack is just in an airspace above or below where you died.
If you want it to be in the lootable body, you need to disable backpack
block placement (there might be a config option for that).


Reply to this email directly or view it on GitHub
#83 (comment)
.

commented

Yeah, that could delete the backpack, but it depnds on the underlying implementation of build protection.

The sourcecode for Adventure Backpacks implies that there's a config option to disable the block placement (making it drop an item instead). That would solve your Lootable Body and wizard tower problems.

commented

Since I am using lootable bodies I will definitely make the backpack drop
as an item!

Thank you very much. It helps to more thoroughly test things before saying
they don't work. Sorry for wasting your time but I really do appreciate you
stepping in to help me figure it out even though this isn't your mod.

On Wed, Jul 1, 2015, 6:26 AM Chris Hall [email protected] wrote:

It depends on how build protection is implemented. If it uses the player
item use event hook to cancel the block place, then it should force
Adventure Backpacks to drop an item. But if build protection deletes blocks
right after they're placed, then it will indeed delete the backpack.

The sourcecode for Adventure Backpacks implies that there's a config
option to disable the block placement (making it drop an item instead).
That would solve your Lootable Body and wizard tower problems.


Reply to this email directly or view it on GitHub
#83 (comment)
.

commented

No Prob! I'm glad we found a solution for you.