dredhorse/DeathTpPlus — Issue #27: Bug: Chests Created In Lava/Water/Mid-Air
Author: redpoptarts
Created: 2011-12-02 11:05:36+00:00
State: open

Instead of creating the chest in the exact location of the players death...

If the player died in a 'non-air' block (liquids usually, or solids for suffocation), calculate the nearest air block directly above the location of death. (preferably check for 2 air blocks so the chest can be opened if the terrain is protected from modification)

Similarly, if the player died in 'air', check below vertically to place the chest above the first non-air block.

If processor usage becomes a problem (probably not, since it should find the nearest block pretty quickly in MOST circumstances), the distance-to-chest can be limited to a reasonable number.

Config Option: If a suitable space for the chest(s) cannot be found...
A) Create the block at the location of death, over writing the blocks there. (Default, current behavior)
B) Do not create a chest, destroy the contents (This option is good for servers who do not want chests overwriting special terrain/buildings/features)