mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Implemented climbing up/down for ladders, vines, twisting vines and weeping vines.
This commit is contained in:
parent
ee57d101c0
commit
616591ef35
2 changed files with 136 additions and 17 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue