mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 11:24:56 -04:00
item entity: don't tick if below world
This commit is contained in:
parent
74347891e5
commit
0b7b6261da
@ -54,6 +54,8 @@ class ItemEntityPhysics(entity: ItemEntity) : EntityPhysics<ItemEntity>(entity)
|
|||||||
|
|
||||||
private fun move() {
|
private fun move() {
|
||||||
// This is not 100% vanilla, but performance optimized
|
// This is not 100% vanilla, but performance optimized
|
||||||
|
if (position.y < entity.connection.world.dimension.minY - 10.0) return // ignore out of world entities
|
||||||
|
|
||||||
if (onGround && this.velocity.xz.length2() <= 9.999999747378752E-6 && entity.age % 4 != 0) return
|
if (onGround && this.velocity.xz.length2() <= 9.999999747378752E-6 && entity.age % 4 != 0) return
|
||||||
|
|
||||||
move(this.velocity)
|
move(this.velocity)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user