Merge branch '1.21' into new-container-api
This commit is contained in:
commit
427b5f9179
@ -17,8 +17,8 @@ object WitheredSkeletonSpawnHandler {
|
|||||||
val entity = event.entity
|
val entity = event.entity
|
||||||
|
|
||||||
if (entity is WitherSkeleton) {
|
if (entity is WitherSkeleton) {
|
||||||
val giveHelmet = event.level.otmRandom.nextFloat() < ServerConfig.WITHER_SKELETON_HELMET_CHANCE
|
val giveHelmet = event.level.otmRandom.nextDouble() < ServerConfig.WITHER_SKELETON_HELMET_CHANCE
|
||||||
val giveSword = event.level.otmRandom.nextFloat() < ServerConfig.WITHER_SKELETON_SWORD_CHANCE
|
val giveSword = event.level.otmRandom.nextDouble() < ServerConfig.WITHER_SKELETON_SWORD_CHANCE
|
||||||
|
|
||||||
if (giveHelmet) {
|
if (giveHelmet) {
|
||||||
if (!entity.hasItemInSlot(EquipmentSlot.HEAD))
|
if (!entity.hasItemInSlot(EquipmentSlot.HEAD))
|
||||||
|
@ -79,7 +79,7 @@ class MatteryFoodData(private var player: Player) : FoodData() {
|
|||||||
if (saturationLevel > 0f) {
|
if (saturationLevel > 0f) {
|
||||||
val satisfied = min(saturationLevel.roundToInt(), points)
|
val satisfied = min(saturationLevel.roundToInt(), points)
|
||||||
points -= satisfied
|
points -= satisfied
|
||||||
saturationLevel -= satisfied
|
saturationLevel = max(0f, saturationLevel - satisfied)
|
||||||
}
|
}
|
||||||
|
|
||||||
foodLevel = max(0, foodLevel - points)
|
foodLevel = max(0, foodLevel - points)
|
||||||
|
Loading…
Reference in New Issue
Block a user