Changed the bed command to be able to sleep. Added relative coordinates to /dig command.

This commit is contained in:
Milutinke 2022-09-28 22:43:14 +02:00
parent 6a266c68c3
commit cd3adfa14c
5 changed files with 94 additions and 13 deletions

View file

@ -752,6 +752,7 @@ namespace MinecraftClient.Mapping
return false;
}
}
/// <summary>
/// Check if the provided material is a liquid a player can swim into
/// </summary>
@ -768,5 +769,36 @@ namespace MinecraftClient.Mapping
return false;
}
}
/// <summary>
/// Check if the provided material is a bed
/// </summary>
/// <param name="m">Material to test</param>
/// <returns>True if the material is a bed</returns>
public static bool IsBed(this Material m)
{
switch (m)
{
case Material.BlackBed:
case Material.BlueBed:
case Material.BrownBed:
case Material.CyanBed:
case Material.GrayBed:
case Material.GreenBed:
case Material.LightBlueBed:
case Material.LightGrayBed:
case Material.LimeBed:
case Material.MagentaBed:
case Material.OrangeBed:
case Material.PinkBed:
case Material.PurpleBed:
case Material.RedBed:
case Material.WhiteBed:
case Material.YellowBed:
return true;
default:
return false;
}
}
}
}