diff --git a/src/main/java/cn/nukkit/entity/item/EntityItem.java b/src/main/java/cn/nukkit/entity/item/EntityItem.java index 00845421318..76656002f0a 100644 --- a/src/main/java/cn/nukkit/entity/item/EntityItem.java +++ b/src/main/java/cn/nukkit/entity/item/EntityItem.java @@ -152,7 +152,13 @@ public boolean onUpdate(int currentTick) { } } - this.motionY -= this.getGravity(); + if (this.level.getBlockIdAt((int) this.x, (int) this.boundingBox.getMaxY(), (int) this.z) == 8 || this.level.getBlockIdAt((int) this.x, (int) this.boundingBox.getMaxY(), (int) this.z) == 9) { //item is fully in water or in still water + this.motionY -= this.getGravity() * -0.015; + } else if (this.isInsideOfWater()) { + this.motionY = this.getGravity() - 0.06; //item is going up in water, don't let it go back down too fast + } else { + this.motionY -= this.getGravity(); //item is not in water + } if (this.checkObstruction(this.x, this.y, this.z)) { hasUpdate = true;