mirror of https://github.com/Minestom/Minestom.git
cleanup
This commit is contained in:
parent
cf7a6d3c9f
commit
b27afcd15f
|
@ -1111,14 +1111,14 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets and refresh client food saturationModifier.
|
||||
* Sets and refresh client food saturation.
|
||||
*
|
||||
* @param foodSaturation the food saturationModifier
|
||||
* @param foodSaturation the food saturation
|
||||
* @throws IllegalArgumentException if {@code foodSaturation} is not between 0 and 20
|
||||
*/
|
||||
public void setFoodSaturation(float foodSaturation) {
|
||||
Check.argCondition(!MathUtils.isBetween(foodSaturation, 0, 20),
|
||||
"Food saturationModifier has to be between 0 and 20");
|
||||
"Food saturation has to be between 0 and 20");
|
||||
this.foodSaturation = foodSaturation;
|
||||
sendPacket(new UpdateHealthPacket(getHealth(), food, foodSaturation));
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package net.minestom.server.instance;
|
||||
|
||||
import net.kyori.adventure.nbt.CompoundBinaryTag;
|
||||
import net.kyori.adventure.nbt.LongArrayBinaryTag;
|
||||
import net.minestom.server.MinecraftServer;
|
||||
import net.minestom.server.ServerFlag;
|
||||
import net.minestom.server.collision.Shape;
|
||||
|
|
|
@ -149,7 +149,7 @@ public class BlockPlacementListener {
|
|||
// If a player is trying to place a block on themselves, the client will send a block change but will not set the block on the client
|
||||
// For this reason, the block doesn't need to be updated for the client
|
||||
|
||||
// Client also doesn't predict placement of blocks on entities, but we need to refresh for properties where bounding boxes on the server don't match the client
|
||||
// Client also doesn't predict placement of blocks on entities, but we need to refresh for cases where bounding boxes on the server don't match the client
|
||||
if (collisionEntity != player)
|
||||
refresh(player, chunk);
|
||||
|
||||
|
|
Loading…
Reference in New Issue