diff options
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/gui/entity/GuiPlayer.kt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/kotlin/gui/entity/GuiPlayer.kt b/src/main/kotlin/gui/entity/GuiPlayer.kt index aa0bea8..d6d5586 100644 --- a/src/main/kotlin/gui/entity/GuiPlayer.kt +++ b/src/main/kotlin/gui/entity/GuiPlayer.kt @@ -9,6 +9,7 @@ import net.minecraft.client.util.SkinTextures.Model import net.minecraft.client.world.ClientWorld import net.minecraft.util.Identifier import net.minecraft.util.math.BlockPos +import net.minecraft.util.math.Vec3d import net.minecraft.world.World /** @@ -21,7 +22,9 @@ fun makeGuiPlayer(world: World): GuiPlayer { Float::class.javaPrimitiveType, GameProfile::class.java ) - return constructor.newInstance(world, BlockPos.ORIGIN, 0F, GameProfile(UUID.randomUUID(), "Linnea")) + val player = constructor.newInstance(world, BlockPos.ORIGIN, 0F, GameProfile(UUID.randomUUID(), "Linnea")) + player.postInit() + return player } class GuiPlayer(world: ClientWorld?, profile: GameProfile?) : AbstractClientPlayerEntity(world, profile) { @@ -29,6 +32,10 @@ class GuiPlayer(world: ClientWorld?, profile: GameProfile?) : AbstractClientPlay return false } + fun postInit() { + lastVelocity = Vec3d.ZERO + } + override fun isCreative(): Boolean { return false } |