Allow activating a checkpoint and other blocks around it

e.g. a checkpoint with a /mb air message above it
This commit is contained in:
UnknownShadow200 2019-02-23 13:04:16 +11:00
parent cca92ce24b
commit eb2efbd83e
2 changed files with 5 additions and 2 deletions

View File

@ -30,7 +30,7 @@ namespace MCGalaxy.Blocks {
public delegate void HandlePlace(Player p, BlockID newBlock, ushort x, ushort y, ushort z);
/// <summary> Returns whether this block handles the player walking through this block at the given coordinates. </summary>
/// <remarks> If this returns true, the usual 'death check' behaviour is skipped. </remarks>
/// <remarks> If this returns false, continues trying other walkthrough blocks the player is touching. </remarks>
public delegate bool HandleWalkthrough(Player p, BlockID block, ushort x, ushort y, ushort z);
/// <summary> Called to handle the physics for this particular block. </summary>

View File

@ -64,8 +64,11 @@ namespace MCGalaxy.Blocks {
Entities.Spawn(p, p);
}
p.lastCheckpointIndex = index;
return true;
}
return true;
// allow activating other blocks (e.g. /mb message above it)
return false;
}
}
}