Merge branch '1.21' into new-container-api

This commit is contained in:
DBotThePony 2025-03-15 13:23:43 +07:00
commit 427b5f9179
Signed by: DBot
GPG Key ID: DCC23B5715498507
2 changed files with 3 additions and 3 deletions

View File

@ -17,8 +17,8 @@ object WitheredSkeletonSpawnHandler {
val entity = event.entity
if (entity is WitherSkeleton) {
val giveHelmet = event.level.otmRandom.nextFloat() < ServerConfig.WITHER_SKELETON_HELMET_CHANCE
val giveSword = event.level.otmRandom.nextFloat() < ServerConfig.WITHER_SKELETON_SWORD_CHANCE
val giveHelmet = event.level.otmRandom.nextDouble() < ServerConfig.WITHER_SKELETON_HELMET_CHANCE
val giveSword = event.level.otmRandom.nextDouble() < ServerConfig.WITHER_SKELETON_SWORD_CHANCE
if (giveHelmet) {
if (!entity.hasItemInSlot(EquipmentSlot.HEAD))

View File

@ -79,7 +79,7 @@ class MatteryFoodData(private var player: Player) : FoodData() {
if (saturationLevel > 0f) {
val satisfied = min(saturationLevel.roundToInt(), points)
points -= satisfied
saturationLevel -= satisfied
saturationLevel = max(0f, saturationLevel - satisfied)
}
foodLevel = max(0, foodLevel - points)