Implemented climbing up/down for ladders, vines, twisting vines and weeping vines.

This commit is contained in:
Milutinke 2022-10-18 17:15:26 +02:00
parent ee57d101c0
commit 616591ef35
2 changed files with 136 additions and 17 deletions

View file

@ -766,6 +766,27 @@
}
}
/// <summary>
/// Check if the player can climb up this block
/// </summary>
/// <param name="m">Material to test</param>
/// <returns>True if the material can be climbed on</returns>
public static bool CanBeClimbedOn(this Material m)
{
switch (m)
{
case Material.Ladder:
case Material.Vine:
case Material.TwistingVines:
case Material.TwistingVinesPlant:
case Material.WeepingVines:
case Material.WeepingVinesPlant:
return true;
default:
return false;
}
}
/// <summary>
/// Check if the provided material is a bed
/// </summary>